
Then I read your explanation and thought it might be because of the low signal intensity from the tumour. In the meantime, one simple trick that seems to fix it is to rectify the data to ensure it's Test_02 % dwi2response dhollander dwi.mif wm.txt gm.txt csf.txtĭwi2response: Generated scratch directory: /Volumes/CAMRI/Kio_project/Test_02/dwi2response-tmp-QF063C/ĭwi2response: Importing DWI data (/Volumes/CAMRI/Kio_project/Test_02/dwi.mif).ĭwi2response: Changing to scratch directory (/Volumes/CAMRI/Kio_project/Test_02/dwi2response-tmp-QF063C/)ĭwi2response: 2 unique b-value(s) detected: 0,1000 with 1,30 volumesĭwi2response: /usr/local/bin/dwi2response:118 (in execute())ĭwi2response: /usr/local/mrtrix3/lib/mrtrix3/dwi2response/dhollander.py:152 (in execute())ĭwi2response: statcrudenonwmcount = image.statistics('_crudenonwm.mif', mask='_crudenonwm.mif').countĭwi2response: /usr/local/mrtrix3/lib/mrtrix3/image.py:252 (in statistics()) I think we'll need to come up with a more robust way to handle these edge cases. This causes the value of log(b 0/b 1000) to be abnormally high, and when this is thresholded later using the automatic threshold determination, this single outlier throws off the determination of the threshold value (because the best correlation between mask and original image is the mask with the single outlier in it).

Regarding why you'd end up with this single-voxel mask, I've had a look through your data: it seems there is one voxel where the mean b=1000 signal is abnormally low (very close to zero). We should try to fix that special case so the standard deviation is properly reported as NaN or None, and try to provide a more helpful error message at this point. This means the standard deviation is reported as N/A, which Python then (rightly) refuses to convert to float. It looks like the refined_csf.mif image ends up with a single voxel for some reason.

I think this is what happens when the mask is (almost) empty.

Please consult the help page (-help option) for more information.ĭwi2response: Generated scratch directory: /bcs/junhong/MAP/data/017/time1/DTImrt2/dwi2response-tmp-KZJOBX/ĭwi2response: Importing DWI data (/bcs/junhong/MAP/data/017/time1/DTImrt2/beddytensors.mif).ĭwi2response: Changing to scratch directory (/bcs/junhong/MAP/data/017/time1/DTImrt2/dwi2response-tmp-KZJOBX/)ĭwi2response: Computing brain mask (dwi2mask).ĭwi2response: 3 unique b-value(s) detected: 0,1000,3000 with 14,60,60 volumesĭwi2response: * Eroding brain mask by 3 pass(es).ĭwi2response: * Computing signal decay metric (SDM):ĭwi2response: * Removing erroneous voxels from mask and correcting SDM.ĭwi2response: * Crude WM versus GM-CSF separation (at FA=0.2).ĭwi2response: ĭwi2response: * Crude GM versus CSF separation.ĭwi2response: Unhandled Python exception:ĭwi2response: ValueError: could not convert string to float: N/Aĭwi2response: /home/junhong/mrt/mrtrix3/bin/dwi2response:118 (in execute())ĭwi2response: /home/junhong/mrt/mrtrix3/lib/mrtrix3/dwi2response/dhollander.py:196 (in execute())ĭwi2response: statrefcsfcount = image.statistics('refined_csf.mif', mask='refined_csf.mif').countĭwi2response: /home/junhong/mrt/mrtrix3/lib/mrtrix3/image.py:252 (in statistics())ĭwi2response: result.append(ImageStatistics(float(line), float(line), float(line), float(line), float(line), float(line), int(line))) If its helpful, i've uploaded beddytensors.mif here dwi2response dhollander beddytensors.mif wm_response.txt gm_response.txt csf_response.txt -nthreads 20 -forceĭwi2response: Note that this script makes use of commands / algorithms that have relevant articles for citation. It appears that this error only occurs on 1 out of 91 of my subjects. Hi there, i've encounter the error below when running dwi2response.
