Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,16 @@ const segmentationRepresentationModifiedCallback = async (
}

// Ensure the segmentation representation aligns with the target viewport type.
const type: Enums.SegmentationRepresentations =
viewport.type === CoreEnums.ViewportType.VOLUME_3D
? Enums.SegmentationRepresentations.Surface
: ((segmentationRepresentationType as Enums.SegmentationRepresentations) ??
Enums.SegmentationRepresentations.Labelmap);
const is3D = viewport.type === CoreEnums.ViewportType.VOLUME_3D;
const requestedRepresentation =
segmentationRepresentationType as Enums.SegmentationRepresentations;
const { Surface, Contour, Labelmap } = Enums.SegmentationRepresentations;

const type: Enums.SegmentationRepresentations = is3D
? Surface
: requestedRepresentation === Contour
? Contour
: Labelmap;
Comment thread
nithin-trenser marked this conversation as resolved.
Outdated

await segmentationService.addSegmentationRepresentation(targetViewportId, {
segmentationId,
Expand Down
Loading