Dear Mark and FSL users,
I face the same problem reported previously by Miguel Sotelo. I would like to register my DWI to MNI using T1 as an intermediate. The problem is that I would also like to include lesion_masks, which have been drawn both on T1 and FA_maps. First, I run bedpostx to create the xfms folder with the transformation matrices and then, following your advice, I do the Registration step via FDT GUI. However, I am still unsure of how to proper adapt the FDT registration script as to include the masks. Please, see the steps I’ve taken below. Do they sound reasonable or is there a more adequate way to achieve this registration?
#From the FDT GUI:
#1.DWI to T1 linear registration
flirt -in nodif_brain -ref T1_brain.nii.gz -omat /xfms/diff2str.mat -searchrx -90 90 -searchry -90 90 -searchrz -90 90 -dof 6 -cost corratio
convert_xfm -omat str2diff.mat -inverse xfms/diff2str.mat
#2. T1(betted) to MNI linear registration
flirt -in T1_brain.nii.gz -ref /usr/local/fsl/data/standard/MNI152_T1_2mm_brain -omat /xfms/str2standard.mat -searchrx -90 90 -searchry -90 90 -searchrz -90 90 -dof 12 -cost corratio
convert_xfm -omat /xfms/standard2str.mat -inverse /xfms/str2standard.mat
convert_xfm -omat /xfms/diff2standard.mat -concat /xfms/str2standard.mat /xfms/diff2str.mat
convert_xfm -omat /xfms/standard2diff.mat -inverse /xfms/diff2standard.mat
#3. T1 to MNI nonlinear registration with lesion_mask (drawn on T1)
fnirt --in= T1.nii --aff= /xfms/str2standard.mat --cout= /xfms/str2standard_warp --config=T1_2_MNI152_2mm --inmask=T1_lesion_mask
invwarp -w /xfms/str2standard_warp -o /xfms/standard2str_warp -r T1_brain.nii.gz
convertwarp -o /xfms/diff2standard_warp -r /usr/local/fsl/data/standard/MNI152_T1_2mm -m /xfms/diff2str.mat -w /xfms/str2standard_warp
convertwarp -o /xfms/standard2diff_warp -r nodif_brain_mask -w /xfms/standard2str_warp --postmat=/xfms/str2diff.mat
#4. DWI to T1 linear registration
flirt -in nodif_brain -ref T1_brain.nii.gz -omat /xfms/diff2str.mat -searchrx -90 90 -searchry -90 90 -searchrz -90 90 -dof 6 -cost corratio
#5.DWI to T1 nonlinear registration with lesion_mask (drawn on FA_map)
fnirt --in=nodif_brain --aff=diff2str.mat --cout=my_nonlinear_transf --config=T1_2_MNI152_2mm --inmask=dti_FA_lesion_mask
#6. Applywarp to finally register DWI to MNI:
applywarp --ref=${FSLDIR}/data/standard/MNI152_T1_2mm --in=nodif_brain --warp=my_nonlinear_transf --premat=diff2str.mat --out=my_warped_diff
I really appreciate any help!
Cheers from Brazil,
Joselisa
|