Dear Thiago,
The steps that you are following are correct; this is exactly what
Mark suggested to me as well here:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=ind1403&L=FSL&P=R77094&1=FSL&9=A&J=on&d=No+Match%3BMatch%3BMatches&z=4
What causes this registration inconsistency is that you are using the
opposite matrices for the last call of flirt. So, it should be:
flirt -in scan1 -ref scan2 -applyxfm -init XX0002.mat -o sca1_halfway
-interp spline
flirt -in scan2 -ref scan1 -applyxfm -init XX0001.mat -o sca2_halfway
-interp spline
I hope that this will fix your problem.
Kind regards,
Vasilis
On 10 July 2014 19:50, Thiago Junqueira <[log in to unmask]> wrote:
> Dear all FSL expercts,
>
> I want to do a registration that is halfway between 2 MRI's from the same
> subjects. However, I have had some troubles in performing this task. The
> pipeline which I follow is listed bellow:
>
> flirt -in scan1 -ref scan2 -omat scan1_to_scan2.mat
> flirt -in scan2 -ref scan1 -omat scan2_to_scan1.mat
> convert_xfm -omat inv_scan2_to_scan1.mat -inverse scan2_to_scan1.mat
> midtrans -v -o mid_reg.mat scan1_to_scan2.mat scan2_to_scan1.mat
> midtrans - -separate=XX -o halfway_trans.mat mid_reg.mat ident.mat
> flirt -in scan1 -ref scan2 -applyxfm -init XX0001.mat -o sca1_halfway
> -interp spline
> flirt -in scan2 -ref scan1 -applyxfm -init XX0002.mat -o sca2_halfway
> -interp spline
> fslmaths sca1_halfway -add sca2_halfway -div 2 template_halfway_space
>
> But, the two images (sca1_halfway and sca2_halfway) have inconsistent
> orientations. Indeed, I look the registration of these images and they
> really are not under the same orientation. So I ask, How can I fix this
> problem? Is the pipeline correct? Did I understand the concept of halfway
> space correctly?
>
> All the best,
>
> --
> Thiago Junqueira Ribeiro de Rezende
> Medical Physicist, Msc in Neuroscience
> PhD Student in Neuroimaging
> Neuroimage Lab and Medical Physics Lab
> University of Campinas
> Phone: +55 19 98809-9476
|