Coregistration parameters are stored as matrices in the qform and sform
parts of the header, as described in:
http://nifti.nimh.nih.gov/nifti-1
For simplicity, SPM mostly ignores the qform, and only reads the sform.
The only exception to this is the DARTEL code, which uses the qform of
the imported images and flow fields.
The contents of the matrices are such that voxels in one image can be
mapped to those in another via an affine transform, which is obtained by
inv(M1)*M2. Here, M1 and M2 would be the affine transform matrices in
the headers (note that MATLAB and SPM index voxels starting at 1,1,1,
whereas C and the raw NIfTI headers assume the indices start at 0,0,0).
Best regards,
-John
On Thu, 2009-11-12 at 00:56 -0800, Anthony Ta wrote:
> Dear all,
>
> It is mentioned that the parameters are store in image header file
> (.hdr) . May I know how exactly these are stored, for example which
> fields of the header are used?
>
> Thank you
>
>
>
> ______________________________________________________________________
> New Email addresses available on Yahoo!
> Get the Email name you've always wanted on the new @ymail and
> @rocketmail.
> Hurry before someone else does!
--
John Ashburner <[log in to unmask]>
|