Open-source python package for the extraction of Radiomics features from 2D and 3D images and binary masks. Support: https://discourse.slicer.org/c/community/radiomics
While doing my own segmentations, I got the error:
File "..../radiomics/imageoperations.py", line 268, in checkMask
raise ValueError('mask has too few dimensions (number of dimensions %d, minimum required %d)' % (ndims, minDims))
ValueError: mask has too few dimensions (number of dimensions 1, minimum required 2)
However, my mask dimensions are indeed correct. After some investigation, the segmentation basically only provided 2 pixels, and the bounding box calculation inside that function in imageoperations.py returns a flat box, thus raising the error.
I think erroring is correct, but the error message is wrong, as its not that the mask has "too few dimensions", I inputed a 3D np.array, it has the dimensions required. Its the numerical value of the mask that is not correct.
PyRadiomics configuration
Standard demo
To Reproduce
Input a 3D mask of the correct shape, but only have 2 adjacent pixels true.
Expected behavior
Output a message that describes the actual error.
Describe the bug
While doing my own segmentations, I got the error:
However, my mask dimensions are indeed correct. After some investigation, the segmentation basically only provided 2 pixels, and the bounding box calculation inside that function in
imageoperations.py
returns a flat box, thus raising the error.I think erroring is correct, but the error message is wrong, as its not that the mask has "too few dimensions", I inputed a 3D np.array, it has the dimensions required. Its the numerical value of the mask that is not correct.
PyRadiomics configuration Standard demo
To Reproduce Input a 3D mask of the correct shape, but only have 2 adjacent pixels true.
Expected behavior Output a message that describes the actual error.