Subject: Re: rot+trans
From: John Ashburner <john@fil.ion.ucl.ac.uk>
Date: Fri, 6 Oct 2000 16:15:23 +0100 (BST)
To: spm@mailbase.ac.uk, pauna@creatis.insa-lyon.fr
| 1 how can I find the transformations
| (rot+translations) from the transformation matrix?
The relative translations and rotations between a pair of images
is encoded in the .mat files of the images. So for images F.img and
G.img, you would find the transformation by:
% The mat file contents are loaded by:
MF = spm_get_space('F.img');
MG = spm_get_space('G.img');
% A rigid body mapping is derived by:
MR = MF/MG; % or MR = MG/MF;
% From this, a set of rotations and translations
% can be obtained via:
params = spm_imatrix(MR)
% See spm_matrix for an explanation of what these
% parameters mean