# Can I calculate the feature "Ellipsoidity" of one 3D segmentation

**URL:** <https://discourse.slicer.org/t/can-i-calculate-the-feature-ellipsoidity-of-one-3d-segmentation/11750>\
**Category:** Radiomics\
**Tags:** segmentation, dicom\
**Created:** [May 28, 2020, 2:40pm UTC](https://discourse.slicer.org/t/can-i-calculate-the-feature-ellipsoidity-of-one-3d-segmentation/11750 "2020-05-28T14:40:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![yanpfei](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/yanpfei/32/6954_2.png) [@yanpfei](https://discourse.slicer.org/u/yanpfei)\
**Post date:** [May 28, 2020, 2:40pm UTC](https://discourse.slicer.org/t/can-i-calculate-the-feature-ellipsoidity-of-one-3d-segmentation/11750/1 "2020-05-28T14:40:37Z")

</div>

I am using pyRadiomics to analyzed 3D segmentation of tumors.

I noticed the feature " **Sphericity**" and it is very useful for tumor analysis. Besides this feauture, I want to calculate the " **Ellipsoidity**" of a tumor.  
When the tumor is in the shape of a very prolate or oblate ellipsoid, it would have a low sphericity but the ellipsoidity would be 1. So the featue “Ellipsoidity” could also be very useful.

Can I do this with pyRadiomics?  
Thank you in advance.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [May 28, 2020, 4:19pm UTC](https://discourse.slicer.org/t/can-i-calculate-the-feature-ellipsoidity-of-one-3d-segmentation/11750/2 "2020-05-28T16:19:37Z")

</div>

I don’t know what pyradiomics can compute, but you can use Slicer’s segment statistics module to compute many shape metrics: roundness, flatness, elongation, principal moments, principal axis directions, oriented bounding box diameters, Feret diameter, etc. This allows rich shape characterization, including assessing “ellipsoidity”.

See some more information in this topic:

> [@New Segment Statistics: Oriented Bounding Box, Diameter and More](https://discourse.slicer.org/t/new-segment-statistics-oriented-bounding-box-diameter-and-more/10203):
>
> New statistics have been added to the Segment Statistics module: Centroid Oriented bounding box Feret diameter Perimeter Roundness Flatness Elongation Principal axes/moments These statistics are not enabled by default. To enable them, click on the “Options” button beside the “Labelmap Statistics” checkbox, and select the statistics that you would like calculated from the popup window. You can read the documentation for the Segment Statistics module [here](https://slicer.readthedocs.io/en/latest/user_guide/module_segmentstatistics.html). Oriented bounding box:

---

<div class="post-metadata">

**Author:** ![JoostJM](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/joostjm/32/1091_2.png) [@JoostJM](https://discourse.slicer.org/u/JoostJM)\
**Post date:** [June 7, 2020, 9:06am UTC](https://discourse.slicer.org/t/can-i-calculate-the-feature-ellipsoidity-of-one-3d-segmentation/11750/3 "2020-06-07T09:06:36Z")

</div>

All shape features available in PyRadiomics can be found [here](https://pyradiomics.readthedocs.io/en/latest/features.html#module-radiomics.shape). This also includes principal axes length, but no specific “ellipsoidity” formula. Do you have a equation to calculate this?

---

<div class="post-metadata">

**Author:** ![yanpfei](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/yanpfei/32/6954_2.png) [@yanpfei](https://discourse.slicer.org/u/yanpfei)\
**Post date:** [June 7, 2020, 11:31am UTC](https://discourse.slicer.org/t/can-i-calculate-the-feature-ellipsoidity-of-one-3d-segmentation/11750/4 "2020-06-07T11:31:24Z")

</div>

Sorry for the late reply, I just noticed it.  
Thank you for the information. I’ll check 3D slicer.

---

<div class="post-metadata">

**Author:** ![yanpfei](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/yanpfei/32/6954_2.png) [@yanpfei](https://discourse.slicer.org/u/yanpfei)\
**Post date:** [June 7, 2020, 11:33am UTC](https://discourse.slicer.org/t/can-i-calculate-the-feature-ellipsoidity-of-one-3d-segmentation/11750/5 "2020-06-07T11:33:49Z")

</div>

I read papers that says it equals the ratio of one 3D object’s volume to the volume to the object’s fitting ellipsoid. And the fitting ellipsoid can be calculated this way:

Chaudhuri, B. B., & Samanta, G. P. (1991). Elliptic fit of objects in two and three dimensions by moment of inertia optimization. _Pattern Recognition Letters_ , _12_ (1), 1-7.
