Print

Print


Hi,

What you need to do is to take the transform matrix from diffusion
space to standard space and run avscale on this.  From this you
need to extract the 3x3 rotational part from the first matrix output
(Rotation & Translation Matrix).  Then you just multiply the individual
b-vectors (as column vectors) by this matrix to get the new vectors.
Note that you cannot just use the input to avscale as this contains
scalings and skews (to compensate for eddy current effects) that
you do not want to affect your vectors.

I'm afraid that we don't have any scripts for doing this.
However, you could use img2imgcoord -mm to perform the matrix
calculations within a script.  I would probably use something
like matlab though, as it will be easier for this.

All the best,
	Mark




On 3 Jan 2007, at 10:10, kl chen wrote:

> Dear Tim and FSL experts,
> Could I ask a following question? Did anyone know how to transorm  
> the raw
> b-vectors into new b-vectors use the transformation matrix ? Is  
> there any
> script to do it ?
> sincerley
> kl chen
>
> On Tue, 2 Jan 2007 09:30:40 +0000, Tim Behrens  
> <[log in to unmask]>
> wrote:
>
>> Hi - I don't think you can estimate, and apply a transform to a 4D
>> image simultaneously.
>>
>> I think you need to do the following:
>>
>> 1) Register the b=0 image to the MNI template using FLIRT and save
>> the transformation matrix.
>> 2) Apply this transformation matrix to the full 4D volume (using
>> ApplyXFM)
>>
>> This will then save all of your volumes in the output.
>>
>> Remember that you will have to rotate the b-vectors as well if you
>> want your fitted diffusion tensors to make sense.
>>
>> T
>>
>> On 2 Jan 2007, at 09:08, Anna Rotarska-Jagiela wrote:
>>
>>> Dear FSL expersts,
>>> I’m trying to align my raw DTI data using FLIRT and write it out in
>>> Analyze
>>> format.
>>> Here is what I did: I created a single Analyze file of raw DTI  
>>> data (7
>>> volumes, 6 directions + b0), did EPI distortion correction and
>>> saved it
>>> again as a single Analyze file. Then I opened FLIRT window,
>>> selected input
>>> image (a single Analyze EPI-corrected file with 7 volumes), named
>>> output
>>> image. I left all the other setting at default, including the
>>> reference
>>> image, i.e. MNI template. I clicked on go and checked the results
>>> in MRIcro.
>>> Here is the problem: The alignment worked fine, but the volumes got
>>> lost. I
>>> can only open the first, b0 volume. MRIcro doesn’t ask anymore
>>> which volume
>>> it should show (1 through 7) like it did with EPI-corrected image.
>>> It only
>>> recognizes the first one.
>>> Here is the question: What did I do wrong? How do I align all 7
>>> volumes and
>>> save them back to a single Analyze file?
>>> I would appreciate your help.
>>> Thank you.
>>>
>>> Anna
>> ===================================================================== 
>> ===