morphogen.mesh.surface¶
Triangulated surfaces extracted from level-set or phase images (marching cubes).
- class morphogen.mesh.surface.SurfaceMesh(vertices: 'np.ndarray', faces: 'np.ndarray')[source]¶
Bases:
object
- morphogen.mesh.surface.surface_mesh(image: VoxelImage, *, level: float = 0.0, phase: int = 1, closed: bool = True) SurfaceMesh[source]¶
Surface of phase 1 from a level-set image (negative inside) or a phase image.
Phase images (integers) and partial-volume images (floats named
fraction) are converted to0.5 - indicator. Withclosed=Truethe solid is closed by caps on the faces of the box (watertight surface, e.g. for additive manufacturing).