, MATLAB montage immovie. : D (128x128x1x27, uint8) map (89x3, double).
D 27 128x128. D 0 88. , , . D immovie. . . , , size(D, 3) RGB- . . D imtransform tformarray . D :
- 1: ( (rostral) (caudal) )
- 2:
- 4: (inferior superior).
, 27 , . , iptgetpref.
truesizewarning=iptgetpref('TruesizeWarning');iptsetpref('TruesizeWarning', 'off');load mri;figure;immovie(D, map);montage(D, map);title('Horizontal Slices'); 2: imtransform.
, , D .
, .
M1=D(:, 64,:,:); size(M1)
M1 128x1x1x27. reshape M1 128x27, imshow.
M2=reshape(M1, [128 27]); size(M2)
figure, imshow(M2, map);
title('Sagittal - Raw Data');
M2 :
- 1: ( (rostral) (caudal) )
- 2: (inferior superior).
, () 2.5. .
|
|
T0=maketform('affine', [0 -2.5; 1 0; 0 0]);
, maketform 2x2
[ 0 -2.5
1 0 ]
. :
- 1: (inferior superior).
- 2: ( (rostral) (caudal) )
imtransform(M2, T0, 'cubic')
T M2 . , . .
R2=makeresampler({'cubic', 'nearest'}, 'fill');
M3=imtransform(M2, T0, R2);
figure, imshow(M3, map);
title('Sagittal - IMTRANSFORM')
3: tformarray.
, 2. , tformarray. 2 , . imtransform, 3, M1 M2.
TDIMS_A tformarray . :
- 1: ( )
- 2: ( (rostral) (caudal) , )
, 2 tdims_a=[4 1 2]. tform , , 1 2.5 68.5. , 64- , INVERSE_FCN:
: ipex003.m |
function U=ipex003(X, t) U=[X repmat(t.tdata, [size(X, 1) 1])]; |
T2 Tc.
T1=maketform('affine', [-2.5 0; 0 1; 68.5 0]);
T2=maketform('custom', 3, 2, [], @ipex003, 64);
Tc=maketform('composite', T1, T2);
.
R3=makeresampler({'cubic', 'nearest', 'nearest'}, 'fill');
tformarray D . , 66x128 27 66 .
M4=tformarray(D, Tc, R3, [4 1 2], [1 2], [66 128], [], 0);
, imtransform.
figure, imshow(M4, map);
title('Sagittal - TFORMARRAY');