Question about the image resampling
Afficher commentaires plus anciens
Hi all,
when i read this great article( http://www.mathworks.com/help/images/examples/exploring-slices-from-a-3-dimensional-mri-data-set.html?s_tid=srchtitle ), i met a problem at step 2 : T0=maketform('affine',[0 -2.5 ;1 0;0 0]) . Could anyone help me understand why the resampling factor is 2.5 ?
Thanks in advance!
Sherri
----------------------------------------------------------------------------------------------
here are some main codes:
M2 = reshape(M1,[128 27]); size(M2)
figure, imshow(M2,map);
title('Sagittal - Raw Data');
ans =
128 27

We can obtain a much more satisfying view by transforming M2 to change its orientation and increase the sampling along the vertical (inferior-superior) dimension by a factor of 2.5 -- making the sampling interval equal in all three spatial dimensions. We could do this in steps starting with a transpose, but the following affine transformation enables a single-step transformation and more economical use of memory.
T0 = maketform('affine',[0 -2.5; 1 0; 0 0]);
The upper 2-by-2 block of the matrix passed to maketform, [0 -2.5;1 0], combines the rotation and scaling.
R2 = makeresampler({'cubic','nearest'},'fill');
M3 = imtransform(M2,T0,R2);
figure, imshow(M3,map);
title('Sagittal - IMTRANSFORM')

Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Generic Geometric Transformations dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!