Anatomical Mask Registration for Tckgen


Hi All,

I’m looking for some guidance in performing tckgen with an anatomical mask as the seed image. I’m having trouble moving my mask into the native diffusion space before running tckgen. My mask is a grey matter, binary and is in MNI space.

I attempted to move my masks into native space of the DWI by executing the following:

flirt -in Preprocessed_DWI.nii.gz -ref MNI_152_Template.nii.gz -dof 6 -omat move.mat

transformconvert move.mat Preprocessed_DWI.nii.gz MNI_152_Template.nii.gz flirt_import move.txt

mrtransform mask_MNI.nii.gz -linear move.txt mask_Native.nii.gz -inverse

My thought was that I would move the DWI into MNI space and apply the inverse of that rigid transform to the mask, but its location appears to be way off.

Any guidance or advice would be greatly appreciated.



Hi Jamie,

Registration issues are very difficult to debug even when you have direct access to the images; without them it’s nigh impossible. Your steps seem reasonable, so it’s exceptionally difficult to know what’s going wrong.

My limited thoughts:

  • Try explicitly using the transformcalc command to invert the rigid transformation, and then run mrtransform without the -inverse option. Just on the off chance that that particular command-line option is misbehaving.

  • Allow flirt to output the DWI re-gridded to MNI space, and examine the output. This is a b=0 to (non-brain-extracted) T1 registration, which isn’t guaranteed to work perfectly in all scenarios. If flirt's registration is incorrect, then no amount of subsequent manipulation using MRtrix3 will correct the issue.

Best of luck!