I am in the midst of (attempting) to register DWI images to MNI space. While I would like to employ ANTS, but I have yet to figure out that pathway. (I use MRtrix for the transformation step because I assume MRtrix rotates the B table during the transformation. Can anyone confirm?) That said, I use FSL’s FLIRT pretty heavily. For my pipeline, I intend to register T1w images to an MNI image. For instance,
# Register T1w to MNI space
flirt -in "${t1w}" -ref "${mni}" -dof 12 -omat "affine.mat" -o "t1w2mni_temp.nii.gz"
transformconvert "affine.mat" "${t1w}" "${mni}" flirt_import "affine-mrtrixformat.txt"
mrtransform "${t1w}" "$t1w2mni.nii.gz" -linear "affine-mrtrixformat.txt"
# Register DWI to T1w space
flirt -in "${b0}" -ref "${t1w}" -dof 6 -omat "tmp.mat" -o "b02t1w.nii.gz"
flirt -in "${b0}" -ref "${t1w}" -dof 6 -cost bbr -wmseg "${t1w_wmseg}" -init "tmp.mat" \
-omat "b02t1-bbr.mat" -schedule "${FSLDIR}/etc/flirtsch/bbr.sch" -o "$b02t1w_temp.nii.gz"
transformconvert "b02t1-bbr.mat" "${b0}" "${t1w}" flirt_import "b02t1w-bbr-mrtrixformat.txt"
mrtransform "dwi.mif" "dwi2t1w.mif" -linear "b02t1w-bbr-mrtrixformat.txt"
See this link for why I use two FLIRTs in the DWI registration:
The last step would be to apply the T1w-MNI affine to the registered DWI
# Register DWI to T1w-MNI space
mrtransform "dwi2t1w.mif" "dwi2mni" -linear "affine-mrtrixformat.txt"