Hi,
Short answer to this is use img2imgcoord, as that
lets you map voxel coordinates between images
using a flirt matrix. If, instead, you must have a
matrix then look at previous emails on the list about
how the coordinate conventions work for FLIRT.
I'm afraid it isn't simple, so I'd advise using
img2imgcoord if you can.
All the best,
Mark
On 6 Jan 2011, at 16:30, Silviu Podariu wrote:
> Hello there,
>
> I have a little puzzle to figure out, hope you could help.
>
> <> Short description:
>
> I found that the linear matrix 'flirt ... -omat a2b ...' outputs,
> i.e. a2b, is not the matrix to use for transforming between the
> coordinate systems fslview uses/displays for the two images (the
> voxel coordinates shown in fslview), and i was wondering if there
> is a way of getting the matrix of mapping between the two (maybe
> out of a2b which flirt outputs and something else?).
>
> <><><> Longer description:
>
> I have two images A and B to be linearly registered, say A onto B. I
> used flirt to do it and also to write the 4x4 xfn matrix, written in
> the a2b file above, which turned out to be M =
>
> 0.990167 0.108447 0.0377191 -10.7441
> -0.107399 0.99326 -0.0156399 9.04312
> -0.0405402 0.0153694 0.987652 44.6372
> 0 0 0 1 .
>
> Then i made a one-voxel mask on top of A, of coordinates
>
> 30.91, -1.33, 67.74
>
> and i mapped it in two ways onto the B space, first using flirt with
> the xfn matrix above in file a2b, then using matrix multiplication
> taking M*v, where (' = transpose)
>
> v' = ( 30.91, -1.33, 67.74, 1 )
>
> and i got
>
> 22.2728 3.3429 110.2672 1.0000 .
>
> On the other hand, flirt paints two neighboring voxels as the image,
> of average coordinates
>
> (22.17, 1.39, 68.37) .
>
> These are quite different, so the matrix written in a2b is not the matrix i
> should use when doing the calculation 'by hand'. The question is as above,
> how do i get the 'by hand' matrix out of M?
>
> Thank you,
> Silviu
> UNMC, Omaha
>
|