Thanks Mark for your hints!
I tried your suggestions this morning, but something has gone wrong.
There is a misplacement of the final images. I think it is due to
'qform' information.
I use Matlab to export my data (from a Bruker MRI scanner) and I create
ad-hoc 'qform' info from the scanner parameters. They are fine if I work
inside Matlab environment, they let me to correctly reslice all my
datasets and have all them centered and perfectly aligned. So I suppose
they are valid, no? But when I use the same information inside FSL,
comething is going wrong. What am I missing?
Another question: is there any place where I can find
information/documentation on how FLIRT uses orientation information and
affine matrices while it is performing/applying the registrations?
Alessandro
Mark Jenkinson ha scritto:
> Hi,
>
> This is actually a fairly advanced use that we haven't really been
> asked for before - it certainly isn't a standard newbie question!
> Most people don't yet have reliable qforms that they want to use, but
> I'm glad that you have.
>
> So although it is not part of the standard settings, it shouldn't be too
> hard to make this work. What you need to do is the following:
> 1 - register your t2w image to the standard and save the
> transformation (say t2w2std.mat file)
> 2 - for each other image that you want to use the qforms to align
> with the t2w image do:
> flirt -in otherimage -ref t2w -applyxfm -usesqform -omat
> other2t2w.mat
> 3 - concatenate the previous transform with the one from t2w to
> standard:
> convert_xfm -omat other2std.mat -concat t2w2std.mat other2t2w.mat
> 4 - apply this concatenate transform with flirt:
> flirt -in otherimage -ref standard -applyxfm -init other2t2w.mat
>
> This should hopefully work, as the second stage saves the flirt matrix
> which would align the two images based on their qforms. There could be
> problems if there are conflicting sforms or missing qforms, but try it
> first and let me know if you have any trouble.
>
> All the best,
> Mark
>
>
>
> On 18 Feb 2008, at 15:17, Alessandro Daducci wrote:
>
>> Hi everyone,
>> I'm a newbie in the field of medical image analisys and I need some
>> help.
>> I'm trying to use FLIRT to coregister a t2w dataset to a reference
>> template.
>> Until now all is fine. But I can't figure out how to use the output
>> affine
>> matrix in order to apply the same transformation to other datasets of
>> the
>> same animal (I work on rats' brains). I can do all the pipeline if I
>> reslice
>> every dataset to the magnet isocenter and the use FLIRT to coregister
>> one of
>> them to the reference and then applying the .mat to all the other
>> datasets.
>> All theese datasets can be acquired with different orientations and
>> dimension.
>>
>> But I'd like to do this:
>> 1) export data from the scanner and save into qform field its
>> transformation
>> without the need to reslice at this stage;
>> 2) use FLIRT to find out the affine matrix that let me to align a
>> particular
>> scan of the animal (t2w);
>> 3) use this matrix (and the qform information from all datasets) in
>> order to
>> apply it to every other dataset.
>>
>> Is it possible?
>>
>> I tried both with FSL bash scripts and MATLAB, but I can't
>> succesfully make
>> these operation.
>>
>> Can someone help me please?
>>
|