Skip to main content

Function: decimateContours()

decimateContours(segmentationId, segmentIndex, options): void

Decimates contour polylines for a given segmentation and segment using the Ramer-Douglas-Peucker algorithm. This reduces the number of points in the contour while preserving the overall shape within a specified tolerance.

Parameters​

• segmentationId: string

The unique identifier of the segmentation

• segmentIndex: number

The index of the segment within the segmentation

• options = ...

Configuration options for decimation

• options.epsilon: number

The maximum distance tolerance for point removal (default: 0.1)

Returns​

void

Defined in​

tools/src/stateManagement/segmentation/utilities/decimateContours.ts:28