I have DWI data with one volume for b=0, 500, 1000 and would like to use dwi2mask to extract a brain mask. dwi2mask gives me the following warning:

dwi2mask: [WARNING] The following image volumes were not successfully assigned to a b-value shell:
dwi2mask: [WARNING] 1 (500), 2 (1000)

Does this mean, only b=0 is considered for creating the mask?


Hi Christina.

How did you create your dwi.mif file? Looks like the bval is incorrect.

To check the bval:

mrinfo dwi.mif - export_grad_fsl bvec.txt bval.txt

Open the bval.txt and see what values it contains.

How many b500 and b1000 volumes do you have?


Hi Jerome,

I don’t have mif but nifti files. How would I convert DICOM to mif? mrconvert complains about “unsupported transfer syntax found in DICOM data” - dcm2niix handles this transfer syntax.

bval: 0 500 1000, and I have one volume for each b-value.


Hi Christina,

To clarify:

-You only have the .nii file, but no bvec or bval?
-Each of your shells (0,500,1000) only has 1 single volume? dMRI needs at least 6 directions (volumes) for each of the 500 and 1000 shells.
-Do you have the dicoms?

Feel welcome to send me your data and I will have a look.


To clarify, this means your DICOM data have been stored using something like JPEG compression. It’s in the DICOM standard, but optional. We don’t (yet) support this, so using dcm2niix is indeed your best bet here.

That’s indeed the reason for the warning in dwi2mask: it does expect to find at least that many volumes per shell – the minimum required to characterise angular features. If the command completes nonetheless, there’s a good chance that it is indeed using only the b=0 data, ignoring the rest. I don’t know whether that’s enough to get a good mask, but you should be able to have a look at the results to judge for yourself.

It looks like you have a single volume per b-value. I suspect this is a trace-weighted image. There’s not a lot you can do with data of this nature in MRtrix. For the masking itself, I think you would be best advised to use FSL bet. But you won’t be able to perform CSD or even DTI fitting with these data.