Closed mluerig closed 4 years ago
Both answers looks correct - when you pick the label 255 for pyradiomics it is selecting all the outer elements, which are the small numbers and a mean around 3 is reasonable.
But masked arrays have a different meaning - the non-zero values are the "tainted" or "invalid" values, so you are selecting the inside values which are bigger and a mean of 40 looks good.
https://numpy.org/doc/stable/reference/maskedarray.generic.html
oh boy, seems so obvious now. thanks!
Describe the bug I am using pyradiomics in interactive mode on a lot of small 2D grayscale numpy arrays that are converted as suggested in https://github.com/Radiomics/pyradiomics/issues/546. However, the collected first order moments differ from what numpy calculates.
PyRadiomics configuration
To Reproduce Minimum example:
Version (please complete the following information):