Registration of structural and diffusion weighted data

Just a comment.

Updated some old scripts that uses FLIRT for registration for this purpose. So the ref image is the highres structural image and moving image a suitable dwi image. Now with transformconvert you don’t have to bother with flipping dims for the subsequent mrtransform

So in principle it works like this:

flirt -in mov_brain.nii.gz -ref ref_brain.nii.gz -dof 6 -omat mov2ref.mat

transformconvert mov2ref.mat mov_brain.nii.gz ref_brain.nii.gz flirt_import mov2ref_mrtrix.txt

mrtransform -linear mov2ref_mrtrix.txt -inverse ref.nii.gz new_ref.nii.gz

Then the header qform is updated with the linear transformation (in this case only 6 dof) so that new_ref.nii.gz lives in moving-space.

5 Likes