You can use the Deformations utility to write out the deformations in a
form that may be easier to work with. It will be a 5D NIfTI file, where
the 4th dimension is 1 and the 5th is 3. I don't know what your
programming skills are like, but this can be read using:
P=spm_select(1,'nifti');
N=nifti(P);
Then you can read off the mm coordinates that voxel i,j,k points to
using
mm = squeeze(N.dat(i,j,k,1,:))
You may then wish to transform these mm coordinates to voxels in some
image, by multiplying by the inverse of the voxel-to-world mapping of
that image
P1 = spm_select(1,'image');
M = spm_get_space(P1);
iM = inv(M);
vox = iM(1:3,:)*[mm; 1]
Best regards,
-John
On Thu, 2010-05-20 at 14:52 +0100, Giulia Preti wrote:
> Hi,
>
> I'm using SPM5 to coregister and normalize MR diffusion weighted images. I'd like to know if there is a command to get the transformation applied with a normalize operation. For exemple, I know that to get the affine transformation of a coregistration, the command spm_get_space is available. Is there a similar command for the normalization, too?
>
> Thank you very much for your help,
> Giulia Preti
>
--
John Ashburner <[log in to unmask]>
|