New Segment Statistics: Oriented Bounding Box, Diameter and More

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.

Oriented bounding box:

Feret diameter and centroid:

Principal axes and moments

For developers:
A new filter called vtkITKLabelShapeStatistics has been added to vtkITK that can be used to calculate the above statistics on any labelmap image.

An example script for visualizing segment OBB can be found here.
The ITK paper for the shape label filter can be found here.

11 Likes

Hello @Sunderlandkyl,
The statistics available in the module are fantastic and have helped me a lot, thank you.
I’m just not able to visualize the box, sphere and axes in 3D, as shown in the images. Could you help me with this issue?
Thank you very much and congratulations for the work.

You can copy-paste this code snippet into the Python console to display the bounding boxes.

1 Like

Thank you for your attention and for the quick response @lassoan . The boxes turned out fine. I am now looking for a script to display principal axes and moments. Do you know if there are any available?
Thank you very much

The box axes are the principal axes.

1 Like

Thank you! I appreciate the help :+1:

1 Like

3 posts were merged into an existing topic: Segmentation size measurements (craniocaudal length and max diameter) to table