Dwiextract specific volumes

I was trying to extract the B0 images from a dataset using dwiextract -bzero only to be told by my computer there were no B0 images.

Now upon closer inspection, there are indeed no EXACT B0, but a couple B10s i.e. a very low B value.
Apparently 10 is above the threshold to be considered “(approximately) zero” by dwiextract.
So I have been reading through the help on dwiextract

to find how to extract specific volumes for example in my case 1, 2 and 12.
The wish to extract a specified set of volumes seems a pretty standard fair to me?
I can fire up matlab to do this, but that would require exporting to .nii copying between computers etc etc.

To classify b-values up to 15 as b0 and extract these: dwiextract dwi.mif -bzero -config BZeroThreshold 15 b0.mif or, more generally for any volumes of interest: mrconvert -coord 3 0,4,8:2:end vols.mif.

You might want to set the b0 threshold also for other commands that extract shells or set the threshold globally in your config file.

Thanks Max
Especially the tip about changing the config file looking in the documentation

I guess it must be a < not a <= operation.
So I created a ~/.mrtrix.config file and put one entry
BZeroThreshold: 11

et voila it accepts the Bval 10 as zero…