porespy.tools.mesh_region#
- porespy.tools.mesh_region(region: bool, strel=None, voxel_size=(1.0, 1.0, 1.0))#
Creates a tri-mesh of the provided region using the marching cubes algorithm
- Parameters:
im (ndarray) – A boolean image with
Truevalues indicating the region of intereststrel (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.
- Returns:
mesh – A named-tuple containing
faces,verts,norm, andvalas returned byscikit-image.measure.marching_cubesfunction.- Return type:
tuple
Examples
Click here to view online example.