Hi all
I use flirt boundary based registration (bbr) to align diffusion and structural images.
flirt -in nodif_brain.nii.gz -ref structural_brain.nii.gz -dof 6 -omat tmp.mat
flirt -in nodif_brain.nii.gz -ref structural_brain.nii.gz -dof 6 -cost bbr -wmseg structural_WMseg.nii.gz -init tmp.nii.gz -omat diff_to_structural-bbr.mat -schedule $FSLDIR/etc/flirtsch/bbr.sch
where structural_WMseg.nii.gz is a white matter segmentation (binary image) from the structural image, e.g. from FSL FAST.
Then transform the flirt matrix to mrtrix format
transformconvert diff_to_structural-bbr.mat nodif_brain.nii.gz structural_brain.nii.gz flirt_import diff_to_structural-bbr-mrtrixformat.txt
And apply to the structural image
mrtransform structural.nii.gz -linear diff_to_structural-bbr-mrtrixformat.txt structural.coreg.nii.gz -inverse
When working with freesurfer, I usually use mri/nu.mgz as structural.nii.gz, and apply mri/brainmask.mgz to get structural_brain.nii.gz.
Cheers
Kerstin