mesh_region(region: bool, strel=None)[source]

Creates a tri-mesh of the provided region using the marching cubes algorithm

  • im (ND-array) – A boolean image with True values indicating the region of interest

  • strel (ND-array) – 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 strel increases the region will become increasingly blurred and inaccurate. The default is a spherical element with a radius of 1.


mesh – A named-tuple containing faces, verts, norm, and val as returned by scikit-image.measure.marching_cubes function.

Return type