Print

Print


Dear Sabrina,

I have a issue with FNIRT:

FNIRT creates a file pz1_warpcoef.nii.gz and when I open it is distorted (unrecognizable brain). I upload “fnirt” file in attach.
In the terminal I write: fnirt --ref=Desktop/MNI152_T1_1mm.nii.gz --in=Desktop/pz/pz1.T1.r.nii.gz --iout=pz1.r.iout --fout=pz1.r.fout

first of all it is recommended not to run fnirt using just the defaults. My suggestion if you want to register to the 1mm template would be to register to the 2mm template (MNI152_T1_2mm.nii.gz) using the T1_2_MNI152_2mm.cnf configuration file, and then resampling the input to the 1mm template using applywarp. Secondly, FNIRT typically need a decent starting guess, which you get from FLIRT. So run FLIRT with the same --ref and --in, specifying the -omat argument and then pass the output of that (the affine .mat file) to FNIRT using fnirt --ref= ... --aff=my_affine_transformation.mat ...

In the folder I find these files: pz1_to_MNI152_T1_1mm.log; pz1_warpcoef.nii.gz.

The _warpcoef file contains the non-linear warp that can be used to transform your image to the target (--ref) using applywarp. I am not sure why you don’t also get the --iout (warped --in image) or the --fout output, but I strongly suspect it has to do with the . in the filenames.

Jesper




Could someone have a look and tell me what I can do to fix this?
Many thanks for the help, and best regards.

<fnirt.png>