It depends how the transformation matrix is defined. If you want a pure
rigid-body mapping, then this can be obtained by:
spm_matrix(data(i,:))
If you want mappings from voxels in one image to those in another, then it is
probably easiest to obtain these from the matrices stored in the .hdr or
.mat, which can be obtained using the spm_get_space function. e.g. mapping
from indices (1..Nx, 1..Ny, 1..Nz) in image 2 to the corresponding indices in
image 1, then you could use...
spm_get_space('image1.img,1') \ spm_get_space('image2.img,1')
Best regards,
-John
On Friday 04 April 2008 12:45, Antonietta Pepe wrote:
> Dear SPMers,
>
> I?have a simple question about the interpretation of the realignment
> parameters saved in rp_*.txt file when using the "Realign:Estimate &
> Reslice" SPM function .
>
> The rp_*.txt file contains just a list of 12 numbers (e.g.
> 1.0103030e-014 1.2101431e-014 0.0000000e+000 0.0000000e+000
> -2.1734570e-051 -1.5616324e-016 -1.5004945e+001 2.6234784e+001
> 2.6747571e+001 -1.1082900e-001 -3.3493469e-002 -4.0569124e-002) but
> I?m not sure about how should I read them in order to build the
> related transformation matrix.
>
> Best regards,
> Antonietta
|