Hi,
It depends on what your coordinate system conventions are and
what you want this matrix to do.
If you want it to work as a flirt matrix and your L matrix
converts mm coordinates to mm coordinates then this
sound about right, but without seeing the L matrix it
is hard to be sure. This is assuming that by (M-1) you mean
the inverse of M (where the first three entries in the fourth
column are positive).
Note that the centre of the image in terms of the 0,0,0 mm
point as defined by the MNI coordinate system is
(90,126,72) in voxel coordinates rather than (91,109,91).
So you'd need to be sure that that's what is right for your
L matrix.
The changing of the qform and sform codes to 3 is fine.
Also, if you want to create a flirt matrix then they work on
scaled voxel coordinates (the voxel coordinate multiplied
by the voxel sizes in mm) for *radiologically ordered* images.
If they are neurologically ordered then the x-coordinate is
swapped. This makes things invariant to storing the image
the other way around but makes the calculation of flirt
matrices slightly tricky in the neurological case.
I hope this helps.
All the best,
Mark
On 20 Feb 2009, at 20:55, John Ostuni wrote:
> I am currently using the Lancaster transform to convert images aligned
> to MNI template to images aligned with Talairach atlas.
>
> The method I am using seems to work well, but I thought I'd double
> check with you before I pass the scripts along.
>
> Since MNI dimensions are (91, 109, 91) at 2mm, I defined a translation
> matrix to center the image:
>
> M =1 0 0 -91
> 0 1 0 -109
> 0 0 1 -91
> 0 0 0 1
>
> and found T = (M-1)(L)(M)
> where L is the matrix defined by Lancaster for FSL data.
>
> Then I used flirt on the MNI aligned data using this matrix as input.
> Finally, I changed qform and sform to 3.
>
> Is this how you do it?
>
> Thanks,
> John
>
|