Problem with dwi2mask result

Hi all,
I am doing the data preprocessing, and I want to create a mask for further steps. However, the created mask after bias correction does not look descent. Some non-brain areas are included in the mask. Previous steps before creating mask are:
dwidenoise dwi.mif dwi_den.mif –noise noise.mif
mrdegibbs dwi_den.mif dwi_den_unr.mif –axes 0,1
dwipreproc dwi_den_unr.mif dwi_den_unr_preproc.mif –pe_dir AP –rpe_pair –se_epi b0_pair.mif –eddy_options “ --slm=linear”
dwibiascorrect -ants dwi_den_unr_preproc.mif dwi_den_unr_preproc_unbiased.mif -bias bias.mif
dwi2mask dwi_den_unr_preproc_unbiased.mif mask_den_unr_preproc_unb.mif
Here is the mask created after bias field correction :

Also, I applied dwi2mask to both unprocessed data and preproc (before biascorrection) data, as suggested by other post. The results did not differ. Creating a mask from preproc data introduces a large hole in the the midbrain.
mean b0 image:

Diffusion image after biascorrection :

Except bet from fsl, is there any other way to create mask from mrtrix?
Does it mean that output of biascorrection is also invalid to be imported as the input for the next step? (e.g. remaining bias field). I mean, maybe there is a problem in the preprocessing steps which could be problematic for further analysis.

The masking performed by dwi2mask is indeed far from perfect. In its defence, it was never really designed to be more than a quick way to get a rough mask to exclude most of the non-brain areas from further processing, purely for performance reasons (no point fitting models in noisy non-brain voxels). There is however not a lot that really requires the mask to be perfect. It’s ok if it includes a few non-brain voxels, all that will do is waste a few CPU cycles computing FODs from non-brain regions. It’s a much bigger problem if it excludes brain regions though (this unfortunately can happen, particularly if applied before bias field correction, as you’ve noted), but it doesn’t look like this is a problem here… (?)

However, the one thing that really relies on accurate segmentation is the ACT framework in tckgen – but that relies on an entirely different procedure anyway, you wouldn’t use dwi2mask for that.

1 Like