Wrong number of shells after mrconvert

Dear all,

I’m attempting to try out fixel based analysis on a multishell dataset with the following shell configuration:
b-values: 0 100 700 1400 2000
directions: 1 6 6 12 16

When attempting to convert the data from NIfTI with fsl-gradient files to .mif files (I’ve also tried from DICOM) I get the wrong number and values of b-values.
b-values: 85.7143 700 1400 2000
directions: 7 6 12 16

This occurs for most but not all subjects.
This is the command I’ve used to convert:
mrconvert dwi.nii.gz ${subj}_LTE_mc.mif -fslgrad dwi.bvec dwi.bval -datatype float32 -stride 0,0,0,1

Any idea what could be the issue?

Best regards,

This is most likely related to rounding errors causing different groupings of shells (see here). The current dev branch has a reduced threshold of 80 and you should not see this issue with your data.

Alternatively, I think you could manually increase the b-values corresponding to the b-100 shell (or the vector norm, using our b-value scaling) by a small amount to counteract rounding issues. However, the cleaner solution is to use the development branch (git checkout dev; git pull; ./configure && ./build).

Thank you very much. This fixed the issue.

I’m still confused by why this problem only occured in some of the subjects. They all had 0 and 100 b-values. I’m not expecting an answer though.


Hi Mikael,

It’s probably because “100” is exactly the old threshold. So depending on small numerical deviations in the b-values as reported in your individual datasets (which might indeed differ ever so slightly, take a look at the mrinfo -dwgrad output for example), some might’ve fallen on the one and others on the other side of that threshold.

Hope that makes sense!