Dear All,
I'm new to FNIRT. Part of my work is to registrate AAL template to FA native space to construct white matter networks. And my FSL commands are as follows:
/usr/share/fsl/4.1/bin/flirt -ref /home/charile/data/FNIRT_test/MNI152_T1_2mm_brain.nii.gz -in /home/charile/data/FNIRT_test/ab100358_T1_brain.nii -omat /home/charile/data/FNIRT_test/transfer_affine.mat -bins 256 -cost corratio -searchrx -180 180 -searchry -180 180 -searchrz -180 180 -dof 12 -interp nearestneighbour
/usr/share/fsl/4.1/bin/fnirt --config=/usr/share/fsl/4.1/etc/flirtsch/T1_2_MNI152_2mm.cnf --ref=/home/charile/data/FNIRT_test/MNI152_T1_2mm_brain.nii.gz --in=/home/charile/data/FNIRT_test/ab100358_T1_brain.nii --aff=/home/charile/data/FNIRT_test/transfer_affine.mat --cout=/home/charile/data/FNIRT_test/nonlinear_transfer
/usr/share/fsl/4.1/bin/convert_xfm -omat /home/charile/data/FNIRT_test/T1_to_FA.mat -inverse /home/charile/data/FNIRT_test/ab100358_FA_to_T1.mat
/usr/share/fsl/4.1/bin/invwarp --ref=/home/charile/data/FNIRT_test/ab100358_T1_brain.nii.gz --warp=/home/charile/data/FNIRT_test/nonlinear_transfer.nii.gz --out=/home/charile/data/FNIRT_test/MNI_to_T1
/usr/share/fsl/4.1/bin/applywarp --ref=/home/charile/data/FNIRT_test/ab100358_Concatenated_DTIs_MD_C_E_native_FA.nii --in=/home/charile/data/FNIRT_test/AAL_Template/AAL_Labels.nii --warp=/home/charile/data/FNIRT_test/MNI_to_T1 --postmat=/home/charile/data/FNIRT_test/T1_to_FA.mat --out=/home/charile/data/FNIRT_test/AAL_to_FA --interp=nn
#The ab100358_T1_brain.nii file is the T1 image after the BET calculation with the original T1 image.
Unfortunately, the result was like garbage. So I checked the result image step by step. The fnirt result, registered T1 image to MNI152 template, were still good(I used --iout instead of --cout for checking), but the final image was totally destoryed after the applywarp step. I guess it might due to the invwarp function but I can't take it for sure.
Hope you experts could help me with this problem. Any suggestion would be appreciated.
Best wishes,
Charlie
|