mesh_volume#

mesh_volume(region)[source]#

Compute the volume of a single region by meshing it

Parameters:

region (ndarray) – An image with a single region labelled as True (or > 0)

Returns:

volume – The volume of the region computed by applyuing the marching cubes algorithm to the region, then finding the mesh volume using the trimesh package.

Return type:

float

Examples

Click here to view online example.