SPM2 Gem 1: Transformation Matricies in SPM2 vs SPM99

Subject: Re: spm2b: spm_header_edit.m
From: John Ashburner <john@FIL.ION.UCL.AC.UK>
Date: Fri, 7 Feb 2003 19:09:38 +0000 (14:09 EST)

> Following your previous answer it looks like the origin is indeed set to
> the new value in the header, but also the  .mat file is written. In this
> file, I find two matrices: M and mat. I noticed that they are identical if
> defaults.analyze.flip = 0 but if defaults.analyze.flip = 1 one of them is
> flipped (M(1,4)=-mat(1,4)). Why are there two transformation matrices?

Backwards compatibility.  The M variable is for compatibility with SPM99,
whereas the mat variable is the one used for SPM2.  Images produced by
SPM2b that have a .mat file should be compatible between analyses with
different defaults.analyze.flip settings.  In other words, reading the
orientation of images with .mat files containing the mat field does not
require identifying the value of defaults.analyze.flip.  However, if the
orientation etc is read from an SPM99 .mat file, or from the .hdr, then
the defaults.analyze.flip variable is consulted.

If a .mat file exists, then it is read, otherwise the relevant information
is taken from the .hdr and defaults.analyze.flip.  If a mat variable exists
in the mat file then it is used, otherwise the orientation is derived from
the M variable and defaults.analyze.flip.

Best regards,

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 )

Facebook photo

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

Connecting to %s