Print

Print


Hi Paul, 

Thanks for the reply! It got lost in my e-mail, thus the late reply. 

So the problem with aligning the mask still persists and I've ran plenty of tests to try what could be the reason.

My question for now is, why is that after registering the mask (I tired -interp nearestneighbour, changing the -ref images, etc) it still seems at least few voxels away and thresholding it with fslmaths either breaks it completely - doesn't appear in FSLeyes at all or makes it patchy. I'm attaching the b0_BET image used to create the matrix. The masks for the sake of testing now was an FSL generated sphere and then FLIRT to register it with the diffusion data (after inverting the diff2struct matrix). 

The aim for our study, is to take a FreeSurfer provided atlas and HCPMMP1 labels to extract masks for few cortical regions and then use them for tractography. However, all FreeSurfer analyses were run on raw T1 files thus the need for registration of the masks. Maybe there is a better way to do that to spare the troubleshooting of the issues at hand? 

https://www.dropbox.com/s/ptnsfxliz9yh94q/ROI_reg.zip?dl=0

Thank you for your help! 

Best, 
Jacek 



On Fri, 28 Feb 2020 09:12:06 +0000, paul mccarthy <[log in to unmask]> wrote:

>Hi Jacek,
>
>Only one of -usesqform or -init should be used. -usesqform should be used if the s/q form matrices of each image project them into an aligned space - you can tell whether this is the case if the two images are aligned when you view them in FSLeyes.
>The -init option is used when you have pre-generated a registration between the two images.
>I'm not sure if the above explains the discrepancy you are seeing - if not, would you be able to share the relevant images and .mat file(s) so I could take a look? You can share via any file hosting service, or upload them to:
>https://oxfile.ox.ac.uk/oxfile/work/extBox?id=846819D4CDB94DAD45
>Paul
>On Feb 27 2020, at 9:50 pm, Chudy, Jacek (Stud. FPN / Alumni) <[log in to unmask]> wrote:
>> Dear Paul,
>>
>> Thank you for your suggestion! The registration worked great for whole-brain diffusion and T1 images, however the binary M1 mask still won’t register correctly.
>>
>> I’m running following set of commands:
>>
>> flirt -in R_4_ROI.nii.gz -ref Registration/mean_b0_preproc.nii.gz -init struc2diff.mat -applyxfm -o R_4_coreg.nii.gz -usesqform
>>
>> where R_4 is the M1 ROI, reference is mean b0 image of the diffusion and struc2diff was obtained using flirt on the anatomical and diffusion images.
>>
>> However, when I export the affine transformation for the R4, with reference of dwi_preprocessed data it works just fine… the content of the file is also much simpler, than one coming from -omat:
>>
>> 1.0000000000 0.0000000000 0.0000000000 -17.1602630615
>> 0.0000000000 0.0000000000 1.0000000000 -18.7639160156
>> 0.0000000000 -1.0000000000 0.0000000000 232.0000000000
>> 0.0000000000 0.0000000000 0.0000000000 1.0000000000
>>
>> What I get from the struct2diff is:
>>
>> 0.9999765335 -0.002714317341 -0.006291475993 15.97813891
>> 0.002736067949 0.9999903744 0.003451158066 -19.34800851
>> 0.006282047329 -0.003468290709 0.9999742553 6.834464249
>> 0 0 0 1
>>
>> Any ideas what might be wrong?
>>
>> Best,
>> Jacek
>>
>>
>> > On 25 Feb 2020, at 13:42, paul mccarthy <[log in to unmask] (mailto:[log in to unmask])> wrote:
>> > Hi Jacek,
>> > I think you want to use flirt with the -applyxfm and the -usesqform options.
>> > Cheers,
>> > Paul
>> > On Feb 25 2020, at 5:47 pm, Chudy, Jacek (Stud. FPN / Alumni) <[log in to unmask] (mailto:[log in to unmask])> wrote:
>> > > Dear FSL experts,
>> > >
>> > > I have a set of ROI files which are in a different coordinate spaces. However, when I open them in FSLeyes they are correctly transformed into same space and exporting the transformation using “Tools” and applying it to flirt works great.
>> > > I was wondering if there is a command that does the same transformation (aside from FLIRT which surprisingly on the data doesn’t work at all compared to FSLeyes GUI).
>> > > Thank you for your help.
>> > > Jacek
>> > >
>> > > ########################################################################
>> > > To unsubscribe from the FSL list, click the following link:
>> > > https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1
>> > >
>> >
>> >
>> > To unsubscribe from the FSL list, click the following link:
>> > https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1
>> >
>> >
>>
>>
>>
>>
>> To unsubscribe from the FSL list, click the following link:
>> https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1
>>
>
>
>########################################################################
>
>To unsubscribe from the FSL list, click the following link:
>https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1
>

########################################################################

To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1