Skip to main content

Function: getReferenceVolumeForSegmentation()

getReferenceVolumeForSegmentation(segmentationId): ImageVolume | BaseStreamingImageVolume

Retrieves the reference volume associated with a segmentation volume. This function first checks if the segmentation volume has a direct reference to a volume via referencedVolumeId. If not, it attempts to find the reference volume by looking up the first image in the segmentation's imageIds array, then finding its referenced image and the volume containing that image.

Parameters

segmentationId: string

The ID of the segmentation

Returns

ImageVolume | BaseStreamingImageVolume

The reference volume if found, or null if the segmentation volume doesn't exist or no reference volume could be determined

Defined in

tools/src/utilities/segmentation/getReferenceVolumeForSegmentation.ts:20