Open jaja123j opened 11 months ago
Hi,
The usage that you initially quote is quite different to what was executed that generated the error.txt
that you then quote. The former invokes the msmt_5tt
algorithm and does not provide a mask; the latter invokes the tournier
algorithm and does provide a mask. So you may have mixed up contents from different scratch directories.
The error message is not as informative as it could be; but it's actually the very code that's trying to produce a more informative error message for you that's producing the uninformative message! :-/
Almost certainly what has happened in the second case is that the mask you have provided, "wm_mask.mif
", is completely empty. If you run mrstats wm_mask.mif
, you should get both a minimum and maximum of zero.
From a development perspective, we need to either:
image.statistics()
to yield a valid result, but filled with NaN for statistics and 0 for count, if mrinfo
yields a non-zero return code (and ideally also the cause of that non-zero return code is an empty image)mrinfo
to write NaN for explicitly requested fields rather than throwing an exception if no values are readimage.statistics
to catch a specific exception class, rather than checking for count being equal to zero.1 makes sense to me I think; it's less intrusive, is consistent with the pretty-print usage of mrstats
, and code to check the result is still short.
Thanks for replying!I've used another subjects diffusion MRI data for preprocessing,and a part of them won't have error,which is a large part.I think maybe the problem comes from data.I will try to use data without problems.
I install a mrtrix3 and its version is 3.0.4,but the error comes when I run the following line
dwi2response msmt_5tt align.mif 5ttseg.mif ms_5tt_wm.txt ms_5tt_gm.txt ms_5tt_csf.txt \
-voxels ms_5tt_voxels.mif -force
Here is the content of the error.txt: