The function "imInertiaEllipsoid" computes inertia coefficients of the 3D image, and returns the associated equivalent 3D ellipsoid. The function "drawEllipsoid" can be used to display result.
The package also contains function imInertiaEllipse, that returns equivalent ellipse for 2D images. Results is similar to that obtained with IPT function regionprops, but with different output format. The result can be used directly with function 'drawEllipse'.
Display of 3D image in the example requires the "slicer" contribution, also on FileExchange (ID 27983).
Package includes functions from geom2d and geom3d contributions.