public class ZSlicer extends Object
Round vertices positions and plane position to even and odd multiples of a small fraction of the mesh size, so that they don't intersect. Build contours by iterating from an intersecting edge to the adjacent one, with a determined orientation (CCW for interior contours). The contours returned "know" whether they limit the interior or exterior of the mesh.
Inspired from https://github.com/rminetto/slicing/blob/main/code-python/slicer.py#L377
| Constructor and Description |
|---|
ZSlicer() |
| Modifier and Type | Method and Description |
|---|---|
static Slice |
slice(Mesh mesh,
double z,
double zScale)
Slice a mesh by a Z-plane.
|
static List<Slice> |
slices(Mesh mesh,
double[] zs,
double zScale) |
public static Slice slice(Mesh mesh, double z, double zScale)
mesh - the mesh to slice. Not modified.z - The Z position of the XY plane to slice through.zScale - some scale in Z (such as the pixel size in Z), used to shift
the vertices and Z-plane position by a small fraction of this
size.Contour objects.Copyright © 2016–2023 ImgLib2. All rights reserved.