AIM-Harvard / pyradiomics

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
http://pyradiomics.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.14k stars 492 forks source link

[BUG] Compactness1 feature implementation seems wrong? #746

Closed skim2257 closed 2 years ago

skim2257 commented 2 years ago

Describe the bug The formula for Compactness 1 seems to be wrong? The original paper by Aerts et al, 2014 states compactness 1 to be V / (sqrt(pi) * A^(2/3)) as seen in the Supplementary Figures, page 14.

But the implemented code in radiomics/shape.py has the denominator: self.surface_area ** (3.0 / 2.0) instead of 2.0/3.0 as per the published formula.

I can push a quick PR if this makes sense to the authors/maintainers.

JoostJM commented 2 years ago

@skim2257, the difference is intentional and due to an error in the original paper. Using the 3/2 exponential results in a non-dimensionless value (i.e. the range of values is dependent on the volume or surface area, instead of being bounded to 0 < compactness <= 1 / (6 * pi) ).

See commit dd7e831.