White matter mask from diffusion MRI

Hi all,

How to create a white matter mask for a diffusion MRI file with 32 acquisitions?


Does “32 acquisitions” mean “32 diffusion weighted images (DWIs)”, in that you have 32 volumes in your diffusion protocol, with either nonzero diffusion weighting or b=0 s/mm^2?

One way to go is use these these datasets to estimate diffusion tensors (in AFNI, 3dDWItoDT) and accompanying scalar parameters (FA, MD, eigenvalues) and vector parameters (the eigenvectors showing how the tensor/spheroid is oriented in space).

In most humans >5 years old, a good approximation to a WM map is where FA>0.2. For neonates, one might try FA>0.1. In other cases… it might be less clear, but one could start with these values and see how that goes.

It is really important to note that most acquired DWIs contain significant artifacts: from subject motion, from eddy currents (due to turning the DW gradients on and off quickly) and from EPI distortion (via phase encoding effects). These artifacts can all occur at the same time, making them hard to separate-- life is hard. But you want to make sure to perform as good of distortion correction as possible (= distortion reduction), and TORTOISE (https://tortoise.nibib.nih.gov/) is a good+publicly available tool for this. It can be combined with other software; a demo about processing your data with AFNI+TORTOISE (and FreeSurfer, for other applications) is available here:


Hi @ptaylor,

Sorry for the late reply.

I have a .nii file in which I have 33 volumes with the first volume b = 0 and the remaining 32 volumes with b = 1000 s/mm2 but different combinators of (x,y,z). Thanks for the suggestions I will try that out.


Hi @RS_A,

I think any software that can create a mask may be useful. Just separate a single volume with b=0 image, and use bet2 (in FSL), dwi2mask (in MRtrix3) or median_otsu (in Dipy). Any function is fine. But, there may be some cliche to tackle, if the mask has some holes. The holes in the mask can be removed by filling holes using fslmaths (in FSL - fill NANs), or filtering the mask, (dilating, eroding, median and so on). Remember that the bias-field uncorrected data may produce mask with holes.

I hope I answered your question. Let me know if you have any further queries.