| I would like to reorient some images in two ways,
| using the usefull function reorient() of John Ashburner.
|
| - first is to keep the voxel size intact,
| but still reorienting in the transverse plane
Without testing the code, and without too much thought, I think
the modification to do this is involves something like changing from:
mat = spm_matrix([mn-1]);
dim = (mat\[mx 1]')';
to something like:
vox = spm_imatrix(V.mat);
vox = vox(7:9);
mat = spm_matrix([0 0 0 0 0 0 vox])*spm_matrix([mn-1]);
dim = (mat\[mx 1]')';
|
| - second is to reorient in the coronal plane,
| with 1x1x1 mm resol.
I think this is involves something like changing from:
mat = spm_matrix([mn-1]);
to something like:
mat = spm_matrix([0 0 0 pi/2])*spm_matrix([mn-1]);
or maybe:
mat = spm_matrix([0 0 0 -pi/2])*spm_matrix([mn-1]);
|
| In the two cases, the final image should have no .mat file
| and be resliced using sinc ...
To reslice using sinc interpolation, you change from:
img = spm_slice_vol(V,M,dim(1:2),1);
to something like:
img = spm_slice_vol(V,M,dim(1:2),-6);
I hopehese suggestions work.
Best regards,
-John
|