Skip to main content

Types

Index

Namespaces

AnnotationStyle

AnnotationStyle:

AnnotationStyle

AnnotationStyle: { [ key in `${Properties}${States}${Modes}` ]?: string }

StyleConfig

StyleConfig: { annotations?: {}; default: ToolStyleConfig; toolGroups?: {}; viewports?: {} }

Type declaration

  • optionalannotations?: {}
    • [annotationUID string]: AnnotationStyle
  • default: ToolStyleConfig
  • optionaltoolGroups?: {}
    • [toolGroupId string]: ToolStyleConfig
  • optionalviewports?: {}
    • [viewportId string]: ToolStyleConfig

StyleSpecifier

StyleSpecifier: { annotationUID?: string; toolGroupId?: string; toolName?: string; viewportId?: string }

Type declaration

  • optionalannotationUID?: string
  • optionaltoolGroupId?: string
  • optionaltoolName?: string
  • optionalviewportId?: string

ToolStyleConfig

ToolStyleConfig: {} & { global?: AnnotationStyle }

CINETypes

CINETypes:

ToolData

ToolData:

optionaldynamicCineEnabled

dynamicCineEnabled?: boolean

frameTimeVector

frameTimeVector: number[]

framesPerSecond

framesPerSecond: number

ignoreFrameTimeVector

ignoreFrameTimeVector: boolean

intervalId

intervalId: number

lastFrameTimeStamp

lastFrameTimeStamp: number

loop

loop: boolean

reverse

reverse: boolean

speed

speed: number

usingFrameTimeVector

usingFrameTimeVector: boolean

CinePlayContext

CinePlayContext: { waitForRenderedCount?: number; currentStepIndex: any; frameTimeVectorEnabled: any; numScrollSteps: any; scroll: any }

Type declaration

  • optionalwaitForRenderedCount?: number
  • get currentStepIndex(): number
  • get frameTimeVectorEnabled(): boolean
  • get numScrollSteps(): number
  • scroll: function
    • scroll(delta: number): void

    • Parameters

      • delta: number

      Returns void

PlayClipOptions

PlayClipOptions: { dynamicCineEnabled?: boolean; frameTimeVector?: number[]; frameTimeVectorSpeedMultiplier?: number; framesPerSecond?: number; loop?: boolean; reverse?: boolean; waitForRendered?: number }

Type declaration

  • optionaldynamicCineEnabled?: boolean
  • optionalframeTimeVector?: number[]
  • optionalframeTimeVectorSpeedMultiplier?: number
  • optionalframesPerSecond?: number
  • optionalloop?: boolean
  • optionalreverse?: boolean
  • optionalwaitForRendered?: number

EventTypes

EventTypes:

AnnotationAddedEventDetail

AnnotationAddedEventDetail: { annotation: Annotation; renderingEngineId?: string; viewportId?: string }

The data that is passed to the event handler when a new annotation is added to the annotations.


Type declaration

  • annotation: Annotation

    The annotation that is being added to the annotations manager.

  • optionalrenderingEngineId?: string

    unique id of the rendering engine

  • optionalviewportId?: string

    unique id of the viewport

AnnotationAddedEventType

AnnotationAddedEventType: Types.CustomEventType<AnnotationAddedEventDetail>

The AnnotationAdded event type

AnnotationCompletedEventDetail

AnnotationCompletedEventDetail: { annotation: Annotation; changeType?: ChangeTypes.Completed }

The data that is passed to the event handler when a new annotation is completed drawing on the viewport.


Type declaration

  • annotation: Annotation

    The annotation that is being added to the annotations manager.

  • optionalchangeType?: ChangeTypes.Completed

AnnotationCompletedEventType

AnnotationCompletedEventType: Types.CustomEventType<AnnotationCompletedEventDetail>

The AnnotationCompleted event type

AnnotationInterpolationCompletedEventDetail

AnnotationInterpolationCompletedEventDetail: { annotation: InterpolationROIAnnotation; element: HTMLDivElement; renderingEngineId: string; viewportId: string }

Type declaration

  • annotation: InterpolationROIAnnotation

    The annotation that is being updated with a change in label.

  • element: HTMLDivElement

    The HTML element that the annotation was rendered on.

  • renderingEngineId: string

    unique id of the rendering engine

  • viewportId: string

    unique id of the viewport

AnnotationInterpolationCompletedEventType

AnnotationInterpolationCompletedEventType: Types.CustomEventType<AnnotationInterpolationCompletedEventDetail>

The Annotation interpolation process completed event type

AnnotationInterpolationRemovedEventDetail

AnnotationInterpolationRemovedEventDetail: { annotations: InterpolationROIAnnotation[]; element: HTMLDivElement; renderingEngineId: string; viewportId: string }

Type declaration

  • annotations: InterpolationROIAnnotation[]

    The annotations that is being removed .

  • element: HTMLDivElement

    The HTML element that the annotation was rendered on.

  • renderingEngineId: string

    unique id of the rendering engine

  • viewportId: string

    unique id of the viewport

AnnotationInterpolationRemovedEventType

AnnotationInterpolationRemovedEventType: Types.CustomEventType<AnnotationInterpolationRemovedEventDetail>

The Annotation interpolation removed event type

AnnotationLockChangeEventDetail

AnnotationLockChangeEventDetail: { added: Annotation[]; locked: Annotation[]; removed: Annotation[] }

The data that is passed to the event handler when an annotation lock status changes.


Type declaration

AnnotationLockChangeEventType

AnnotationLockChangeEventType: Types.CustomEventType<AnnotationLockChangeEventDetail>

The AnnotationLockChange event type

AnnotationModifiedEventDetail

AnnotationModifiedEventDetail: { annotation: Annotation; changeType?: ChangeTypes; renderingEngineId: string; viewportId: string }

The data that is passed to the event handler when an annotation is modified.


Type declaration

  • annotation: Annotation

    The annotation that is being added to the annotations manager.

  • optionalchangeType?: ChangeTypes

    The type of this change

  • renderingEngineId: string

    unique id of the rendering engine

  • viewportId: string

    unique id of the viewport

AnnotationModifiedEventType

AnnotationModifiedEventType: Types.CustomEventType<AnnotationModifiedEventDetail>

The AnnotationModified event type

AnnotationRemovedEventDetail

AnnotationRemovedEventDetail: { annotation: Annotation; annotationManagerUID: string }

The data that is passed to the event handler when an annotation is completed drawing.


Type declaration

  • annotation: Annotation

    The annotation that is being added to the annotations manager.

  • annotationManagerUID: string

    annotationManagerUID

AnnotationRemovedEventType

AnnotationRemovedEventType: Types.CustomEventType<AnnotationRemovedEventDetail>

The AnnotationRemoved event type

AnnotationRenderedEventDetail

AnnotationRenderedEventDetail: { element: HTMLDivElement; renderingEngineId: string; viewportId: string }

The data that is passed to the event handler when an annotation selection status changes.


Type declaration

  • element: HTMLDivElement

    The HTML element that the annotation was rendered on.

  • renderingEngineId: string

    unique id of the rendering engine

  • viewportId: string

    unique id of the viewport

AnnotationRenderedEventType

AnnotationRenderedEventType: Types.CustomEventType<AnnotationRenderedEventDetail>

The AnnotationRendered event type

AnnotationSelectionChangeEventDetail

AnnotationSelectionChangeEventDetail: { added: string[]; removed: string[]; selection: string[] }

The data that is passed to the event handler when an annotation selection status changes.


Type declaration

  • added: string[]

    AnnotationUID added to the selection

  • removed: string[]

    AnnotationUID removed from the selection

  • selection: string[]

    Updated selection

AnnotationSelectionChangeEventType

AnnotationSelectionChangeEventType: Types.CustomEventType<AnnotationSelectionChangeEventDetail>

The AnnotationSelectionChange event type

AnnotationVisibilityChangeEventDetail

AnnotationVisibilityChangeEventDetail: { hidden: string[]; lastHidden: string[]; lastVisible: string[] }

Type declaration

  • hidden: string[]
  • lastHidden: string[]
  • lastVisible: string[]

AnnotationVisibilityChangeEventType

AnnotationVisibilityChangeEventType: Types.CustomEventType<AnnotationVisibilityChangeEventDetail>

The AnnotationVisibilityChange event type

ContourAnnotationCompletedEventDetail

ContourAnnotationCompletedEventDetail: AnnotationCompletedEventDetail & { contourHoleProcessingEnabled: boolean }

The data that is passed to the event handler when a new contour annotation is completed drawing on the viewport.

InteractionEndType

InteractionEndType: Types.CustomEventType<InteractionEndEventDetail>

Event for interaction end

InteractionEventType

InteractionEventType: Types.CustomEventType<InteractionEventDetail>

Event for interaction

InteractionStartType

InteractionStartType: Types.CustomEventType<InteractionStartEventDetail>

Event for interaction start

KeyDownEventDetail

KeyDownEventDetail: { element: HTMLDivElement; key: string; keyCode: number; renderingEngineId: string; viewportId: string }

EventDetail for keyDown event


Type declaration

  • element: HTMLDivElement

    html element

  • key: string

    The key that was pressed

  • keyCode: number

    key code

  • renderingEngineId: string

    unique id of the rendering engine

  • viewportId: string

    unique id of the viewport

KeyDownEventType

KeyDownEventType: Types.CustomEventType<KeyDownEventDetail>

Event for when a key is pressed

KeyUpEventDetail

KeyUpEventDetail: KeyDownEventDetail

EventDetail for keyDown event

KeyUpEventType

KeyUpEventType: Types.CustomEventType<KeyUpEventDetail>

Event for when a key is released

MouseClickEventDetail

MouseClickEventDetail: NormalizedInteractionEventDetail & MouseCustomEventDetail & MousePointsDetail & { mouseButton: number }

EventDetail mouseClick (a mouse down which is followed by a mouse up)

MouseClickEventType

MouseClickEventType: Types.CustomEventType<MouseClickEventDetail>

Event for mouse click

MouseDoubleClickEventDetail

MouseDoubleClickEventDetail: NormalizedInteractionEventDetail & MouseCustomEventDetail & MousePointsDetail

EventDetail mouseClick (a mouse down which is followed by a mouse up)

MouseDoubleClickEventType

MouseDoubleClickEventType: Types.CustomEventType<MouseDoubleClickEventDetail>

Event for mouse double click

MouseDownActivateEventDetail

MouseDownActivateEventDetail: NormalizedInteractionEventDetail & MousePointsDetail & MouseCustomEventDetail & { mouseButton: number }

EventDetail for mouseDown Activate, it is triggered when mouseDown event is fired but stopPropagation is not called, used for creating new annotation

MouseDownActivateEventType

MouseDownActivateEventType: Types.CustomEventType<MouseDownActivateEventDetail>

Event for mouse down event

MouseDownEventDetail

MouseDownEventDetail: NormalizedInteractionEventDetail & MouseCustomEventDetail & MousePointsDetail & { mouseButton: number }

EventDetail for mouseDown event

MouseDownEventType

MouseDownEventType: Types.CustomEventType<MouseDownEventDetail>

Event for when a mouse button is pressed

MouseDragEventDetail

MouseDragEventDetail: NormalizedInteractionEventDetail & MouseCustomEventDetail & MousePointsDetail & { mouseButton: number }

EventDetail for mouseDrag event

MouseDragEventType

MouseDragEventType: Types.CustomEventType<MouseDragEventDetail>

Event for mouse drag

MouseMoveEventDetail

MouseMoveEventDetail: NormalizedInteractionEventDetail & MouseCustomEventDetail & { currentPoints: IPoints }

EventDetail mouseMove event

MouseMoveEventType

MouseMoveEventType: Types.CustomEventType<MouseMoveEventDetail>

Event for mouse move

MouseUpEventDetail

MouseUpEventDetail: NormalizedInteractionEventDetail & MouseCustomEventDetail & MousePointsDetail & { mouseButton: number }

EventDetail for mouseUp event

MouseUpEventType

MouseUpEventType: Types.CustomEventType<MouseUpEventDetail>

Event for mouse up

MouseWheelEventDetail

MouseWheelEventDetail: NormalizedInteractionEventDetail & MouseCustomEventDetail & { detail: Record<string, any>; points: IPoints; wheel: { direction: number; pixelX: number; pixelY: number; spinX: number; spinY: number } }

Mouse Wheel event detail

MouseWheelEventType

MouseWheelEventType: Types.CustomEventType<MouseWheelEventDetail>

Event for mouse wheel

NormalizedInteractionEventDetail

NormalizedInteractionEventDetail: { camera: Record<string, unknown>; element: HTMLDivElement; eventName: string; renderingEngineId: string; viewportId: string }

The normalized interaction event detail


Type declaration

  • camera: Record<string, unknown>

    The camera at the time of the event.

  • element: HTMLDivElement

    The element that the event was fired on.

  • eventName: string

    The normalized event name.

  • renderingEngineId: string

    The unique identifier of the rendering engine.

  • viewportId: string

    The unique identifier of the viewport that the event was fired in.

NormalizedMouseEventType

NormalizedMouseEventType: Types.CustomEventType<MouseCustomEventDetail>

The Normalized mouse event type

NormalizedTouchEventType

NormalizedTouchEventType: Types.CustomEventType<TouchCustomEventDetail>

The Normalized mouse event type

SegmentationDataModifiedEventDetail

SegmentationDataModifiedEventDetail: { modifiedSlicesToUse?: number[]; segmentationId: string }

EventDetail for when a Segmentation Data is modified by a tool


Type declaration

  • optionalmodifiedSlicesToUse?: number[]

    array of slice indices in a labelmap which have been modified

  • segmentationId: string

    unique id of the segmentationData

SegmentationDataModifiedEventType

SegmentationDataModifiedEventType: Types.CustomEventType<SegmentationDataModifiedEventDetail>

Event for when SegmentationData is modified

SegmentationModifiedEventDetail

SegmentationModifiedEventDetail: { segmentationId: string }

EventDetail for when a Segmentation Global State is modified


Type declaration

  • segmentationId: string

    unique id of segmentation (not segmentationData), for volumes (labelMaps) it is volumeId

SegmentationModifiedEventType

SegmentationModifiedEventType: Types.CustomEventType<SegmentationModifiedEventDetail>

Event for when Segmentation Global State is modified

SegmentationRemovedEventDetail

SegmentationRemovedEventDetail: { segmentationId: string }

EventDetail for when a Segmentation is removed


Type declaration

  • segmentationId: string

    the id of the removed segmentation

SegmentationRemovedEventType

SegmentationRemovedEventType: Types.CustomEventType<SegmentationRemovedEventDetail>

Event for when Segmentation is removed

SegmentationRenderedEventDetail

SegmentationRenderedEventDetail: { toolGroupId: string; viewportId: string }

EventDetail for when a Segmentation is rendered by segmentation rendering engine


Type declaration

  • toolGroupId: string

    unique id of the toolGroup segmentation belongs to

  • viewportId: string

    unique id of the viewport

SegmentationRenderedEventType

SegmentationRenderedEventType: Types.CustomEventType<SegmentationRenderedEventDetail>

Event for when Segmentation is rendered

SegmentationRepresentationModifiedEventDetail

SegmentationRepresentationModifiedEventDetail: { segmentationRepresentationUID: string; toolGroupId: string }

EventDetail for when a Segmentation Representation for a toolGroup is modified


Type declaration

  • segmentationRepresentationUID: string

    segmentation representationUID

  • toolGroupId: string

    unique id of the toolGroup

SegmentationRepresentationModifiedEventType

SegmentationRepresentationModifiedEventType: Types.CustomEventType<SegmentationRepresentationModifiedEventDetail>

Event for when Segmentation Representation is modified

SegmentationRepresentationRemovedEventDetail

SegmentationRepresentationRemovedEventDetail: { segmentationRepresentationUID: string; toolGroupId: string }

EventDetail for when a Segmentation Representation is removed


Type declaration

  • segmentationRepresentationUID: string

    segmentation representationUID

  • toolGroupId: string

    unique id of the toolGroup

SegmentationRepresentationRemovedEventType

SegmentationRepresentationRemovedEventType: Types.CustomEventType<SegmentationRepresentationRemovedEventDetail>

Event for when Segmentation Representation is modified

ToolActivatedEventDetail

ToolActivatedEventDetail: { toolBindingsOptions: SetToolBindingsType; toolGroupId: string; toolName: string }

The data that is passed to the event handler when a tool is activated.


Type declaration

  • toolBindingsOptions: SetToolBindingsType

    Tool binding options

  • toolGroupId: string

    unique id of the toolGroup

  • toolName: string

    Tool name

ToolActivatedEventType

ToolActivatedEventType: Types.CustomEventType<ToolActivatedEventDetail>

The ToolActivated event type

ToolModeChangedEventDetail

ToolModeChangedEventDetail: { mode: ToolModes; toolBindingsOptions?: SetToolBindingsType; toolGroupId: string; toolName: string }

The data that is passed to the event handler when tool mode changes


Type declaration

  • mode: ToolModes

    Tool mode

  • optionaltoolBindingsOptions?: SetToolBindingsType

    Tool binding options

  • toolGroupId: string

    unique id of the toolGroup

  • toolName: string

    Tool name

ToolModeChangedEventType

ToolModeChangedEventType: Types.CustomEventType<ToolModeChangedEventDetail>

The ToolModeChanged event type

TouchDragEventDetail

TouchDragEventDetail: NormalizedInteractionEventDetail & TouchCustomEventDetail & TouchPointsDetail

EventDetail for touch drag event

TouchDragEventType

TouchDragEventType: Types.CustomEventType<TouchDragEventDetail>

Event for touch drag

TouchEndEventDetail

TouchEndEventDetail: NormalizedInteractionEventDetail & TouchPointsDetail & TouchCustomEventDetail

EventDetail for touch end event

TouchEndEventType

TouchEndEventType: Types.CustomEventType<TouchEndEventDetail>

Event for touch end

TouchPressEventDetail

TouchPressEventDetail: NormalizedInteractionEventDetail & TouchCustomEventDetail & { lastPoints: ITouchPoints; lastPointsList: ITouchPoints[]; startPoints: ITouchPoints; startPointsList: ITouchPoints[] }

EventDetail touchPress (a longer press in the same spot)

TouchPressEventType

TouchPressEventType: Types.CustomEventType<TouchPressEventDetail>

Event for when a touch is long pressed

TouchStartActivateEventDetail

TouchStartActivateEventDetail: NormalizedInteractionEventDetail & TouchCustomEventDetail & TouchPointsDetail

EventDetail for touchStart Activate, it is triggered when touchStart event is fired but stopPropagation is not called, used for creating new annotation

TouchStartActivateEventType

TouchStartActivateEventType: Types.CustomEventType<TouchStartActivateEventDetail>

Event for touch start event

TouchStartEventDetail

TouchStartEventDetail: NormalizedInteractionEventDetail & TouchCustomEventDetail & TouchPointsDetail

EventDetail for touchstart event

TouchStartEventType

TouchStartEventType: Types.CustomEventType<TouchStartEventDetail>

Event for when a touch starts

TouchSwipeEventDetail

TouchSwipeEventDetail: NormalizedInteractionEventDetail & TouchCustomEventDetail & { swipe: Swipe }

TouchSwipeEventType

TouchSwipeEventType: Types.CustomEventType<TouchSwipeEventDetail>

Event for when a touch is swiped

TouchTapEventDetail

TouchTapEventDetail: NormalizedInteractionEventDetail & TouchCustomEventDetail & { currentPoints: ITouchPoints; currentPointsList: ITouchPoints[]; taps: number }

EventDetail touchTap (successive taps which do not trigger touchstart)

TouchTapEventType

TouchTapEventType: Types.CustomEventType<TouchTapEventDetail>

Event for when a touch is tapped

VolumeScrollOutOfBoundsEventDetail

VolumeScrollOutOfBoundsEventDetail: { currentImageId: string; currentStepIndex: number; delta: number; desiredStepIndex: number; numScrollSteps: number; viewport: Types.IVolumeViewport; volumeId: string }

Volume Scroll Out of Bounds event detail


Type declaration

  • currentImageId: string
  • currentStepIndex: number
  • delta: number
  • desiredStepIndex: number
  • numScrollSteps: number
  • viewport: Types.IVolumeViewport
  • volumeId: string

VolumeScrollOutOfBoundsEventType

VolumeScrollOutOfBoundsEventType: Types.CustomEventType<VolumeScrollOutOfBoundsEventDetail>

Event for volume scroll out of bounds

LabelmapTypes

LabelmapTypes:

LabelmapConfig

LabelmapConfig: { activeSegmentOutlineWidthDelta?: number; fillAlpha?: number; fillAlphaInactive?: number; outlineOpacity?: number; outlineOpacityInactive?: number; outlineWidthActive?: number; outlineWidthInactive?: number; renderFill?: boolean; renderFillInactive?: boolean; renderOutline?: boolean }

Label map config for the label map representation


Type declaration

  • optionalactiveSegmentOutlineWidthDelta?: number

    delta thickness of the active segment index outline (0 means same thickness, 1 means 1px thicker, -1 means 1px thinner)

  • optionalfillAlpha?: number

    alpha of the fill

  • optionalfillAlphaInactive?: number

    alpha of the fill when inactive

  • optionaloutlineOpacity?: number

    alpha of outline for active segmentation

  • optionaloutlineOpacityInactive?: number

    alpha of outline for inactive segmentation

  • optionaloutlineWidthActive?: number

    thickness of the outline when segmentation is active - all segments

  • optionaloutlineWidthInactive?: number

    thickness of the outline when segmentation is inactive - all segments

  • optionalrenderFill?: boolean

    whether to render segmentation filling

  • optionalrenderFillInactive?: boolean

    whether to render segmentation filling when inactive

  • optionalrenderOutline?: boolean

    whether to render segmentation outline

LabelmapRenderingConfig

LabelmapRenderingConfig: { cfun?: vtkColorTransferFunction; ofun?: vtkPiecewiseFunction }

Labelmap representation type


Type declaration

  • optionalcfun?: vtkColorTransferFunction

    color transfer function

  • optionalofun?: vtkPiecewiseFunction

    opacity transfer function

LabelmapSegmentationData

LabelmapSegmentationData: LabelmapSegmentationDataVolume | LabelmapSegmentationDataStack | { imageIdReferenceMap?: Map<string, string>; referencedVolumeId?: string; volumeId?: string }

LabelmapSegmentationDataStack

LabelmapSegmentationDataStack: { imageIdReferenceMap: Map<string, string> }

Type declaration

  • imageIdReferenceMap: Map<string, string>

    This is a Map from referenced imageId to the segmentation (Derived) imageIds (can be multiple) that are associated with it.

LabelmapSegmentationDataVolume

LabelmapSegmentationDataVolume: { referencedVolumeId?: string; volumeId: string }

Type declaration

  • optionalreferencedVolumeId?: string
  • volumeId: string

ToolSpecificAnnotationTypes

ToolSpecificAnnotationTypes:

ContourAnnotation

AdvancedMagnifyAnnotation

AdvancedMagnifyAnnotation:

optionalannotationUID

annotationUID?: string

A unique identifier for this annotation

optionalautoGenerated

autoGenerated?: boolean

If the annotation is auto generated from other annotations

optionalchildAnnotationUIDs

childAnnotationUIDs?: string[]

Array that contains all child annotation UID

An annotation may have one or more child annotations when it is contour and have some holes in it.

data

data: { handles: { activeHandleIndex: number; points: [Point3, Point3, Point3, Point3] }; isCanvasAnnotation: boolean; magnifyViewportId: string; sourceViewportId: string; zoomFactor: number }

Type declaration

  • handles: { activeHandleIndex: number; points: [Point3, Point3, Point3, Point3] }
    • activeHandleIndex: number
    • points: [Point3, Point3, Point3, Point3]
  • isCanvasAnnotation: boolean
  • magnifyViewportId: string
  • sourceViewportId: string
  • zoomFactor: number

optionalhighlighted

highlighted?: boolean

If the annotation is being hovered over and is highlighted

optionalinvalidated

invalidated?: boolean

Has annotation data been invalidated (e.g., as a result of mouse interactions)

optionalisLocked

isLocked?: boolean

If the annotation is locked for manipulation

optionalisVisible

isVisible?: boolean

If the annotation is visible for manipulation

metadata

metadata: ViewReference & { cameraPosition?: Point3; toolName: string; viewUp?: Point3 }

Metadata for annotation

optionalparentAnnotationUID

parentAnnotationUID?: string

Parent annotation UID

An annotation may have a parent annotation when it is, for example, a hole inside a contour.

AngleAnnotation

AngleAnnotation:

optionalannotationUID

annotationUID?: string

A unique identifier for this annotation

optionalautoGenerated

autoGenerated?: boolean

If the annotation is auto generated from other annotations

optionalchildAnnotationUIDs

childAnnotationUIDs?: string[]

Array that contains all child annotation UID

An annotation may have one or more child annotations when it is contour and have some holes in it.

data

data: { cachedStats: {}; handles: { activeHandleIndex: number; points: Point3[]; textBox: { hasMoved: boolean; worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }; worldPosition: Point3 } }; label: string }

Type declaration

  • cachedStats: {}
    • [targetId string]: { angle: number }
  • handles: { activeHandleIndex: number; points: Point3[]; textBox: { hasMoved: boolean; worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }; worldPosition: Point3 } }
    • activeHandleIndex: number
    • points: Point3[]
    • textBox: { hasMoved: boolean; worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }; worldPosition: Point3 }
      • hasMoved: boolean
      • worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }
        • bottomLeft: Point3
        • bottomRight: Point3
        • topLeft: Point3
        • topRight: Point3
      • worldPosition: Point3
  • label: string

optionalhighlighted

highlighted?: boolean

If the annotation is being hovered over and is highlighted

optionalinvalidated

invalidated?: boolean

Has annotation data been invalidated (e.g., as a result of mouse interactions)

optionalisLocked

isLocked?: boolean

If the annotation is locked for manipulation

optionalisVisible

isVisible?: boolean

If the annotation is visible for manipulation

metadata

metadata: ViewReference & { cameraPosition?: Point3; toolName: string; viewUp?: Point3 }

Metadata for annotation

optionalparentAnnotationUID

parentAnnotationUID?: string

Parent annotation UID

An annotation may have a parent annotation when it is, for example, a hole inside a contour.

ArrowAnnotation

ArrowAnnotation:

optionalannotationUID

annotationUID?: string

A unique identifier for this annotation

optionalautoGenerated

autoGenerated?: boolean

If the annotation is auto generated from other annotations

optionalchildAnnotationUIDs

childAnnotationUIDs?: string[]

Array that contains all child annotation UID

An annotation may have one or more child annotations when it is contour and have some holes in it.

data

data: { handles: { activeHandleIndex: number; arrowFirst: boolean; points: Point3[]; textBox: { hasMoved: boolean; worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }; worldPosition: Point3 } }; text: string }

Type declaration

  • handles: { activeHandleIndex: number; arrowFirst: boolean; points: Point3[]; textBox: { hasMoved: boolean; worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }; worldPosition: Point3 } }
    • activeHandleIndex: number
    • arrowFirst: boolean
    • points: Point3[]
    • textBox: { hasMoved: boolean; worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }; worldPosition: Point3 }
      • hasMoved: boolean
      • worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }
        • bottomLeft: Point3
        • bottomRight: Point3
        • topLeft: Point3
        • topRight: Point3
      • worldPosition: Point3
  • text: string

optionalhighlighted

highlighted?: boolean

If the annotation is being hovered over and is highlighted

optionalinvalidated

invalidated?: boolean

Has annotation data been invalidated (e.g., as a result of mouse interactions)

optionalisLocked

isLocked?: boolean

If the annotation is locked for manipulation

optionalisVisible

isVisible?: boolean

If the annotation is visible for manipulation

metadata

metadata: ViewReference & { cameraPosition?: Point3; toolName: string; viewUp?: Point3 }

Metadata for annotation

optionalparentAnnotationUID

parentAnnotationUID?: string

Parent annotation UID

An annotation may have a parent annotation when it is, for example, a hole inside a contour.

BidirectionalAnnotation

BidirectionalAnnotation:

optionalannotationUID

annotationUID?: string

A unique identifier for this annotation

optionalautoGenerated

autoGenerated?: boolean

If the annotation is auto generated from other annotations

optionalchildAnnotationUIDs

childAnnotationUIDs?: string[]

Array that contains all child annotation UID

An annotation may have one or more child annotations when it is contour and have some holes in it.

data

data: { cachedStats: {}; handles: { activeHandleIndex: number; points: Point3[]; textBox: { hasMoved: boolean; worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }; worldPosition: Point3 } }; label: string }

Type declaration

  • cachedStats: {}
    • [targetId string]: { length: number; unit: string; width: number }
  • handles: { activeHandleIndex: number; points: Point3[]; textBox: { hasMoved: boolean; worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }; worldPosition: Point3 } }
    • activeHandleIndex: number
    • points: Point3[]
    • textBox: { hasMoved: boolean; worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }; worldPosition: Point3 }
      • hasMoved: boolean
      • worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }
        • bottomLeft: Point3
        • bottomRight: Point3
        • topLeft: Point3
        • topRight: Point3
      • worldPosition: Point3
  • label: string

optionalhighlighted

highlighted?: boolean

If the annotation is being hovered over and is highlighted

optionalinvalidated

invalidated?: boolean

Has annotation data been invalidated (e.g., as a result of mouse interactions)

optionalisLocked

isLocked?: boolean

If the annotation is locked for manipulation

optionalisVisible

isVisible?: boolean

If the annotation is visible for manipulation

metadata

metadata: ViewReference & { cameraPosition?: Point3; toolName: string; viewUp?: Point3 }

Metadata for annotation

optionalparentAnnotationUID

parentAnnotationUID?: string

Parent annotation UID

An annotation may have a parent annotation when it is, for example, a hole inside a contour.

CircleROIAnnotation

CircleROIAnnotation:

optionalannotationUID

annotationUID?: string

A unique identifier for this annotation

optionalautoGenerated

autoGenerated?: boolean

If the annotation is auto generated from other annotations

optionalchildAnnotationUIDs

childAnnotationUIDs?: string[]

Array that contains all child annotation UID

An annotation may have one or more child annotations when it is contour and have some holes in it.

data

data: { cachedStats?: (ROICachedStats & {}) | { pointsInVolume: Point3[]; projectionPoints: Point3[][] }; handles: { activeHandleIndex: number; points: [Point3, Point3]; textBox?: { hasMoved: boolean; worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }; worldPosition: Point3 } }; label: string }

Type declaration

  • optionalcachedStats?: (ROICachedStats & {}) | { pointsInVolume: Point3[]; projectionPoints: Point3[][] }
  • handles: { activeHandleIndex: number; points: [Point3, Point3]; textBox?: { hasMoved: boolean; worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }; worldPosition: Point3 } }
    • activeHandleIndex: number
    • points: [Point3, Point3]
    • optionaltextBox?: { hasMoved: boolean; worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }; worldPosition: Point3 }
      • hasMoved: boolean
      • worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }
        • bottomLeft: Point3
        • bottomRight: Point3
        • topLeft: Point3
        • topRight: Point3
      • worldPosition: Point3
  • label: string

optionalhighlighted

highlighted?: boolean

If the annotation is being hovered over and is highlighted

optionalinvalidated

invalidated?: boolean

Has annotation data been invalidated (e.g., as a result of mouse interactions)

optionalisLocked

isLocked?: boolean

If the annotation is locked for manipulation

optionalisVisible

isVisible?: boolean

If the annotation is visible for manipulation

metadata

metadata: ViewReference & { cameraPosition?: Point3; toolName: string; viewUp?: Point3 }

Metadata for annotation

optionalparentAnnotationUID

parentAnnotationUID?: string

Parent annotation UID

An annotation may have a parent annotation when it is, for example, a hole inside a contour.

CircleROIStartEndThresholdAnnotation

CircleROIStartEndThresholdAnnotation:

optionalannotationUID

annotationUID?: string

A unique identifier for this annotation

optionalautoGenerated

autoGenerated?: boolean

If the annotation is auto generated from other annotations

optionalchildAnnotationUIDs

childAnnotationUIDs?: string[]

Array that contains all child annotation UID

An annotation may have one or more child annotations when it is contour and have some holes in it.

data

data: { cachedStats?: { pointsInVolume: Point3[]; projectionPoints: Point3[][] }; endSlice: number; handles: { activeHandleIndex: number; points: [Point3, Point3] }; label: string; startSlice: number }

Type declaration

  • optionalcachedStats?: { pointsInVolume: Point3[]; projectionPoints: Point3[][] }
    • pointsInVolume: Point3[]
    • projectionPoints: Point3[][]
  • endSlice: number
  • handles: { activeHandleIndex: number; points: [Point3, Point3] }
    • activeHandleIndex: number
    • points: [Point3, Point3]
  • label: string
  • startSlice: number

optionalhighlighted

highlighted?: boolean

If the annotation is being hovered over and is highlighted

optionalinvalidated

invalidated?: boolean

Has annotation data been invalidated (e.g., as a result of mouse interactions)

optionalisLocked

isLocked?: boolean

If the annotation is locked for manipulation

optionalisVisible

isVisible?: boolean

If the annotation is visible for manipulation

metadata

metadata: { FrameOfReferenceUID: string; annotationUID?: string; cameraFocalPoint?: Point3; cameraPosition?: Point3; enabledElement: any; referencedImageId?: string; spacingInNormal: number; toolName: string; viewPlaneNormal?: Point3; viewUp?: Point3; volumeId: string }

Type declaration

  • FrameOfReferenceUID: string
  • optionalannotationUID?: string
  • optionalcameraFocalPoint?: Point3
  • optionalcameraPosition?: Point3
  • enabledElement: any
  • optionalreferencedImageId?: string
  • spacingInNormal: number
  • toolName: string
  • optionalviewPlaneNormal?: Point3
  • optionalviewUp?: Point3
  • volumeId: string

optionalparentAnnotationUID

parentAnnotationUID?: string

Parent annotation UID

An annotation may have a parent annotation when it is, for example, a hole inside a contour.

CobbAngleAnnotation

CobbAngleAnnotation:

optionalannotationUID

annotationUID?: string

A unique identifier for this annotation

optionalautoGenerated

autoGenerated?: boolean

If the annotation is auto generated from other annotations

optionalchildAnnotationUIDs

childAnnotationUIDs?: string[]

Array that contains all child annotation UID

An annotation may have one or more child annotations when it is contour and have some holes in it.

data

data: { cachedStats: {}; handles: { activeHandleIndex: number; points: Point3[]; textBox: { hasMoved: boolean; worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }; worldPosition: Point3 } }; label: string }

Type declaration

  • cachedStats: {}
    • [targetId string]: { angle: number; arc1Angle: number; arc2Angle: number; points: { canvas: { arc1Angle: number; arc1End: Types.Point2; arc1Start: Types.Point2; arc2Angle: number; arc2End: Types.Point2; arc2Start: Types.Point2 }; world: { arc1Angle: number; arc1End: Types.Point3; arc1Start: Types.Point3; arc2Angle: number; arc2End: Types.Point3; arc2Start: Types.Point3 } } }
  • handles: { activeHandleIndex: number; points: Point3[]; textBox: { hasMoved: boolean; worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }; worldPosition: Point3 } }
    • activeHandleIndex: number
    • points: Point3[]
    • textBox: { hasMoved: boolean; worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }; worldPosition: Point3 }
      • hasMoved: boolean
      • worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }
        • bottomLeft: Point3
        • bottomRight: Point3
        • topLeft: Point3
        • topRight: Point3
      • worldPosition: Point3
  • label: string

optionalhighlighted

highlighted?: boolean

If the annotation is being hovered over and is highlighted

optionalinvalidated

invalidated?: boolean

Has annotation data been invalidated (e.g., as a result of mouse interactions)

optionalisLocked

isLocked?: boolean

If the annotation is locked for manipulation

optionalisVisible

isVisible?: boolean

If the annotation is visible for manipulation

metadata

metadata: ViewReference & { cameraPosition?: Point3; toolName: string; viewUp?: Point3 }

Metadata for annotation

optionalparentAnnotationUID

parentAnnotationUID?: string

Parent annotation UID

An annotation may have a parent annotation when it is, for example, a hole inside a contour.

EllipticalROIAnnotation

EllipticalROIAnnotation:

optionalannotationUID

annotationUID?: string

A unique identifier for this annotation

optionalautoGenerated

autoGenerated?: boolean

If the annotation is auto generated from other annotations

optionalchildAnnotationUIDs

childAnnotationUIDs?: string[]

Array that contains all child annotation UID

An annotation may have one or more child annotations when it is contour and have some holes in it.

data

data: { cachedStats?: ROICachedStats; handles: { activeHandleIndex: number; points: [Point3, Point3, Point3, Point3]; textBox?: { hasMoved: boolean; worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }; worldPosition: Point3 } }; initialRotation: number; label: string }

Type declaration

  • optionalcachedStats?: ROICachedStats
  • handles: { activeHandleIndex: number; points: [Point3, Point3, Point3, Point3]; textBox?: { hasMoved: boolean; worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }; worldPosition: Point3 } }
    • activeHandleIndex: number
    • points: [Point3, Point3, Point3, Point3]
    • optionaltextBox?: { hasMoved: boolean; worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }; worldPosition: Point3 }
      • hasMoved: boolean
      • worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }
        • bottomLeft: Point3
        • bottomRight: Point3
        • topLeft: Point3
        • topRight: Point3
      • worldPosition: Point3
  • initialRotation: number
  • label: string

optionalhighlighted

highlighted?: boolean

If the annotation is being hovered over and is highlighted

optionalinvalidated

invalidated?: boolean

Has annotation data been invalidated (e.g., as a result of mouse interactions)

optionalisLocked

isLocked?: boolean

If the annotation is locked for manipulation

optionalisVisible

isVisible?: boolean

If the annotation is visible for manipulation

metadata

metadata: ViewReference & { cameraPosition?: Point3; toolName: string; viewUp?: Point3 }

Metadata for annotation

optionalparentAnnotationUID

parentAnnotationUID?: string

Parent annotation UID

An annotation may have a parent annotation when it is, for example, a hole inside a contour.

LengthAnnotation

LengthAnnotation:

optionalannotationUID

annotationUID?: string

A unique identifier for this annotation

optionalautoGenerated

autoGenerated?: boolean

If the annotation is auto generated from other annotations

optionalchildAnnotationUIDs

childAnnotationUIDs?: string[]

Array that contains all child annotation UID

An annotation may have one or more child annotations when it is contour and have some holes in it.

data

data: { cachedStats: {}; handles: { activeHandleIndex: number; points: Point3[]; textBox: { hasMoved: boolean; worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }; worldPosition: Point3 } }; label: string }

Type declaration

  • cachedStats: {}
    • [targetId string]: { length: number; unit: string }
  • handles: { activeHandleIndex: number; points: Point3[]; textBox: { hasMoved: boolean; worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }; worldPosition: Point3 } }
    • activeHandleIndex: number
    • points: Point3[]
    • textBox: { hasMoved: boolean; worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }; worldPosition: Point3 }
      • hasMoved: boolean
      • worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }
        • bottomLeft: Point3
        • bottomRight: Point3
        • topLeft: Point3
        • topRight: Point3
      • worldPosition: Point3
  • label: string

optionalhighlighted

highlighted?: boolean

If the annotation is being hovered over and is highlighted

optionalinvalidated

invalidated?: boolean

Has annotation data been invalidated (e.g., as a result of mouse interactions)

optionalisLocked

isLocked?: boolean

If the annotation is locked for manipulation

optionalisVisible

isVisible?: boolean

If the annotation is visible for manipulation

metadata

metadata: ViewReference & { cameraPosition?: Point3; toolName: string; viewUp?: Point3 }

Metadata for annotation

optionalparentAnnotationUID

parentAnnotationUID?: string

Parent annotation UID

An annotation may have a parent annotation when it is, for example, a hole inside a contour.

ProbeAnnotation

ProbeAnnotation:

optionalannotationUID

annotationUID?: string

A unique identifier for this annotation

optionalautoGenerated

autoGenerated?: boolean

If the annotation is auto generated from other annotations

optionalchildAnnotationUIDs

childAnnotationUIDs?: string[]

Array that contains all child annotation UID

An annotation may have one or more child annotations when it is contour and have some holes in it.

data

data: { cachedStats: {}; handles: { points: Point3[] }; label: string }

Type declaration

  • cachedStats: {}
    • [targetId string]: { Modality: string; index: Types.Point3; value: number }
  • handles: { points: Point3[] }
    • points: Point3[]
  • label: string

optionalhighlighted

highlighted?: boolean

If the annotation is being hovered over and is highlighted

optionalinvalidated

invalidated?: boolean

Has annotation data been invalidated (e.g., as a result of mouse interactions)

optionalisLocked

isLocked?: boolean

If the annotation is locked for manipulation

optionalisVisible

isVisible?: boolean

If the annotation is visible for manipulation

metadata

metadata: ViewReference & { cameraPosition?: Point3; toolName: string; viewUp?: Point3 }

Metadata for annotation

optionalparentAnnotationUID

parentAnnotationUID?: string

Parent annotation UID

An annotation may have a parent annotation when it is, for example, a hole inside a contour.

RectangleROIAnnotation

RectangleROIAnnotation:

optionalannotationUID

annotationUID?: string

A unique identifier for this annotation

optionalautoGenerated

autoGenerated?: boolean

If the annotation is auto generated from other annotations

optionalchildAnnotationUIDs

childAnnotationUIDs?: string[]

Array that contains all child annotation UID

An annotation may have one or more child annotations when it is contour and have some holes in it.

data

data: { cachedStats?: ROICachedStats | { pointsInVolume?: Point3[]; projectionPoints?: Point3[]; projectionPointsImageIds?: string[] }; handles: { activeHandleIndex: number; points: Point3[]; textBox: { hasMoved: boolean; worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }; worldPosition: Point3 } }; label: string }

Type declaration

  • optionalcachedStats?: ROICachedStats | { pointsInVolume?: Point3[]; projectionPoints?: Point3[]; projectionPointsImageIds?: string[] }
  • handles: { activeHandleIndex: number; points: Point3[]; textBox: { hasMoved: boolean; worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }; worldPosition: Point3 } }
    • activeHandleIndex: number
    • points: Point3[]
    • textBox: { hasMoved: boolean; worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }; worldPosition: Point3 }
      • hasMoved: boolean
      • worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }
        • bottomLeft: Point3
        • bottomRight: Point3
        • topLeft: Point3
        • topRight: Point3
      • worldPosition: Point3
  • label: string

optionalhighlighted

highlighted?: boolean

If the annotation is being hovered over and is highlighted

optionalinvalidated

invalidated?: boolean

Has annotation data been invalidated (e.g., as a result of mouse interactions)

optionalisLocked

isLocked?: boolean

If the annotation is locked for manipulation

optionalisVisible

isVisible?: boolean

If the annotation is visible for manipulation

metadata

metadata: ViewReference & { cameraPosition?: Point3; toolName: string; viewUp?: Point3 }

Metadata for annotation

optionalparentAnnotationUID

parentAnnotationUID?: string

Parent annotation UID

An annotation may have a parent annotation when it is, for example, a hole inside a contour.

RectangleROIStartEndThresholdAnnotation

RectangleROIStartEndThresholdAnnotation:

optionalannotationUID

annotationUID?: string

A unique identifier for this annotation

optionalautoGenerated

autoGenerated?: boolean

If the annotation is auto generated from other annotations

optionalchildAnnotationUIDs

childAnnotationUIDs?: string[]

Array that contains all child annotation UID

An annotation may have one or more child annotations when it is contour and have some holes in it.

data

data: { cachedStats: { pointsInVolume: Point3[]; projectionPoints: Point3[][]; projectionPointsImageIds: string[] }; endSlice: number; handles: { activeHandleIndex: number; points: Point3[] }; label: string; startSlice: number }

Type declaration

  • cachedStats: { pointsInVolume: Point3[]; projectionPoints: Point3[][]; projectionPointsImageIds: string[] }
    • pointsInVolume: Point3[]
    • projectionPoints: Point3[][]
    • projectionPointsImageIds: string[]
  • endSlice: number
  • handles: { activeHandleIndex: number; points: Point3[] }
    • activeHandleIndex: number
    • points: Point3[]
  • label: string
  • startSlice: number

optionalhighlighted

highlighted?: boolean

If the annotation is being hovered over and is highlighted

optionalinvalidated

invalidated?: boolean

Has annotation data been invalidated (e.g., as a result of mouse interactions)

optionalisLocked

isLocked?: boolean

If the annotation is locked for manipulation

optionalisVisible

isVisible?: boolean

If the annotation is visible for manipulation

metadata

metadata: { FrameOfReferenceUID: string; annotationUID?: string; cameraFocalPoint?: Point3; cameraPosition?: Point3; enabledElement: any; referencedImageId?: string; spacingInNormal: number; toolName: string; viewPlaneNormal?: Point3; viewUp?: Point3; volumeId: string }

Type declaration

  • FrameOfReferenceUID: string
  • optionalannotationUID?: string
  • optionalcameraFocalPoint?: Point3
  • optionalcameraPosition?: Point3
  • enabledElement: any
  • optionalreferencedImageId?: string
  • spacingInNormal: number
  • toolName: string
  • optionalviewPlaneNormal?: Point3
  • optionalviewUp?: Point3
  • volumeId: string

optionalparentAnnotationUID

parentAnnotationUID?: string

Parent annotation UID

An annotation may have a parent annotation when it is, for example, a hole inside a contour.

RectangleROIThresholdAnnotation

RectangleROIThresholdAnnotation:

optionalannotationUID

annotationUID?: string

A unique identifier for this annotation

optionalautoGenerated

autoGenerated?: boolean

If the annotation is auto generated from other annotations

optionalchildAnnotationUIDs

childAnnotationUIDs?: string[]

Array that contains all child annotation UID

An annotation may have one or more child annotations when it is contour and have some holes in it.

data

data: { handles: { activeHandleIndex: number; points: Point3[] }; label: string }

Type declaration

  • handles: { activeHandleIndex: number; points: Point3[] }
    • activeHandleIndex: number
    • points: Point3[]
  • label: string

optionalhighlighted

highlighted?: boolean

If the annotation is being hovered over and is highlighted

optionalinvalidated

invalidated?: boolean

Has annotation data been invalidated (e.g., as a result of mouse interactions)

optionalisLocked

isLocked?: boolean

If the annotation is locked for manipulation

optionalisVisible

isVisible?: boolean

If the annotation is visible for manipulation

metadata

metadata: { FrameOfReferenceUID: string; annotationUID?: string; cameraFocalPoint?: Point3; cameraPosition?: Point3; enabledElement: IEnabledElement; referencedImageId?: string; toolName: string; viewPlaneNormal?: Point3; viewUp?: Point3; volumeId: string }

Type declaration

  • FrameOfReferenceUID: string
  • optionalannotationUID?: string
  • optionalcameraFocalPoint?: Point3
  • optionalcameraPosition?: Point3
  • enabledElement: IEnabledElement
  • optionalreferencedImageId?: string
  • toolName: string
  • optionalviewPlaneNormal?: Point3
  • optionalviewUp?: Point3
  • volumeId: string

optionalparentAnnotationUID

parentAnnotationUID?: string

Parent annotation UID

An annotation may have a parent annotation when it is, for example, a hole inside a contour.

ReferenceCursor

ReferenceCursor:

optionalannotationUID

annotationUID?: string

A unique identifier for this annotation

optionalautoGenerated

autoGenerated?: boolean

If the annotation is auto generated from other annotations

optionalchildAnnotationUIDs

childAnnotationUIDs?: string[]

Array that contains all child annotation UID

An annotation may have one or more child annotations when it is contour and have some holes in it.

data

data: { handles: { points: [Point3] } }

Type declaration

  • handles: { points: [Point3] }
    • points: [Point3]

optionalhighlighted

highlighted?: boolean

If the annotation is being hovered over and is highlighted

optionalinvalidated

invalidated?: boolean

Has annotation data been invalidated (e.g., as a result of mouse interactions)

optionalisLocked

isLocked?: boolean

If the annotation is locked for manipulation

optionalisVisible

isVisible?: boolean

If the annotation is visible for manipulation

metadata

metadata: ViewReference & { cameraPosition?: Point3; toolName: string; viewUp?: Point3 }

Metadata for annotation

optionalparentAnnotationUID

parentAnnotationUID?: string

Parent annotation UID

An annotation may have a parent annotation when it is, for example, a hole inside a contour.

ReferenceLineAnnotation

ReferenceLineAnnotation:

optionalannotationUID

annotationUID?: string

A unique identifier for this annotation

optionalautoGenerated

autoGenerated?: boolean

If the annotation is auto generated from other annotations

optionalchildAnnotationUIDs

childAnnotationUIDs?: string[]

Array that contains all child annotation UID

An annotation may have one or more child annotations when it is contour and have some holes in it.

data

data: { handles: { points: Point3[] } }

Type declaration

  • handles: { points: Point3[] }
    • points: Point3[]

optionalhighlighted

highlighted?: boolean

If the annotation is being hovered over and is highlighted

optionalinvalidated

invalidated?: boolean

Has annotation data been invalidated (e.g., as a result of mouse interactions)

optionalisLocked

isLocked?: boolean

If the annotation is locked for manipulation

optionalisVisible

isVisible?: boolean

If the annotation is visible for manipulation

metadata

metadata: ViewReference & { cameraPosition?: Point3; toolName: string; viewUp?: Point3 }

Metadata for annotation

optionalparentAnnotationUID

parentAnnotationUID?: string

Parent annotation UID

An annotation may have a parent annotation when it is, for example, a hole inside a contour.

ScaleOverlayAnnotation

ScaleOverlayAnnotation:

optionalannotationUID

annotationUID?: string

A unique identifier for this annotation

optionalautoGenerated

autoGenerated?: boolean

If the annotation is auto generated from other annotations

optionalchildAnnotationUIDs

childAnnotationUIDs?: string[]

Array that contains all child annotation UID

An annotation may have one or more child annotations when it is contour and have some holes in it.

data

data: { handles: { points: Point3[] }; viewportId: string }

Type declaration

  • handles: { points: Point3[] }
    • points: Point3[]
  • viewportId: string

optionalhighlighted

highlighted?: boolean

If the annotation is being hovered over and is highlighted

optionalinvalidated

invalidated?: boolean

Has annotation data been invalidated (e.g., as a result of mouse interactions)

optionalisLocked

isLocked?: boolean

If the annotation is locked for manipulation

optionalisVisible

isVisible?: boolean

If the annotation is visible for manipulation

metadata

metadata: ViewReference & { cameraPosition?: Point3; toolName: string; viewUp?: Point3 }

Metadata for annotation

optionalparentAnnotationUID

parentAnnotationUID?: string

Parent annotation UID

An annotation may have a parent annotation when it is, for example, a hole inside a contour.

UltrasoundDirectionalAnnotation

UltrasoundDirectionalAnnotation:

optionalannotationUID

annotationUID?: string

A unique identifier for this annotation

optionalautoGenerated

autoGenerated?: boolean

If the annotation is auto generated from other annotations

optionalchildAnnotationUIDs

childAnnotationUIDs?: string[]

Array that contains all child annotation UID

An annotation may have one or more child annotations when it is contour and have some holes in it.

data

data: { cachedStats: {}; handles: { activeHandleIndex: number; points: Point3[]; textBox: { hasMoved: boolean; worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }; worldPosition: Point3 } }; label: string }

Type declaration

  • cachedStats: {}
    • [targetId string]: { isHorizontal: boolean; isUnitless: boolean; units: string[]; xValues: number[]; yValues: number[] }
  • handles: { activeHandleIndex: number; points: Point3[]; textBox: { hasMoved: boolean; worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }; worldPosition: Point3 } }
    • activeHandleIndex: number
    • points: Point3[]
    • textBox: { hasMoved: boolean; worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }; worldPosition: Point3 }
      • hasMoved: boolean
      • worldBoundingBox: { bottomLeft: Point3; bottomRight: Point3; topLeft: Point3; topRight: Point3 }
        • bottomLeft: Point3
        • bottomRight: Point3
        • topLeft: Point3
        • topRight: Point3
      • worldPosition: Point3
  • label: string

optionalhighlighted

highlighted?: boolean

If the annotation is being hovered over and is highlighted

optionalinvalidated

invalidated?: boolean

Has annotation data been invalidated (e.g., as a result of mouse interactions)

optionalisLocked

isLocked?: boolean

If the annotation is locked for manipulation

optionalisVisible

isVisible?: boolean

If the annotation is visible for manipulation

metadata

metadata: ViewReference & { cameraPosition?: Point3; toolName: string; viewUp?: Point3 }

Metadata for annotation

optionalparentAnnotationUID

parentAnnotationUID?: string

Parent annotation UID

An annotation may have a parent annotation when it is, for example, a hole inside a contour.

VideoRedactionAnnotation

VideoRedactionAnnotation:

optionalannotationUID

annotationUID?: string

A unique identifier for this annotation

optionalautoGenerated

autoGenerated?: boolean

If the annotation is auto generated from other annotations

optionalchildAnnotationUIDs

childAnnotationUIDs?: string[]

Array that contains all child annotation UID

An annotation may have one or more child annotations when it is contour and have some holes in it.

data

data: { active: boolean; cachedStats: {}; handles: { activeHandleIndex: number; points: Point3[] }; invalidated: boolean }

Type declaration

  • active: boolean
  • cachedStats: {}
    • [key string]: any
  • handles: { activeHandleIndex: number; points: Point3[] }
    • activeHandleIndex: number
    • points: Point3[]
  • invalidated: boolean

optionalhighlighted

highlighted?: boolean

If the annotation is being hovered over and is highlighted

optionalinvalidated

invalidated?: boolean

Has annotation data been invalidated (e.g., as a result of mouse interactions)

optionalisLocked

isLocked?: boolean

If the annotation is locked for manipulation

optionalisVisible

isVisible?: boolean

If the annotation is visible for manipulation

metadata

metadata: { FrameOfReferenceUID: string; referencedImageId: string; toolName: string; viewPlaneNormal: Point3; viewUp: Point3 }

Type declaration

  • FrameOfReferenceUID: string
  • referencedImageId: string
  • toolName: string
  • viewPlaneNormal: Point3
  • viewUp: Point3

optionalparentAnnotationUID

parentAnnotationUID?: string

Parent annotation UID

An annotation may have a parent annotation when it is, for example, a hole inside a contour.

InterpolationROIAnnotation

InterpolationROIAnnotation: ContourAnnotation & ContourSegmentationAnnotationData & { interpolationCompleted?: boolean; interpolationUID?: string; isInterpolationUpdate?: boolean; metadata: { annotationUID?: string } }

LivewireContourAnnotation

LivewireContourAnnotation: ContourAnnotation

LivewireContourSegmentationAnnotation

LivewireContourSegmentationAnnotation: LivewireContourAnnotation & ContourSegmentationAnnotationData

PlanarFreehandContourSegmentationAnnotation

PlanarFreehandContourSegmentationAnnotation: PlanarFreehandROIAnnotation & ContourSegmentationAnnotationData

PlanarFreehandROIAnnotation

PlanarFreehandROIAnnotation: ContourAnnotation & { data: { cachedStats?: ROICachedStats; isOpenUShapeContour?: boolean; label?: string; openUShapeContourVectorToPeak?: Types.Point3[] } }

SplineContourSegmentationAnnotation

SplineContourSegmentationAnnotation: SplineROIAnnotation & ContourSegmentationAnnotationData

SplineROIAnnotation

SplineROIAnnotation: ContourAnnotation & { data: { cachedStats?: {}; label?: string; spline: { instance: ISpline; resolution: number; type: string } } }

Classes

IToolGroup

IToolGroup:

ToolGroup class which is a container for tools and their modes and states. In Cornerstone3DTools, you need to create a tool group in order to use the tools. ToolGroup is a way to share tool configuration, state (enabled, disabled, etc.) across a set of viewports. Tools can set to be activated, enabled or disabled in a toolGroup. You should not directly instantiate a ToolGroup. You need to use ToolGroupManager helpers to create a new toolGroup or get a reference to an existing toolGroup.

const toolGroup = csTools.ToolGroupManager.createToolGroup('toolGroupId')

constructor

  • new IToolGroup(id: string): default
  • Parameters

    • id: string

    Returns default

_toolInstances

_toolInstances: {} = {}

Type declaration

    currentActivePrimaryToolName

    currentActivePrimaryToolName: string = null

    id

    id: string

    prevActivePrimaryToolName

    prevActivePrimaryToolName: string = null

    restoreToolOptions

    restoreToolOptions: {} = {}

    Options used for restoring a tool


    Type declaration

      toolOptions

      toolOptions: {} = {}

      Type declaration

        viewportsInfo

        viewportsInfo: any[] = []

        _setCursorForViewports

        • _setCursorForViewports(cursor: default): void
        • Parameters

          Returns void

        addTool

        • Add a tool to the tool group with the given tool name and tool configuration. Note that adding a tool to a tool group will not automatically set the tool to be active. You must call setToolActive or setToolPassive and other methods to set the tool to be active or passive or in other states.


          Parameters

          • toolName: string

            string

          • configuration: ToolConfiguration = {}

            Tool configuration objects and a custom statistics calculator if needed

          Returns void

        publicaddToolInstance

        • addToolInstance(toolName: string, parentClassName: string, configuration?: {}): void
        • Parameters

          • toolName: string
          • parentClassName: string
          • configuration: {} = {}

          Returns void

        publicaddViewport

        • addViewport(viewportId: string, renderingEngineId?: string): void
        • Add a viewport to the ToolGroup. It accepts viewportId and optional renderingEngineId parameter. If renderingEngineId is not provided, it checks if cornerstone-core has more than one renderingEngine; If so, it will throw an error. If cornerstone-core has only one renderingEngine, it will use that renderingEngine.


          Parameters

          • viewportId: string

            The unique identifier for the viewport.

          • optionalrenderingEngineId: string

            The rendering engine to use.

          Returns void

        publicclone

        • clone(newToolGroupId: any, fnToolFilter?: (toolName: string) => void): default

        • Parameters

          • newToolGroupId: any

            Id of the new (clone) tool group

          • fnToolFilter: (toolName: string) => void = null

            Function to filter which tools from this tool group should be added to the new (clone) one. Example: only annotations tools can be filtered and added to the new tool group.

          Returns default

          A new tool group that is a clone of this one

        publicgetActivePrimaryMouseButtonTool

        • getActivePrimaryMouseButtonTool(): string
        • Find the name of the tool that is Active and has a primary button binding (Mouse primary click)


          Returns string

          The name of the tool

        publicgetDefaultMousePrimary

        • Returns the default mouse primary button.


          Returns MouseBindings

        publicgetDefaultPrimaryBindings

        • Gets an array of bindings that is the full primary binding. Currently this is just the primary mouse button, but may be extended in the future to include touch or other binding types.


          Returns IToolBinding[]

        publicgetPrevActivePrimaryToolName

        • getPrevActivePrimaryToolName(): string
        • Gets the name of the previously active tool.


          Returns string

          The name of the previously active tool.

        getToolConfiguration

        • getToolConfiguration(toolName: string, configurationPath?: string): any
        • Get the configuration of tool. It returns only the config for the given path (in case exists). ConfigurationPath is the the path of the property to get separated by ‘.’.

          @example
          getToolConfiguration('LengthTool', 'firstLevel.secondLevel')
          // get from LengthTool instance the configuration value as being LengthToolInstance[configuration][firstLevel][secondLevel]

          Parameters

          • toolName: string
          • optionalconfigurationPath: string

          Returns any

        publicgetToolInstance

        • getToolInstance(toolInstanceName: string): any
        • Get the tool instance for a given tool name in the toolGroup


          Parameters

          • toolInstanceName: string

          Returns any

          A tool instance.

        publicgetToolInstances

        • getToolInstances(): Record<string, any>
        • Retrieves the tool instances associated with this tool group.


          Returns Record<string, any>

          A record containing the tool instances, where the keys are the tool names and the values are the tool instances.

        publicgetToolOptions

        • Get the options for a given tool


          Parameters

          • toolName: string

            The name of the tool.

          Returns ToolOptionsType

          the tool options

        getViewportIds

        • getViewportIds(): string[]
        • Get the viewport IDs of all the viewports in the current viewport


          Returns string[]

          An array of viewport IDs.

        getViewportsInfo

        • getViewportsInfo(): default[]
        • Returns the toolGroup viewports info which is an array of {viewportId, renderingEngineId}


          Returns default[]

        hasTool

        • hasTool(toolName: string): boolean
        • Check if a tool is already added to the tool group


          Parameters

          • toolName: string

            Tool name

          Returns boolean

          True if the tool is already added or false otherwise

        publicremoveViewports

        • removeViewports(renderingEngineId: string, viewportId?: string): void
        • Removes viewport from the toolGroup. If only renderingEngineId is defined it removes all the viewports with the same renderingEngineId, if viewportId is also provided, it will remove that specific viewport from the ToolGroup.


          Parameters

          • renderingEngineId: string

            renderingEngine id

          • optionalviewportId: string

            viewport id

          Returns void

        publicsetActiveStrategy

        • setActiveStrategy(toolName: string, strategyName: string): void
        • Parameters

          • toolName: string
          • strategyName: string

          Returns void

        publicsetToolActive

        • Set the tool mode on the toolGroup to be Active. This means the tool can be actively used by the defined bindings (e.g., Mouse primary click)

          • Can be actively used by mouse/touch events mapped to its ToolBindings.
          • Can add data if an annotation tool.
          • Can be passively interacted by grabbing a tool or its handles.
          • Renders data if the tool has a renderAnnotation method.

          Parameters

          Returns void

        publicsetToolConfiguration

        • setToolConfiguration(toolName: string, configuration: ToolConfiguration, overwrite?: boolean): boolean
        • Set a configuration of a tool by the given toolName. Use overwrite as true in case you want to overwrite any existing configuration (be careful, depending on config change it might break the annotation flow).


          Parameters

          Returns boolean

        publicsetToolDisabled

        • setToolDisabled(toolName: string): void
        • Set the tool mode on the toolGroup to be Disabled.

          • Annotation does not render.

          Parameters

          • toolName: string

            tool name

          Returns void

        publicsetToolEnabled

        • setToolEnabled(toolName: string): void
        • Set the tool mode on the toolGroup to be Enabled.

          • Renders data if the tool has a renderAnnotation method..

          Parameters

          • toolName: string

            tool name

          Returns void

        setToolMode

        publicsetToolPassive

        • setToolPassive(toolName: string, options?: { removeAllBindings?: boolean | IToolBinding[] }): void
        • Set the tool mode on the toolGroup to be Passive.

          • Can be passively interacted by grabbing a tool or its handles.
          • Renders data if the tool has a renderAnnotation method.

          Parameters

          • toolName: string

            tool name

          • optionaloptions: { removeAllBindings?: boolean | IToolBinding[] }

            Options used when setting the tool as passive

            • removeAllBindings: only the primary button bindings are removed but if this parameter is set to true all bindings are removed.

          Returns void

        publicsetViewportsCursorByToolName

        • setViewportsCursorByToolName(toolName: string, strategyName?: string): void
        • Parameters

          • toolName: string
          • optionalstrategyName: string

          Returns void

        Interfaces

        IAnnotationManager

        IAnnotationManager:

        The interface for any annotation manager (custom or default)

        addAnnotation

        addAnnotation: (annotation: Annotation, groupKey: string) => void

        Type declaration

          • Adds an annotation to the specified group.


            Parameters

            • annotation: Annotation

              The annotation to add.

            • groupKey: string

              The group key to add the annotation to.

            Returns void

        getAnnotation

        getAnnotation: (annotationUID: string) => Annotation

        Type declaration

          • Returns the annotation with the specified UID.


            Parameters

            • annotationUID: string

              The UID of the annotation to retrieve.

            Returns Annotation

            The annotation with the specified UID.

        getAnnotations

        getAnnotations: (groupKey: string, toolName?: string) => Annotations | GroupSpecificAnnotations

        Type declaration

          • Returns the annotations associated with the specified group, if the toolName is specified, it will return the annotations for the specified tool.


            Parameters

            • groupKey: string

              The group key to retrieve annotations for.

            • optionaltoolName: string

              The name of the tool to retrieve annotations for.

            Returns Annotations | GroupSpecificAnnotations

            The annotations associated with the specified group and tool.

        getGroupKey

        getGroupKey: (annotationGroupSelector: AnnotationGroupSelector) => string

        Type declaration

          • Annotations are stored in Groups. Our default annotation manager groups the annotations based on FrameOfReferenceUID, but it is possible that you can group them based on different aspects or you only have one group totally.

            This function returns the group key associated with the specified annotationGroupSelector. The annotationGroupSelector can be an HTML element or a string.


            Parameters

            Returns string

            The group key associated with the element.

        getNumberOfAllAnnotations

        getNumberOfAllAnnotations: () => number

        Type declaration

          • (): number
          • Returns the total number of annotations across all groups.


            Returns number

            The total number of annotations across all groups.

        getNumberOfAnnotations

        getNumberOfAnnotations: (groupKey: string, toolName?: string) => number

        Type declaration

          • (groupKey: string, toolName?: string): number
          • Returns the number of annotations associated with the specified group. If the toolName is specified, it will return the number of annotations


            Parameters

            • groupKey: string

              The group key to count annotations for.

            • optionaltoolName: string

              The name of the tool to count annotations for.

            Returns number

            The number of annotations associated with the specified group.

        removeAllAnnotations

        removeAllAnnotations: () => void

        Type declaration

          • (): void
          • Removes all annotations.


            Returns void

        removeAnnotation

        removeAnnotation: (annotationUID: string) => void

        Type declaration

          • (annotationUID: string): void
          • Removes the annotation with the specified UID.


            Parameters

            • annotationUID: string

              The UID of the annotation to remove.

            Returns void

        removeAnnotations

        removeAnnotations: (groupKey: string) => void

        Type declaration

          • (groupKey: string): void
          • Removes all annotations associated with the specified group.


            Parameters

            • groupKey: string

              The group key to remove annotations for.

            Returns void

        ISculptToolShape

        ISculptToolShape:

        This interface defines a contract for implementing various shapes within the sculptor tool. Classes such as CircleSculptCursor adhere to this interface, providing specific implementations for sculptor tools to utilize the shape during sculpting operations.

        configureToolSize

        • configureToolSize(evt: InteractionEventType): void
        • Function configures the tool size


          Parameters

          • evt: InteractionEventType

          Returns void

        getInsertPosition

        • getInsertPosition(previousIndex: number, nextIndex: number, sculptData: SculptData): Point3
        • Function returns the the position to insert new handle


          Parameters

          • previousIndex: number

            Previous handle index

          • nextIndex: number

            Next handle index

          • sculptData: SculptData

            Sculpt data

          Returns Point3

        getMaxSpacing

        • getMaxSpacing(minSpacing: number): number
        • Function returns max spacing between two handles


          Parameters

          • minSpacing: number

          Returns number

        pushHandles

        • pushHandles(viewport: IViewport, sculptData: SculptData): PushedHandles
        • Pushes the points radially away from the mouse if they are contained within the shape defined by the freehandSculpter tool


          Parameters

          • viewport: IViewport
          • sculptData: SculptData

          Returns PushedHandles

        renderShape

        • renderShape(svgDrawingHelper: SVGDrawingHelper, canvasLocation: Point2, options: any): void
        • Used to render shapes supported for sculptor tool


          Parameters

          • svgDrawingHelper: SVGDrawingHelper

            The svgDrawingHelper providing the context for drawing.

          • canvasLocation: Point2

            Current canvas location in canvas index coordinates

          • options: any

            Options for drawing shapes

          Returns void

        updateToolSize

        • updateToolSize(canvasCoords: Point2, viewport: IViewport, activeAnnotation: ContourAnnotation): void
        • Updates the tool size


          Parameters

          • canvasCoords: Point2

            Current canvas points

          • viewport: IViewport
          • activeAnnotation: ContourAnnotation

          Returns void

        ISpline

        ISpline:

        Spline curve interface

        aabb

        • get aabb(): AABB2
        • Axis-aligned bounding box (minX, minY, maxX, maxY)


          Returns AABB2

        closed

        • get closed(): boolean
        • set closed(closed: boolean): void
        • Flag that is set to true when the curve is already closed


          Returns boolean

        • Set the curve as closed which connects the last to the first point


          Parameters

          • closed: boolean

          Returns void

        fixedResolution

        • get fixedResolution(): boolean
        • Fixed resolution (eg: Linear Spline)


          Returns boolean

        invalidated

        • get invalidated(): boolean
        • Flag that is set to true when the spline needs to be updated. The update runs automaticaly when needed (eg: getPolylinePoints).


          Returns boolean

        length

        • get length(): number
        • Length of the spline curve in pixels


          Returns number

        numControlPoints

        • get numControlPoints(): number
        • Number of control points


          Returns number

        resolution

        • get resolution(): number
        • set resolution(resolution: number): void
        • Resolution of the spline curve (greater than or equal to 0)


          Returns number

        • Set the resolution of the spline curve


          Parameters

          • resolution: number

          Returns void

        addControlPoint

        • addControlPoint(point: Point2): void
        • Add a control point to the end of the array


          Parameters

          • point: Point2

            Control point (2D)

          Returns void

        addControlPointAtU

        • Add a control point specifying its u value in Parameter Space which is a number from 0 to N where N is the number of curve segments. The integer part is the curve segment index and the decimal part is the t value on that curve segment.


          Parameters

          • u: number

            u value in Parameter Space

          Returns ControlPointInfo

        addControlPoints

        • addControlPoints(points: Point2[]): void
        • Add a list of control poits to the end of the array


          Parameters

          • points: Point2[]

            Control points to be added

          Returns void

        clearControlPoints

        • clearControlPoints(): void
        • Remove all control points


          Returns void

        containsPoint

        • containsPoint(point: Point2): boolean
        • Checks if a 2D point is inside the spline curve.

          A point is inside a curve/polygon if the number of intersections between the horizontal ray emanating from the given point and to the right and the line segments is odd. https://www.eecs.umich.edu/courses/eecs380/HANDOUTS/PROJ2/InsidePoly.html


          Parameters

          • point: Point2

            2D Point

          Returns boolean

          True is the point is inside the spline curve or false otherwise

        deleteControlPointByIndex

        • deleteControlPointByIndex(index: number): boolean
        • Delete a control point given its index


          Parameters

          • index: number

            Control point index to be removed

          Returns boolean

          True if the control point is removed or false otherwise

        getClosestControlPoint

        • Finds the closest control point given a 2D point


          Parameters

          • point: Point2

            Reference point

          Returns ClosestControlPoint

          Closest control point

        getClosestControlPointWithinDistance

        • Finds the closest control point given a 2D point and a maximum distance


          Parameters

          • point: Point2

            Reference 2D point

          • range: number

          Returns ClosestControlPoint

          Closest control point that is within the given range or undefined otherwise

        getClosestPoint

        • Finds the closest point on the spline curve given 2D point


          Parameters

          • point: Point2

            Reference 2D point

          Returns ClosestSplinePoint

          Closest point on the spline curve

        getClosestPointOnControlPointLines

        • getClosestPointOnControlPointLines(point: Point2): ClosestPoint
        • Finds the closest point on the straight line that connects all control points given a 2D point


          Parameters

          • point: Point2

            Reference point

          Returns ClosestPoint

          Closest point on the straight line that connects all control points

        getControlPoints

        • getControlPoints(): Point2[]
        • Get a list with all control points. The control points are cloned to prevent any caller from changing them resulting in unexpected behaviors


          Returns Point2[]

          • List of all control points

        getPolylinePoints

        • getPolylinePoints(): Point2[]
        • Get all points necessary to draw a spline curve


          Returns Point2[]

          Array with all points necessary to draw a spline curve

        getPreviewPolylinePoints

        • getPreviewPolylinePoints(controlPointPreview: Point2, closeDistance: number): Point2[]
        • Get all points necessary to draw the preview curve for a new possible control point


          Parameters

          • controlPointPreview: Point2
          • closeDistance: number

          Returns Point2[]

          Array with all points necessary to draw the preview curve

        hasTangentPoints

        • hasTangentPoints(): boolean
        • Bézier curves have tangent points connected to control points


          Returns boolean

          True if the spline has tangent point or false otherwise

        isPointNearCurve

        • isPointNearCurve(point: Point2, maxDist: number): boolean
        • Checks if a point is near to the spline curve


          Parameters

          • point: Point2

            Reference point

          • maxDist: number

            Maximum allowed distance

          Returns boolean

          True if the point is close to the spline curve or false otherwise

        setControlPoints

        • setControlPoints(points: Point2[]): void
        • Replace all control points by some new ones


          Parameters

          • points: Point2[]

            Control points to be added to the array

          Returns void

        updateControlPoint

        • updateControlPoint(index: number, newControlPoint: Point2): void
        • Update the coordinate of a control point given its index


          Parameters

          • index: number

            Control point index

          • newControlPoint: Point2

            New control point

          Returns void

        ISynchronizerEventHandler

        • ISynchronizerEventHandler(synchronizer: Synchronizer, sourceViewport: default, targetViewport: default, sourceEvent: any, options?: any): void | Promise<void>
        • Parameters

          • synchronizer: Synchronizer
          • sourceViewport: default
          • targetViewport: default
          • sourceEvent: any
          • optionaloptions: any

          Returns void | Promise<void>

        Type Aliases

        Annotation

        Annotation: { annotationUID?: string; autoGenerated?: boolean; childAnnotationUIDs?: string[]; data: { cachedStats?: unknown; handles?: { activeHandleIndex?: number | null; points?: Types.Point3[]; textBox?: { hasMoved: boolean; worldBoundingBox?: { bottomLeft: Types.Point3; bottomRight: Types.Point3; topLeft: Types.Point3; topRight: Types.Point3 }; worldPosition: Types.Point3 } } }; highlighted?: boolean; invalidated?: boolean; isLocked?: boolean; isVisible?: boolean; metadata: Types.ViewReference & { cameraPosition?: Types.Point3; toolName: string; viewUp?: Types.Point3 }; parentAnnotationUID?: string }

        Type declaration

        • optionalannotationUID?: string

          A unique identifier for this annotation

        • optionalautoGenerated?: boolean

          If the annotation is auto generated from other annotations

        • optionalchildAnnotationUIDs?: string[]

          Array that contains all child annotation UID

          An annotation may have one or more child annotations when it is contour and have some holes in it.

        • data: { cachedStats?: unknown; handles?: { activeHandleIndex?: number | null; points?: Types.Point3[]; textBox?: { hasMoved: boolean; worldBoundingBox?: { bottomLeft: Types.Point3; bottomRight: Types.Point3; topLeft: Types.Point3; topRight: Types.Point3 }; worldPosition: Types.Point3 } } }

          Data for annotation, Derivatives need to define their own data types.

          • [key string]: any
          • optionalcachedStats?: unknown

            Cached Annotation statistics which is specific to the tool

          • optionalhandles?: { activeHandleIndex?: number | null; points?: Types.Point3[]; textBox?: { hasMoved: boolean; worldBoundingBox?: { bottomLeft: Types.Point3; bottomRight: Types.Point3; topLeft: Types.Point3; topRight: Types.Point3 }; worldPosition: Types.Point3 } }

            Annotation handles that are grabbable for manipulation

            • [key string]: any
            • optionalactiveHandleIndex?: number | null

              index of the active handle being manipulated

            • optionalpoints?: Types.Point3[]

              world location of the handles in the space

            • optionaltextBox?: { hasMoved: boolean; worldBoundingBox?: { bottomLeft: Types.Point3; bottomRight: Types.Point3; topLeft: Types.Point3; topRight: Types.Point3 }; worldPosition: Types.Point3 }

              annotation text box information

              • hasMoved: boolean

                whether the text box has moved

              • optionalworldBoundingBox?: { bottomLeft: Types.Point3; bottomRight: Types.Point3; topLeft: Types.Point3; topRight: Types.Point3 }

                text box bounding box information

                • bottomLeft: Types.Point3

                  Bottom left location of the text box in the world space

                • bottomRight: Types.Point3

                  Bottom right location of the text box in the world space

                • topLeft: Types.Point3

                  Top left location of the text box in the world space

                • topRight: Types.Point3

                  Top right location of the text box in the world space

              • worldPosition: Types.Point3

                the world location of the text box

        • optionalhighlighted?: boolean

          If the annotation is being hovered over and is highlighted

        • optionalinvalidated?: boolean

          Has annotation data been invalidated (e.g., as a result of mouse interactions)

        • optionalisLocked?: boolean

          If the annotation is locked for manipulation

        • optionalisVisible?: boolean

          If the annotation is visible for manipulation

        • metadata: Types.ViewReference & { cameraPosition?: Types.Point3; toolName: string; viewUp?: Types.Point3 }

          Metadata for annotation

        • optionalparentAnnotationUID?: string

          Parent annotation UID

          An annotation may have a parent annotation when it is, for example, a hole inside a contour.

        AnnotationGroupSelector

        AnnotationGroupSelector: HTMLDivElement | string

        AnnotationGroupSelector is a type that can be used to specify the group of annotations to which an annotation should be added.

        AnnotationHandle

        AnnotationHandle: Types.Point3

        Handle position in the world coordinates

        AnnotationRenderContext

        AnnotationRenderContext: { annotation: Annotation; annotationStyle: Record<string, any>; enabledElement: Types.IEnabledElement; svgDrawingHelper: SVGDrawingHelper; targetId: string }

        Type declaration

        • annotation: Annotation
        • annotationStyle: Record<string, any>
        • enabledElement: Types.IEnabledElement
        • svgDrawingHelper: SVGDrawingHelper
        • targetId: string

        AnnotationState

        AnnotationState: {}

        All frame of reference specific annotations for all tools.


        Type declaration

        Annotations

        Annotations: Annotation[]

        Array of annotations

        BidirectionalData

        BidirectionalData: { color?: string | number[]; label?: string; majorAxis: [Types.Point3, Types.Point3]; maxMajor: number; maxMinor: number; minorAxis: [Types.Point3, Types.Point3]; referencedImageId: string; segmentIndex: number; sliceIndex: number }

        Type declaration

        • optionalcolor?: string | number[]
        • optionallabel?: string
        • majorAxis: [Types.Point3, Types.Point3]
        • maxMajor: number
        • maxMinor: number
        • minorAxis: [Types.Point3, Types.Point3]
        • referencedImageId: string
        • segmentIndex: number
        • sliceIndex: number

        BoundsIJK

        BoundsIJK: Types.BoundsIJK

        CanvasCoordinates

        CanvasCoordinates: [Types.Point2, Types.Point2, Types.Point2, Types.Point2]

        CardinalSplineProps

        CardinalSplineProps: SplineProps & { fixedScale?: boolean; scale?: number }

        Cardinal spline properties

        ClosestControlPoint

        ClosestControlPoint: ClosestPoint & { index: number }

        ClosestPoint

        ClosestPoint: { distance: number; point: Types.Point2 }

        Type declaration

        • distance: number

          Distance to the reference point

        • point: Types.Point2

          2D coordinate

        ClosestSplinePoint

        ClosestSplinePoint: ClosestPoint & { uValue: number }

        ContourAnnotation

        ContourAnnotation: Annotation & ContourAnnotationData

        ContourAnnotationData

        ContourAnnotationData: { data: { contour: { closed: boolean; polyline: Types.Point3[]; windingDirection?: ContourWindingDirection } }; onInterpolationComplete?: () => void }

        Type declaration

        • data: { contour: { closed: boolean; polyline: Types.Point3[]; windingDirection?: ContourWindingDirection } }
          • contour: { closed: boolean; polyline: Types.Point3[]; windingDirection?: ContourWindingDirection }
            • closed: boolean
            • polyline: Types.Point3[]
            • optionalwindingDirection?: ContourWindingDirection
        • optionalonInterpolationComplete?: () => void
            • (): void
            • Returns void

        ContourSegmentationAnnotation

        ContourSegmentationAnnotation: ContourAnnotation & ContourSegmentationAnnotationData

        ContourSegmentationAnnotationData

        ContourSegmentationAnnotationData: { autoGenerated?: boolean; data: { contour: { originalPolyline?: Types.Point3[] }; segmentation: { segmentIndex: number; segmentationId: string } }; handles?: { interpolationSources?: Types.PointsManager<Types.Point3>[] }; interpolationCompleted?: boolean; interpolationUID?: string; metadata?: { originalToolName?: string }; onInterpolationComplete?: (annotation: ContourSegmentationAnnotation) => unknown }

        Type declaration

        • optionalautoGenerated?: boolean
        • data: { contour: { originalPolyline?: Types.Point3[] }; segmentation: { segmentIndex: number; segmentationId: string } }
          • contour: { originalPolyline?: Types.Point3[] }
            • optionaloriginalPolyline?: Types.Point3[]

              The original polyline before livewire, to show comparison with regenerated data (eg based on spline or livewire changes).

          • segmentation: { segmentIndex: number; segmentationId: string }
            • segmentIndex: number
            • segmentationId: string
        • optionalhandles?: { interpolationSources?: Types.PointsManager<Types.Point3>[] }
          • optionalinterpolationSources?: Types.PointsManager<Types.Point3>[]

            Segmentation contours can be interpolated between slices to produce intermediate data. The interpolation sources are source data for the interpolation corresponding to the handle points. The object will have the kIndex assigned so that one can determine relative slice locations that the handles are in originally.

            This does NOT necessarily correspond to the handles used on the original source data, but is the set of point uses to interpolate the current handles. That is, for linear interpolation:

              handles.points[i] = linear(interpolationSources[0].getPoint(i),
            interpolationSources[1].getPoint(i));

            These are sometimes required for things like livewire which need to update the handle position with a snap to nearest live point or can be used as an indicator that interpolation has taken place.

        • optionalinterpolationCompleted?: boolean
        • optionalinterpolationUID?: string
        • optionalmetadata?: { originalToolName?: string }
          • optionaloriginalToolName?: string

            The original name of the tool before adding/removing holes and contours

        • optionalonInterpolationComplete?: (annotation: ContourSegmentationAnnotation) => unknown

        ContourSegmentationData

        ContourSegmentationData: { annotationUIDsMap?: Map<number, Set<string>>; geometryIds?: string[] }

        Type declaration

        • optionalannotationUIDsMap?: Map<number, Set<string>>
        • optionalgeometryIds?: string[]

        ControlPointInfo

        ControlPointInfo: { index: number; point: Types.Point2 }

        Type declaration

        • index: number

          Control point index

        • point: Types.Point2

          2D coordinate

        FloodFillGetter

        FloodFillGetter: FloodFillGetter2D | FloodFillGetter3D

        FloodFillOptions

        FloodFillOptions: { diagonals?: boolean; equals?: (a: any, b: any) => boolean; onBoundary?: (x: number, y: number, z?: number) => void; onFlood?: (x: number, y: number, z?: number) => void }

        Type declaration

        • optionaldiagonals?: boolean
        • optionalequals?: (a: any, b: any) => boolean
            • (a: any, b: any): boolean
            • Parameters

              • a: any
              • b: any

              Returns boolean

        • optionalonBoundary?: (x: number, y: number, z?: number) => void
            • (x: number, y: number, z?: number): void
            • Parameters

              • x: number
              • y: number
              • optionalz: number

              Returns void

        • optionalonFlood?: (x: number, y: number, z?: number) => void
            • (x: number, y: number, z?: number): void
            • Parameters

              • x: number
              • y: number
              • optionalz: number

              Returns void

        FloodFillResult

        FloodFillResult: { boundaries: Types.Point2[] | Types.Point3[]; flooded: Types.Point2[] | Types.Point3[] }

        Type declaration

        • boundaries: Types.Point2[] | Types.Point3[]
        • flooded: Types.Point2[] | Types.Point3[]

        GroupSpecificAnnotations

        GroupSpecificAnnotations: {}

        Type declaration

        IDistance

        IDistance: { canvas: number; client: number; page: number; world: number }

        Distance in page, client, canvas and world coordinates.


        Type declaration

        • canvas: number

          canvas distance

        • client: number

          client distance

        • page: number

          page distance

        • world: number

          world distance

        IPoints

        IPoints: { canvas: Types.Point2; client: Types.Point2; page: Types.Point2; world: Types.Point3 }

        Points in page, client, canvas and world coordinates.


        Type declaration

        • canvas: Types.Point2

          canvas coordinates of the point

        • client: Types.Point2

          client coordinates of the point

        • page: Types.Point2

          page coordinates of the point

        • world: Types.Point3

          world coordinates of the point

        IToolBinding

        IToolBinding: { modifierKey?: ToolBindingKeyboardType; mouseButton?: ToolBindingMouseType; numTouchPoints?: number }

        Type declaration

        • optionalmodifierKey?: ToolBindingKeyboardType

          Keyboard bindings e.g., KeyboardBindings.Shift/Ctrl etc.

        • optionalmouseButton?: ToolBindingMouseType

          Mouse button bindings e.g., MouseBindings.Primary/Secondary etc.

        • optionalnumTouchPoints?: number

          Number of touch points

        IToolClassReference

        IToolClassReference: new <T>(config: any) => T

        Type declaration

          • new <T>(config: any): T
          • Type parameters

            Parameters

            • config: any

            Returns T

        ITouchPoints

        ITouchPoints: IPoints & { touch: { force: number; identifier: string; radiusX: number; radiusY: number; rotationAngle: number } }

        ImageInterpolationData

        ImageInterpolationData: { annotations?: Annotation[]; sliceIndex: number }

        Type declaration

        • optionalannotations?: Annotation[]
        • sliceIndex: number

        InteractionTypes

        InteractionTypes: Mouse | Touch

        Supported Interactions for tools

        InterpolationViewportData

        InterpolationViewportData: { annotation: InterpolationROIAnnotation; interpolationUID: string; isInterpolationUpdate?: boolean; sliceData: Types.ImageSliceData; viewport: Types.IViewport }

        A base viewport and annotation information used to start interpolating between slices.


        Type declaration

        • annotation: InterpolationROIAnnotation

          The annotation that was just completed.

        • interpolationUID: string

          The type of event, whether initializing the label or updating it.

        • optionalisInterpolationUpdate?: boolean

          True if the interpolation data is being regenerated because of an update

        • sliceData: Types.ImageSliceData
        • viewport: Types.IViewport

          The viewport that this interpolation is occurring within

        JumpToSliceOptions

        JumpToSliceOptions: { debounceLoading?: boolean; imageIndex: number; volumeId?: string }

        Type declaration

        • optionaldebounceLoading?: boolean
        • imageIndex: number
        • optionalvolumeId?: string

        LabelmapToolOperationData

        LabelmapToolOperationData: { points: Types.Point3[]; preview: any; previewColors?: Record<number, [number, number, number, number]>; segmentIndex: number; segmentationId: string; segmentationRepresentationUID: string; segmentsLocked: number[]; strategySpecificConfiguration: any; toolGroupId: string; viewPlaneNormal: number[]; viewUp: number[] }

        Type declaration

        • points: Types.Point3[]
        • preview: any

          preview is used for sharing preview data between views/interactions with a tool, and needs to be maintained by the tool side in order to be able to accept/reject/update the preview information.

        • optionalpreviewColors?: Record<number, [number, number, number, number]>

          The colours to use for previewing

        • segmentIndex: number
        • segmentationId: string
        • segmentationRepresentationUID: string
        • segmentsLocked: number[]
        • strategySpecificConfiguration: any
        • toolGroupId: string
        • viewPlaneNormal: number[]
        • viewUp: number[]

        LabelmapToolOperationDataStack

        LabelmapToolOperationDataStack: LabelmapToolOperationData & LabelmapSegmentationDataStack

        LabelmapToolOperationDataVolume

        LabelmapToolOperationDataVolume: LabelmapToolOperationData & LabelmapSegmentationDataVolume

        NamedStatistics

        NamedStatistics: { area?: Statistics & { name: area }; array: Statistics[]; circumferance?: Statistics & { name: circumferance }; count: Statistics & { name: count }; max: Statistics & { name: max }; mean: Statistics & { name: mean }; stdDev: Statistics & { name: stdDev }; stdDevWithSumSquare: Statistics & { name: stdDevWithSumSquare }; volume?: Statistics & { name: volume } }

        Type declaration

        PlanarBoundingBox

        PlanarBoundingBox: { height: number; width: number; x: number; y: number }

        Type declaration

        • height: number
        • width: number
        • x: number
        • y: number

        PolySegConversionOptions

        PolySegConversionOptions: { segmentIndices?: number[]; segmentationRepresentationUID?: string; viewport?: Types.IStackViewport | Types.IVolumeViewport }

        Type declaration

        • optionalsegmentIndices?: number[]
        • optionalsegmentationRepresentationUID?: string
        • optionalviewport?: Types.IStackViewport | Types.IVolumeViewport

        PublicToolProps

        PublicToolProps: SharedToolProp & { name?: string }

        Tool specific tool properties which includes the supported interaction types and the configuration.

        RepresentationConfig

        RepresentationConfig: { CONTOUR?: ContourConfig; LABELMAP?: LabelmapConfig; SURFACE?: any }

        Type declaration

        • optionalCONTOUR?: ContourConfig

          contour configuration

        • optionalLABELMAP?: LabelmapConfig

          labelmap configuration

        • optionalSURFACE?: any

          surface configuration

        RepresentationPublicInput

        RepresentationPublicInput: { options?: RepresentationPublicInputOptions; segmentationId: string; type: Enums.SegmentationRepresentations }

        Type declaration

        SVGCursorDescriptor

        SVGCursorDescriptor: { iconContent: string; iconSize: number; mousePoint: SVGPoint; mousePointerGroupString: string; viewBox: SVGPoint }

        Type declaration

        • iconContent: string
        • iconSize: number
        • mousePoint: SVGPoint
        • mousePointerGroupString: string
        • viewBox: SVGPoint

        SVGDrawingHelper

        SVGDrawingHelper: { appendNode: (svgNode: SVGElement, cacheKey: string) => void; clearUntouched: () => void; getSvgNode: (cacheKey: string) => SVGGElement | undefined; setNodeTouched: (cacheKey: string) => void; svgLayerElement: HTMLDivElement; svgNodeCacheForCanvas: Record<string, unknown> }

        Type declaration

        • appendNode: (svgNode: SVGElement, cacheKey: string) => void
            • (svgNode: SVGElement, cacheKey: string): void
            • Parameters

              • svgNode: SVGElement
              • cacheKey: string

              Returns void

        • clearUntouched: () => void
            • (): void
            • Returns void

        • getSvgNode: (cacheKey: string) => SVGGElement | undefined
            • (cacheKey: string): SVGGElement | undefined
            • Parameters

              • cacheKey: string

              Returns SVGGElement | undefined

        • setNodeTouched: (cacheKey: string) => void
            • (cacheKey: string): void
            • Parameters

              • cacheKey: string

              Returns void

        • svgLayerElement: HTMLDivElement
        • svgNodeCacheForCanvas: Record<string, unknown>

        SVGPoint

        SVGPoint: { x: number; y: number }

        Type declaration

        • x: number
        • y: number

        ScrollOptions

        ScrollOptions: { debounceLoading?: boolean; delta: number; loop?: boolean; scrollSlabs?: boolean; volumeId?: string }

        Type declaration

        • optionaldebounceLoading?: boolean
        • delta: number
        • optionalloop?: boolean
        • optionalscrollSlabs?: boolean
        • optionalvolumeId?: string

        Segmentation

        Segmentation: { activeSegmentIndex: number; cachedStats: {}; label: string; representationData: SegmentationRepresentationData; segmentLabels: {}; segmentationId: string; segmentsLocked: Set<number>; type: Enums.SegmentationRepresentations }

        Global Segmentation Data which is used for the segmentation


        Type declaration

        • activeSegmentIndex: number

          Active segment index in the segmentation, this index will get used inside the segmentation tools

        • cachedStats: {}

          If there is any derived statistics for the segmentation (e.g., mean, volume, etc)

          • [key string]: number
        • label: string

          segmentation label

        • representationData: SegmentationRepresentationData

          Representations of the segmentation. Each segmentation “can” be viewed in various representations. For instance, if a DICOM SEG is loaded, the main representation is the labelmap. However, for DICOM RT the main representation is contours, and other representations can be derived from the contour (currently only labelmap representation is supported)

        • segmentLabels: {}
          • [key string]: string
        • segmentationId: string

          segmentation id

        • segmentsLocked: Set<number>

          Locked segments in the segmentation, if a segment is locked no tool will be able to modify it

        • type: Enums.SegmentationRepresentations

          segmentation main representation type

        SegmentationRepresentationConfig

        SegmentationRepresentationConfig: { renderInactiveSegmentations: boolean; representations: RepresentationConfig }

        Type declaration

        • renderInactiveSegmentations: boolean

          Whether to render Inactive segmentations

        • representations: RepresentationConfig

          Representations configuration

        SegmentationRepresentationData

        SegmentationRepresentationData: { CONTOUR?: ContourSegmentationData; LABELMAP?: LabelmapSegmentationData; SURFACE?: SurfaceSegmentationData }

        Type declaration

        • optionalCONTOUR?: ContourSegmentationData
        • optionalLABELMAP?: LabelmapSegmentationData
        • optionalSURFACE?: SurfaceSegmentationData

        SegmentationState

        SegmentationState: { colorLUT: Types.ColorLUT[]; globalConfig: SegmentationRepresentationConfig; segmentations: Segmentation[]; toolGroups: {} }

        Segmentation State stored inside the cornerstone3DTools

         {
        colorLUT: [],
        globalConfig: {
        renderInactiveSegmentations: false,
        representations: {
        LABELMAP: {
        renderFill: true,
        renderOutline: true,
        },
        },
        },
        segmentations: [
        {
        segmentationId: 'segmentation1',
        mainType: 'Labelmap',
        activeSegmentIndex: 0,
        segmentsLocked: new Set(),
        label: 'segmentation1',
        cachedStats: {},
        representationData: {
        LABELMAP: {
        volumeId: 'segmentation1',
        },
        CONTOUR: {
        geometryIds: ['contourSet1', 'contourSet2'],
        },
        },
        },
        {
        segmentationId: 'segmentation2',
        type: 'Labelmap',
        activeSegmentIndex: 1,
        segmentsLocked: new Set(),
        label: 'segmentation2',
        cachedStats: {},
        representationData: {
        CONTOUR: {
        points: Float32Array,
        },
        },
        },
        ],
        toolGroups: {
        toolGroupUID1: {
        segmentationRepresentations: [
        {
        segmentationRepresentationUID: '12123123123132',
        segmentationId: '123123',
        type: 'Labelmap',
        active: true,
        colorLUTIndex: 0,
        visibility: true,
        segmentsHidden: Set(),
        // rendering config
        config: {
        "cfun",
        "ofun",
        },
        // segmentation representation specific config, has priority over the one in the outer scope
        segmentationRepresentationSpecificConfig: {
        LABELMAP: {
        renderFill: true,
        }
        }
        // segment specific config
        segmentSpecificConfig: {
        1: {
        renderFill: false,
        }
        },
        },
        ],
        config: {
        renderInactiveSegmentations: false,
        representations: {
        LABELMAP: {
        renderFill: true,
        renderOutline: true,
        },
        },
        },
        },
        },
        }

        Type declaration

        SetToolBindingsType

        SetToolBindingsType: { bindings: IToolBinding[] }

        Type declaration

        • bindings: IToolBinding[]

          bindings for the toolGroup’s tool when it is set to be active

        SplineCurveSegment

        SplineCurveSegment: { aabb: Types.AABB2; controlPoints: { p0: Types.Point2; p1: Types.Point2; p2: Types.Point2; p3: Types.Point2 }; length: number; lineSegments: SplineLineSegment[]; previousCurveSegmentsLength: number }

        Spline curve segment the is part of a spline path


        Type declaration

        • aabb: Types.AABB2

          Axis-aligned bounding (minX, minY, maxX, maxY)

        • controlPoints: { p0: Types.Point2; p1: Types.Point2; p2: Types.Point2; p3: Types.Point2 }

          Control Points that influences the spline curve segment.

          For cubic splines the curve goes from P1 and P2 but it is also influenced by the previous point (P0) and the next point (P3)

          • p0: Types.Point2
          • p1: Types.Point2
          • p2: Types.Point2
          • p3: Types.Point2
        • length: number

          Length of the curve segment

        • lineSegments: SplineLineSegment[]

          Line segments that makes the curve segment

        • previousCurveSegmentsLength: number

          Total length of all previous curve segments

        SplineLineSegment

        SplineLineSegment: { aabb: Types.AABB2; length: number; points: { end: Types.Point2; start: Types.Point2 }; previousLineSegmentsLength: number }

        Line segment the is part of a curve segment based on its resolution. Each curve segment shall have 20 line segments when spline resolution is set to 20.


        Type declaration

        • aabb: Types.AABB2

          Axis-aligned bounding (minX, minY, maxX, maxY)

        • length: number

          Length of the line segment

        • points: { end: Types.Point2; start: Types.Point2 }

          Start and end points for the line segment

          • end: Types.Point2
          • start: Types.Point2
        • previousLineSegmentsLength: number

          Total length of all previous line segments for a given curve segment

        SplineProps

        SplineProps: { closed?: boolean; fixedResolution?: boolean; resolution?: number }

        Type declaration

        • optionalclosed?: boolean

          Flag that is set to true when the curve is closed

        • optionalfixedResolution?: boolean

          Fixed resolution (Linear spline)

          Splines with fixedResolution set to true shall attempt to change the resolution (eg: spline.resolution = 10). That is useful, for example, for linear splines because having more line segments between two control points would not change its resolution and that is why it is fixed to 0.

        • optionalresolution?: number

          Resolution of the spline curve

          The number assigned to the resolution is the number of intermediate points on each curve segment that makes the spline path. For example, if the resolution is set to 0 that means that each curve segment will have no intermediate points but only a straight line similar to Linear Spline. For a resolution equal to 20 that means the curve shall have 20 intermediate points or 21 line segments total making it look more like a curve.

        Statistics

        Statistics: { label?: string; name: string; unit: null | string; value: number | number[] }

        Type declaration

        • optionallabel?: string
        • name: string
        • unit: null | string
        • value: number | number[]

        TextBoxHandle

        TextBoxHandle: { hasMoved: boolean; worldBoundingBox: { bottomLeft: Types.Point3; bottomRight: Types.Point3; topLeft: Types.Point3; topRight: Types.Point3 }; worldPosition: Types.Point3 }

        TextBox handle type specifying its location in the world including bottomLeft and topRight and bottomRight and topLeft points, and its center world coordinates.


        Type declaration

        • hasMoved: boolean
        • worldBoundingBox: { bottomLeft: Types.Point3; bottomRight: Types.Point3; topLeft: Types.Point3; topRight: Types.Point3 }
          • bottomLeft: Types.Point3
          • bottomRight: Types.Point3
          • topLeft: Types.Point3
          • topRight: Types.Point3
        • worldPosition: Types.Point3

        ToolAction

        ToolAction: { bindings: SetToolBindingsType[]; method: string | (evt: InteractionEventType, annotation: Annotation) => void }

        An action that may be defined at the tool configuration level

        Annotations can have actions that run a specific task (ex: showing a dropdown containing a list of all predefined zoom levels - advanced magnifier glass). Each action must have at least one binding option (mouse button + [modifier(s)]) and a action runs if and only if no other tool is using that same binding options to draw an annotation because action has lower priority.

        Actions are defined in the following way in a annotation tool constructor:

        class MyAnnotationTool extends AnnotationTool { constructor( toolProps: PublicToolProps = {}, defaultToolProps: ToolProps = { configuration: { actions: [ { method: ‘myAction’, bindings: [ { mouseButton: MouseBindings.Secondary, modifierKey: KeyboardBindings.Shift, } ] } ] } } ) { super(toolProps, defaultToolProps); }

        public myAction(evt: EventTypes.InteractionEventType, annotation: MyAnnotation) { // action code } }

        The “method” property may be a string or a javascript function. In case it is a string a function with same name must exists in the tool class. In both ways (string or function) the function is called in the tool’s context (this)


        Type declaration

        ToolConfiguration

        ToolConfiguration: Record<string, any> & { statsCalculator?: Calculator }

        ToolGroupSpecificContourRepresentation

        ToolGroupSpecificContourRepresentation: ToolGroupSpecificRepresentationState & { config: ContourRenderingConfig; segmentSpecificConfig?: SegmentSpecificRepresentationConfig; segmentationRepresentationSpecificConfig?: RepresentationConfig }

        ToolGroupSpecificLabelmapRepresentation

        ToolGroupSpecificLabelmapRepresentation: ToolGroupSpecificRepresentationState & { config: LabelmapRenderingConfig; segmentSpecificConfig?: SegmentSpecificRepresentationConfig; segmentationRepresentationSpecificConfig?: RepresentationConfig }

        ToolGroup Specific Segmentation Data for segmentations. As one segmentation can be represented in various ways (currently only labelmap is supported) we store ToolGroup specific segmentation data in this object

        ToolGroupSpecificRepresentation

        ToolGroupSpecificRepresentationState

        ToolGroupSpecificRepresentationState: { active: boolean; colorLUTIndex: number; polySeg?: { enabled: boolean; options?: any }; segmentationId: string; segmentationRepresentationUID: string; segmentsHidden: Set<number>; type: Enums.SegmentationRepresentations }

        Representation state of the segmentation which is common between all representations (we don’t need to separate these states for each representation)


        Type declaration

        • active: boolean

          Whether the segmentation is the active (manipulatable) segmentation or not which means it is inactive

        • colorLUTIndex: number

          The index of the colorLUT from the state that this segmentationData is using to render

        • optionalpolySeg?: { enabled: boolean; options?: any }

          Poly Seg generated

          • enabled: boolean
          • optionaloptions?: any
        • segmentationId: string

          The segmentationId that this representation is derived from

        • segmentationRepresentationUID: string

          Segmentation Representation UID

        • segmentsHidden: Set<number>

          Hidden segment indices in the segmentation

        • type: Enums.SegmentationRepresentations

          The representation type

        ToolHandle

        Tool Handle type can be either AnnotationHandle or TextBoxHandle

        ToolOptionsType

        ToolOptionsType: { bindings: IToolBinding[]; mode: ToolModes }

        Type declaration

        • bindings: IToolBinding[]

          bindings for the toolGroup’s tool when it is set to be active

        • mode: ToolModes

          mode of the tool

        ToolProps

        ToolProps: SharedToolProp