Function: createUnionShape()
createUnionShape(
shapes):VoxelSlabShape
The union of several plane-anchored shapes, as one shape.
A brush that the user drags paints the union of one disc per sample along the stroke, and a single shape cannot describe that. Every member must share the annotation plane and the normal that the iterator is built with, because the runs of all members are emitted along one column axis.
The runs stay exact. Each member's runs are merged into a disjoint, ascending
sequence, so iterateVoxelsInShape visits a voxel that two members share
exactly once - which matters, because a fill that writes a voxel twice
records two undo entries for it.
Cost is proportional to the number of members per row, not per voxel. A
per-voxel containsPoint over the same members costs the member count for
every voxel of the bounding box instead.
See docs/docs/concepts/cornerstone-tools/annotation/voxel-statistics.md.
Parameters
• shapes: VoxelSlabShape[]
The members. An empty list gives a shape that contains nothing, which lets a caller build a union without a special case for a stroke that recorded no points.
Returns
Defined in
packages/core/src/utilities/voxelSlab/shapes/createUnionShape.ts:29