Dwinormalise group FA_template is empty

My ultimate goal is to obtain diffusion metrics between two ROI masks that are registered to subject native space. As of now, I am just preprocessing and setting up a pipeline using 10 subjects. I am following this tutorial GitHub - jjmcfadyen/hcp-diffusion-dcm: Scripts used in Experiment 2 of my PhD, using tractography and DCM on the HCP dataset

So far I have applied the following commands:

1. dwidenoise
2. dwifslpreproc
3. dwi2mask
4. dwibiascorrect ants
5. dwit2tensor
6. dwi2metric
7. dwinormalise group

Results from each command look accurate including the WM_mask output, however, the FA_Template.mif file is a white/empty image.

using mrinfo:

Image name:          "FA_template.mif"
  Dimensions:        109 x 127 x 97
  Voxel size:        1.70312 x 1.70312 x 1.7
  Data strides:      [ -1 2 3 ]
  Format:            MRtrix
  Data type:         32 bit float (little endian)
  Intensity scaling: offset = 0, multiplier = 1
  Transform:                    1           0           0      -88.45
                                0           1           0      -89.56
                                0           0           1      -67.01
  command_history:   /usr/local/pyenvs/versions/miniconda3-latest/envs/mrtrix3_fsl/bin/dwinormalise group -scratch /ifs/MRTRIX/tmpDIR/ -nthreads 12 -info -force /ifs/MRTRIX/OUTPUT//cDWI /ifs//MRTRIX/OUTPUT//BrainMasks /ifs/MRTRIX/OUTPUT//Normalised FA_template.mif WM_mask.mif  (version=3.0.2)
  mrtrix_version:    3.0.2

I am not sure where/what went wrong. Advice appreciated.

I’ve also tried running:

dwi2response dhollander ${dir_out_sub}/DTI_${subject}_preproc.mif response_wm.txt response_gm.txt response_csf.txt -voxels voxels.mif 

dwi2fod csd ${dir_out_sub}/DTI_${subject}_preproc.mif response_wm.txt wmfod.mif -mask ${dir_out_sub}/cDWI_${subject}_mask.mif

and get:
dwi2fod: [ERROR] file “response_wm.txt” contains matrix, not vector
dwi2fod: [ERROR] CSD algorithm expects second argument to be the input response function file

I’m not sure why


I would say that the error you encounter here is because you should use msmt_csd in the dwi2fod call, even if you are using only single-shell data, because the dhollander algorithm counts the B0 as a b-value. Note that you can add as well the CSF response function to get a more accurate FODs.

Another thing, I believe that if your aim is to obtain FA values in different ROIs, you don’t need to normalize the images (the FA won’t change due to the normalization), and if you want to perform any comparisons of FODs (or FOD derived metrics across subjects) you could use mtnormalise (an average response function) to normalize directly the FODs. I hope this helps.

Best regards,


@mblesac Thanks for the reply. msmt_csd seems to work when I add the csf_response function and gm_response functions. However, mtnormalise errors when I include gmfod’s

mtnormalise wmfod.mif wmfod_norm.mif csffod.mif csffod_norm.mif gmfod.mif gmfod_norm.mif -mask ${dir_out_sub}/cDWI_${subject}_mask.mif -force
mtnormalise: [100%] performing log-domain intensity normalisation
mtnormalise: [ERROR] Non-positive tissue balance factor was computed. Balance factors: -nan -nan -nan


Are you using multi-shell data? if that it’s not the case, you have to drop the GM response function from the dwi2fod and mtnormalise.

Otherwise, take a look here, maybe it is the same problem you encounter.

Best regards,