SPM99 Gem 9: Rotations and translations from .mat files

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s