Dwi2response dhollander debug mrthreshold warning

Hello @ThijsDhollander ,

Hope you are doing great. Recently, I got an issue while running dwi2response in debug mode. My command line is as follows:

dwi2response dhollander nii4D_N59021.nii wm.txt gm.txt csf.txt -voxels voxels.mif
dwi2fod msmt_csd wm_response.txt wm_fod.mif csf_response.txt csf.mif -mask mask.nii

I got a warning in debug mode which is as follows:

mrthreshold: [WARNING] Duplicate image values surrounding threshold; exact number of voxels influenced by numerical threshold may not match requested number

Would you please help me with how to ameliorate this warning? I am working on single shells mice data with b-value 0 and 3000.

Many Thanks,

I’m pretty sure you can ignore this warning. This results from asking the algorithm to pick some specific number (say 300) of voxels with the largest values, but it might happen that when you rank all the voxels in order of decreasing value, those at positions 299, 300 & 301 (for example) all have the same value. The algorithm is basically just saying that it can’t pick exactly 300 voxels unambiguously when that happens – and in this example it will provide a mask with 301 voxels (i.e. not necessarily what was requested / expected). Hope that makes sense…

Hello @jdtournier ,
Thank you very much for your response. I am using b=0 and b=3000 images. I hope dwi2response dhollander and ss3t_csd_beta1 for calculating FOD is fine.

I am waiting for your response.

Many Thanks,

Hi @suren,

Apologies I didn’t immediately reply. I don’t interact much with these fora anymore due to ongoing adversarial events from specific people.

Donald’s explanation covers this well: this warning is really only important for some people who use mrthreshold separately in their analyses or processing, or in their own scripts; when they expect mrthreshold to output a specific number of voxels. I’ve implemented dwi2response dhollander in such a way to not (strictly) depend on this, so this warning is not relevant in the context of dwi2response dhollander. When you run in debug mode, all commands called (e.g. mrthreshold) output their warning regardless of the context they’re used in. Put differently, mrthreshold “doesn’t know” that it doesn’t matter in this context, but still shows you the warning. So there’s no need to try to get rid of the warning, if that makes sense. :slightly_smiling_face:

Otherwise, yes, dwi2response dhollander indeed provides the full 3 WM-GM-CSF response functions even when you only have single-shell + b=0 data (as in your case), so the outputs can be used with SS3T-CSD. Feel free to contact me directly (via email) if you have any practical issues with this or if you’d like me to check your results to be sure.

All the best,
Thijs (Tuesday, 15-Mar-22 00:44:46 UTC)