Skip to main content

Function: getSegmentationRepresentations()

getSegmentationRepresentations(viewportId, specifier): SegmentationRepresentation[] | []

Retrieves segmentation representations for a specific segmentation in a given viewport.

Parameters

viewportId: string

The ID of the viewport.

specifier = {}

specifier.segmentationId?: string

specifier.type?: SegmentationRepresentations

Returns

SegmentationRepresentation[] | []

An array of SegmentationRepresentation objects or an empty array if no representations are found.

Remarks

This method filters the segmentation representations based on the provided specifier. If no specifier is provided, it returns all segmentation representations for the viewport. if only the segmentationId is provided, it returns all representations of the segmentation. if only the type is provided, it returns all representations of the type. if both the segmentationId and type are provided, it returns all representations of the segmentation with the given type which will be an array of length 1

Defined in

tools/src/stateManagement/segmentation/getSegmentationRepresentation.ts:20