- mesh_region(region: bool, strel=None)#
Creates a tri-mesh of the provided region using the marching cubes algorithm
im (ndarray) – A boolean image with
Truevalues indicating the region of interest
strel (ndarray) – The structuring element to use when blurring the region. The blur is perfomed using a simple convolution filter. The point is to create a greyscale region to allow the marching cubes algorithm some freedom to conform the mesh to the surface. As the size of
strelincreases the region will become increasingly blurred and inaccurate. The default is a spherical element with a radius of 1.
mesh – A named-tuple containing
valas returned by
- Return type:
Click here to view online example.