It's a left-division, rather than a right division. The idea is to map
from spgr voxels, to "mm space" to epi voxels. This involves
multiplying by the voxel-to-world matrix of the spgr to get to mm space,
and then multiplying by the inverse of the epi voxel-to-world matrix to
get to epi voxels:
T_m= spm_get_space('epi.img,1')\spm_get_space('spgr.img,1')
[X_epi; Y_epi; Z_epi; 1]=T_m * [X_spgr; Y_spgr; Z_spgr; 1]
Best regards,
-John
On Sat, 2009-08-08 at 02:37 +0100, Darryl Hwang wrote:
> I have two images from the same subject (SPGR and EPI) which are of
> different voxel sizes. I used the Coregister button in SPM8 and estimated
> and resliced the EPI (2x2x4mm) to SPGR space (1x1x1).
>
> The problem is I need the transformation matrix which maps each pixel in
> SPGR space back to a floating point voxel value in the EPI image. I hunted
> back in the archives and found a email posting that to get the
> transformation matrix, use
>
> spm_get_space('epi.img,1')/spm_get_space('spgr.img,1')
>
> where spgr.img is the reference image and epi.img is the image to reslice.
> This didn't give me the voxel to voxel mapping which I needed.
>
> My logic was as follows:
>
> T_m= spm_get_space('epi.img,1')/spm_get_space('spgr.img,1')
>
> [X_epi; Y_epi; Z_epi; 1]=T_m * [X_spgr; Y_spgr; Z_spgr; 1]
>
> As I said, this didn't work and I'm not sure why.
>
--
John Ashburner <[log in to unmask]>
|