Hi Buyean,
I don't have access to SPM2 right now, but I think the following
should work in both... It's easier to do this if you use the
command-line rather than the GUI. First note that spm_coreg determines
a transformation between the images in "world space", while the mat
field contains the voxel-world mapping; you want to invert this
transformation, but not the whole voxel-world mapping. Second, note
from the help for spm_coreg that it returns a transformation from
reference to source, which is then inverted in spm_config_coreg
(probably something like spm_coreg_ui in SPM2...) for application to
the source, so to do what you want, we actually just don't do any
inversion (this is because inv(inv(M))==M).
x = spm_coreg('mri.img', 'pet.img')); % mri as reference, pet as source
% NB, can pass options if want to change defaults, see help spm_coreg
M = spm_matrix(x); % source_coords = M * reference_coords
spm_get_space('mri.img', M * spm_get_space('mri.img')); % move the reference
Shout if that doesn't work, and I'll check it more carefully!
Best,
Ged
On 20/10/2007, Buyean Lee <[log in to unmask]> wrote:
>
> Dear SPM users,
>
> I have checked the email list to find the answer for my simple question,
> but I couldn't.
>
> Somehow, PET to MRI coregistration is better than MRI to PET image, at
> least in my animal images.
>
>
> Would someone let me know how to apply the inverse transformation?
>
> In other words, I would like to generate the transformation matrix by
> running PET (source image) to MRI (reference image) coregistration, but I
> want to coregister MRI to PET by using the transformation matrix generated
> by PET to MRI coregistration like the general advice found in the FSL
> website (see below).
>
> I would like to do this in both SPM2 and SPM5.
>
> "Use the image with the best quality (tissue contrast and resolution) as
> the Reference image, otherwise poor registrations may occur (the inverse
> transformation can be found afterwards using the InvertXFM gui or the
> convert_xfm command-line utility)"
>
> Thank you,
>
> Buyean
> ________________________________
> Check Out the new free AIM(R) Mail -- Unlimited storage and
> industry-leading spam and email virus protection.
>
|