Uses marching cubes and mesh reduction to render the segmentation in 3 dimensions in a single mesh.

seg_mesh_build(
  segmentation,
  subset_str,
  pct_reduce = 0.1,
  puffiness = 1,
  verbose = FALSE
)

Arguments

segmentation

a `segmentation` class object

subset_str

a character vector indicating the structure(s) to be rendered, by acronym.

pct_reduce

numeric, target percentage of vertices for downsampling and remeshing. Closer to 0 gives a simpler mesh. Default is 0.1.

puffiness

numeric, determines a slight inflation of the mesh. Default is 1.

verbose

logical, show progress of the meshing? Default is FALSE.

Value

a reduced 3d mesh (as `mesh3d` object) from one or more structures