> I think I asked this before but I don't have an answer for it:
>
> If I have successfully normalized an EPI image, and I have a coordinate in
> the *original* image, and I want to know where that original coordinate
> got mapped to in the normalized image, how would I do it?
>
> It's as though I had an EPI image of one voxel only and I wanted to know
> where it would be when normalized. Or in other words, how does the
> *sn_3d.mat do its stuff? Is there some command I could use which would
> apply that .mat transformation to a single (x,y,z) coordinate, rather than
> to a whole image?
>
> I have a copy of get_orig_coords.m but that is answering the reverse (and
> more difficult) question.
The parameters that the spatial normalisation estimates describe a mapping from the
space of the template (normalised image), to that of the original image. Therefore, it
is much easier to work out where a voxels in a normalised image came from (what
get_orig_coords.m does) than vica verca (what you want to do).
The reason for this is that spatially normalised images are generated by pulling the original
voxel values into their new locations in the spatially normalised image (ie, scanning through the
co-ordinates in MNI space, finding where each intensity value should come from and sampling
it from the original image). If the operation involved scanning through the original image and
pushing voxels to the appropriate place in MNI space, then there would probably be a few empty
regions in the normalised image.
It is possible to do what you want, but you need to generate an inverse deformation field. This can be
done using the Deformations toolbox, of which there is a prototype version at:
ftp://www.fil.ion.ucl.ac.uk/spm/toolbox/Deformations/Deformations-010409.tar.gz
These files should be installed in the toolbox subdirectory of your SPM distribution. ie.
cd SPM_DIRECTORY
gunzip < Deformations-010409.tar.gz | tar xvf -
You can get at the toolbox by the <Toolbox> pulldown. Selecting this will give you a pulldown
in the lower left SPM window. Select <Deformations from sn3d.mat>, then the file containing
the spatial normalisation params and the bounding box and voxel size you used (although these
don't strictly need to be the same). The results of this will be three images, beginning y1_, y2_ and
y_3_, which are the deformation fields expanded from their original basis function coefficients.
You need to then invert this deformation field using the deformations toolbox, and specifying
<Invert Deformations>. Set number of subjects to one, and then select the y1_, y2_ and y3_
images. Then it will prompt you for an image to base the inverse deformation field on. This image
is basically to get voxel sizes and dimensions and stuff from, so select the original un-normalised image.
The result is another three image files, iy1_, iy2_ and iy3_, which contains the inverse of the deformation.
Each voxel in the inverse deformation contains the co-ordinate (in millimeters) in MNI space that it is
moved to during spatial normalisation. You can read these values via the <Display> button by moving the
crosshairs to the appropriate location. The x co-ordinate in MNI space is obtained from the iy1_ file, the
y co-ordinate from the iy2_ file and the z co-ordinate from the iy3_ file.
Best regards,
-John
--
Dr John Ashburner.
Functional Imaging Lab., 12 Queen Square, London WC1N 3BG, UK.
tel: +44 (0)20 78337491 or +44 (0)20 78373611 x4381
fax: +44 (0)20 78131420 http://www.fil.ion.ucl.ac.uk/~john
|