'Computing maximum and minimum diameter of a 3D tubular shape

enter image description hereMy aim is to compute the maximum and minimum diameters of a slice of a 3D tubular shape (as shown in the attached figure). What I tried : several rotations of the skeleton of the shape to make it parallel to the Z axis and then cut the interpolated tubular shape at some voxel to get the slice. However these rotations make lot of interpolations. Hence, I would like to avoid these with a method that computes the diameters (max and min) without using rotations. Any help please?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source