Resizing a 3D image without using imresize3
조회 수: 2 (최근 30일)
이전 댓글 표시
I do not have the image processing toolbox on my MatLab 2016b so I cannot use the imresize3() function. Is there other ways to resize an image of (x,y,z) to (a,b,c)?
댓글 수: 0
답변 (4개)
Walter Roberson
2017년 9월 23일
ifftn( fftn(YourImage), [a, b, c] )
댓글 수: 1
Bogdan Dzyubak
2017년 12월 28일
편집: Bogdan Dzyubak
2017년 12월 28일
Transforming the image this way forward and back produces tons of ringing. There's also a warping artifact (perhaps fftshift is needed). With imresize, the forward and back transform gives a blurrier original image which is more desirable.
Ahmadi Anis
2020년 4월 8일
I have an MRI image with this size (140,192,192), so this script will insert my image in the center of an output matrix with this size (X,Y,Z) by adding zero
this script works ;)
clear;
clc;
matrice= niftiread('C:\Users\anis8\Desktop\1.nii');
X=256;
Y=256;
Z=256;
matrice=[zeros(floor(X-size(matrice,1))/2,size(matrice,2),size(matrice,3));...
matrice;...
zeros(floor(X-size(matrice,1))/2,size(matrice,2),size(matrice,3))];%%reglage de x
matrice=[zeros(X,floor(Y-size(matrice,2))/2,size(matrice,3)),...
matrice...
,zeros(X,floor(Y-size(matrice,2))/2,size(matrice,3))];%%reglage de y
matrice=cat(3,zeros(X,Y,floor(Z-size(matrice,3))/2),...
matrice...
,zeros(X,Y,floor(Z-size(matrice,3))/2));%%reglage de z
댓글 수: 1
Radhika Gupta
2022년 4월 24일
편집: Radhika Gupta
2022년 4월 24일
Hey!
is there any way to resize .nii file and save in same format istead of a matrix?
Shivam
2022년 7월 29일
You can use "for" loop for each 2D image, and than use imresize():
Im=zeros(N,N,N);
I=zeros(n,n,n);
for i=1:N
I(:,:,i)=imresize(squeeze(Im(:,:,i)),[n n]);
end;
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!