Print

Print


Hello Wei,

> I did the coregistration and was able to get the transformation matrix
> by doing the following:
> x = spm_coreg(VG,VF);
> T = spm_matrix(x);
> Now I want to apply this transformation matrix to another image.  Is
> there a spm command to do that?

If you want to coregister an image to another, you can do something like

   x = spm_coreg(target,image-to-be-moved);
   M  = inv(spm_matrix(x));
   MM = spm_get_space(image-to-be-moved);
   spm_get_space(deblank(image-to-be-moved), M*MM);

Remember that order matters for the last line, so M*MM is not the same 
as MM*M (drove me crazy until John told me :)

Hope this helps,
Marko
-- 
=====================================================================
Marko Wilke                                            (Dr.med./M.D.)
                 [log in to unmask]

Universitäts-Kinderklinik              University Children's Hospital
Abt. III (Neuropädiatrie)             Dept. III (Pediatric neurology)
             Hoppe-Seyler-Str. 1, D - 72076 Tübingen
Tel.: (+49) 07071 29-83416                   Fax: (+49) 07071 29-5473
=====================================================================