Hi John,
Actually, we don't normally worry about rotating the bvecs
as for most data we see a negligible difference. However,
it can make a difference in some circumstances and
theoretically it is nice to do.
As for the mapping, it is none of the options you suggested! ;)
The coordinates that the matrices map between are "flirt
coordinates" (from scan #n to the reference). This is what you'd
get with a zero translation qform scaling matrix (i.e. fourth column
of 0 0 0 1 and the diagonal equal to the mm voxel dimensions).
With that as the "Q" then it is option 1. However, if the real qform
has a positive determinant (what we call "neurological convention")
then the "Q" you'd need must also include a swap in the
x-axis (voxel 0 to voxel N-1, etc). If you do this for each "Q"
as needed, then option 1 is what you'd need. I know it is
annoyingly complicated, but we settled on this convention
well before nifti arrived on the scene (and largely due to
the analyze convention of the mni template) and have
always kept backwards compatibility with the original format.
Hope this helps.
All the best,
Mark
On 26 May 2011, at 11:38, John Ashburner wrote:
> Dear FSL list (MJ?),
> As you may have guessed, I'm not a regular FSL user, but Chris (my PhD
> student) is using it and wants to rotate his b-vectors. Derek Jones
> says it's a good idea for tractography (
> http://onlinelibrary.wiley.com/doi/10.1002/mrm.21890/pdf ). I'm
> therefore wondering what the matrices are that are spat out by the
> eddy current correction.
>
> I'm guessing that the mapping from [i,j,k,1]' indices in the reference
> scan, to those of the individual scans, is by one of the following
> (where Q0 is the Q/M-form matrix of the reference, Qn is the Q/M-form
> matrix of the individual scan, and T is the matrix written out to the
> text file by the eddy-current correction). I'm just not sure which it
> is.
>
> 1) inv(Qn)*T*Q0
> 2) inv(Qn)*inv(T)*Q0
> 3) T
> 4) inv(T)
>
> Voxels are isotropic, so it's not easy to tell whether the Q matrices
> are involved or not.
>
> The individual scans have been aligned with the reference. The plan
> is to compute [U,S,V]=svd(T(1:3,1:3)) and then reconstruct an SO(3)
> matrix from R=U*V'. Because I'm not sure which way the matrices go, I
> don't know whether rotation is better done using R*b, or R'*b.
>
> Any hints would be appreciated.
>
> All the best,
> -John
>
|