Hello,
I would like to register my tractogram from DWI-space to MNI-space using both my linear b0-T1 rigid registration as well as my non-linear T1-MNI registration. I struggle a bit with the correct order of applying the transformations. I have seen several post discussing something similar such as Registration: using transformations generated from other packages and Registration, transformation, regridding: concepts however, I could not find anything specifically dicussing the correct order of applying linear & non-linear transformations from several registration steps.
I did the following:
1.) Generate a deformation field warp of the reference image (MNI152 template):
warpinit MNI152_T1_1mm_brain.nii.gz inv_identity_warp[].nii.gz
2.) Apply the transformation warp to the identity warp:
for i in {0..2}; do
antsApplyTransforms -d 3 \
-i inv_identity_warp${i}.nii.gz \
-o inv_mrtrix_warp${i}.nii.gz \
-r b0_brain.nii.gz \
-t "[T1_to_MNI152_0GenericAffine.mat, 1]" \
-t T1_to_MNI152_1InverseWarp.nii.gz \
-t "[b0_to_T1_rigid_0GenericAffine.mat, 1]" \
--default-value 2147483647
done
3.) Fix warp:
warpcorrect inv_mrtrix_warp[].nii.gz inv_mrtrix_warp_corrected.mif -marker 2147483647
4.) Check if transformation worked by transforming the MNI152 template to input space:
mrtransform MNI152_T1_1mm_brain.nii.gz -warp inv_mrtrix_warp_corrected.mif MNI152_warped.mif
5.) Transform .tck file to MNI152 space using inverse warp file:
tcktransform tck_ifod2_DWI.tck inv_mrtrix_warp_corrected.mif tck_DWI_to_2MNI.tck
Could you please clarify if the order of the transformation matrices applied in step 2 is correct?
Thank you for your help,
Franziska