Error using dwifslpreproc

Dear MRtrix experts,

I tried to process a sequence of IVIM imagings, after convert to mif and denoise, I used the following code

dwifslpreproc test_dwi_denoise.mif test_dwi_denoise_preproc.mif -pe_dir AP -rpe_none

However, it cause some WARNING and ERROR

mrinfo: [WARNING] The following image volumes were not successfully assigned to a b-value shell:
mrinfo: [WARNING] 9 (300), 10 (400), 11 (500), 12 (600), 13 (700), 14 (800), 15 (900)
Command:  dirstat dwi.mif -output asym
mrinfo: [WARNING] The following image volumes were not successfully assigned to a b-value shell:
mrinfo: [WARNING] 9 (300), 10 (400), 11 (500), 12 (600), 13 (700), 14 (800), 15 (900)

dwifslpreproc: [ERROR] Unhandled Python exception:
dwifslpreproc: [ERROR]   AssertionError: 
dwifslpreproc: [ERROR] Traceback:
dwifslpreproc: [ERROR]   /opt/mrtrix3-3.0.2/bin/dwifslpreproc:328 (in execute())
dwifslpreproc: [ERROR]     assert all(index >= 0 for index in vol2shell)

It will be great help if some experts could point out the problem and how to fix it.
Thanks so much!

The issue here is two-fold – and I’m not sure we can get around it.

First, IVIM data tend to have far lower b-values, and this is going to cause trouble for the shell clustering algorithm, which assumes that you have sets of volumes with the same (or similar) b-values, and that each of these sets has a clearly distinct b-value from the other sets. For most of our applications, we assume volumes belong to different shells if their b-values differ by more than 80 s/mm² – this value can be modified by setting the BValueEpsilon config file option (or directly on the command line by adding the e.g. -config BValueEpsilon 50). This may get around most of the issue.

The second issue is that shells are expected to contain a sufficient number of volumes, and your IVIM data may not meet these requirements either. For our purposes, the shell clustering in MRtrix expects each (b>0) shell to contain at least 6 volumes. But the requirements for FSL’s eddy (which dwifslpreproc relies on) may differ, and this is outside of our control. You may find that adding this to your dwifslpreproc call helps:

dwifslpreproc ... -eddy_options " -slm=linear --data_is_shelled"

Hi @jdtournier,

Many thanks for your reply, it is very helpful.

Cheers,
JQ