FSL FNIRT not working

Hi everyone,

I have made a linear registration of my FLAIR MRI to a FLAIR MNI template with FSL FLIRT, and i am trying to make a non-linear registration with FNIRT.

I used this command:

fnirt --in=FLAIR_flirt.nii.gz --aff=FLAIR_flirt.mat --cout=FLAIR_fnirt --config=T1_2_MNI152_2mm --verbose

With FLAIR_flirt my nifti file from linear registration with flirt and FLAIR_flirt.mat the matrix.
My MRI has voxel pixdim of à 0.5mm and i don’t know if this has an incidence on the procedure.

The result has totally gone wild and i don’t know why, do you have any clue ?
Otherwise do you have tips of other software to make those non-linear registration of my FLAIR images …

Here is the result:

Thank you so much !
Benjamin

Hi @Benjamin_Leger,

I guess I am confused why you are using information from the linear transformation. Wouldn’t you want to run a new non-linear registration? Also, it is unclear which file from the linear registration you are using here without seeing your FLIRT command. I would think you would want to always use your original unregistered FLAIR as the input.

There’s always ANTs

Hi @Benjamin_Leger, in addition to the comments that @Steven made regarding the inputs to FLIRT, the --cout option saves the non-linear registration itself - a spline coefficient field. If, in addition to calculating the registration, you also want to transform your input image into the reference space, you need to use the --iout option (or follow up the fnirt call with a call to applywarp).