Skip to main content

Enums

Index

Enumerations

AnnotationStyleStates

AnnotationStyleStates:

AnnotationStyleStates - This enum defines the 4 possible states available for a Annotation instance.

Default: The default state for the annotation instance Highlighted: The annotation should be rendered in “highlighted” mode in response to direct user interaction; Selected: The annotation has been selected by the user; Locked: The annotation has been locked; AutoGenerated: The annotation has been auto generated;

AutoGenerated

AutoGenerated: AutoGenerated

Default

Default:

Highlighted

Highlighted: Highlighted

Locked

Locked: Locked

Selected

Selected: Selected

ChangeTypes

ChangeTypes:

ChangeTypes defines the types of changes occurring on annotation and segmentation data.

Completed

Completed: Completed

Completed occurs only for the annotation completed event, just to identify it

HandlesUpdated

HandlesUpdated: HandlesUpdated

HandlesUpdated occurs when the handle data is added or removed, or moved around

InitialSetup

InitialSetup: InitialSetup

InitialSetup occurs when an annotation has been created initially and has the first render/data calculation being applied.

Interaction

Interaction: Interaction

Interaction events are done when the user is actively interacting with an annotation, and probably means the event shouldn’t be handled/used.

InterpolationUpdated

InterpolationUpdated: InterpolationUpdated

Occurs when an interpolation result is updated with more tool specific data.

StatsUpdated

StatsUpdated: StatsUpdated

StatsUpdated occurs when the stats are updated/calculated. This can be used to ignore stats calculations changes occurring on initial load, while still rendering other updates.

Events

Events:

The events for cornerstoneTools3D Tools. Native Mouse and Keyboard events are captured, normalized, and re-triggered with a CORNERSTONE_TOOLS prefix. This allows us to handle events consistently across different browsers.

ANNOTATION_ADDED

ANNOTATION_ADDED: CORNERSTONE_TOOLS_ANNOTATION_ADDED

Triggers on the eventTarget when a new annotation is added to the state.

Make use of Annotation Added Event Type for typing your event listeners for this annotation added event, and see what event detail is included in Annotation Added Event Detail.

ANNOTATION_COMPLETED

ANNOTATION_COMPLETED: CORNERSTONE_TOOLS_ANNOTATION_COMPLETED

Triggers on the eventTarget when a new annotation is completed its drawing Make use of Annotation Completed Event Type for typing your event listeners for this annotation completed event, and see what event detail is included in Annotation Completed Event Detail.

ANNOTATION_INTERPOLATION_PROCESS_COMPLETED

ANNOTATION_INTERPOLATION_PROCESS_COMPLETED: CORNERSTONE_TOOLS_ANNOTATION_INTERPOLATION_PROCESS_COMPLETED

Triggers on the eventTarget when an annotation interpolation process completed. Make use of Annotation Interpolation process Completed Event Type for typing your event listeners for this annotation interpolation complete event, and see what event detail is included in Annotation interpolation process Event Detail.

ANNOTATION_LOCK_CHANGE

ANNOTATION_LOCK_CHANGE: CORNERSTONE_TOOLS_ANNOTATION_LOCK_CHANGE

Triggers on the eventTarget when an annotation locked status is changed. Make use of Annotation Lock Change Event Type for typing your event listeners for this annotation lock change event, and see what event detail is included in Annotation Lock Change Event Detail.

ANNOTATION_MODIFIED

ANNOTATION_MODIFIED: CORNERSTONE_TOOLS_ANNOTATION_MODIFIED

Triggers on the eventTarget when an annotation is modified (e.g. a handle is modified). Make use of Annotation Modified Event Type for typing your event listeners for this annotation modified event, and see what event detail is included in Annotation Modified Event Detail.

ANNOTATION_REMOVED

ANNOTATION_REMOVED: CORNERSTONE_TOOLS_ANNOTATION_REMOVED

Triggers on the eventTarget when an annotation is removed from the annotations manager. Make use of Annotation Removed Event Type for typing your event listeners for this annotation removed event, and see what event detail is included in Annotation Removed Event Detail.

ANNOTATION_RENDERED

ANNOTATION_RENDERED: CORNERSTONE_TOOLS_ANNOTATION_RENDERED

Triggers on the eventTarget when an annotation is rendered. Make use of Annotation Rendered Event Type for typing your event listeners for this annotation rendered event, and see what event detail is included in Annotation Rendered Event Detail.

ANNOTATION_SELECTION_CHANGE

ANNOTATION_SELECTION_CHANGE: CORNERSTONE_TOOLS_ANNOTATION_SELECTION_CHANGE

Triggers on the eventTarget when an annotation selection status is changed. Make use of Annotation Selection Change Event Type for typing your event listeners for this annotation selection change event, and see what event detail is included in Annotation Selection Change Event Detail.

ANNOTATION_VISIBILITY_CHANGE

ANNOTATION_VISIBILITY_CHANGE: CORNERSTONE_TOOLS_ANNOTATION_VISIBILITY_CHANGE

Triggers on the eventTarget when an annotation visible status is changed. Make use of Annotation Visible Change Event Type for typing your event listeners for this annotation Hide change event, and see what event detail is included in Annotation Visible Change Event Detail.

INTERPOLATED_ANNOTATIONS_REMOVED

INTERPOLATED_ANNOTATIONS_REMOVED: CORNERSTONE_TOOLS_INTERPOLATED_ANNOTATIONS_REMOVED

Triggers on the eventTarget when interpolated annotations are removed. Make use of Annotation Interpolation Removed Event Type for typing your event listeners for this interpolated annotation removed event, and see what event detail is included in Annotation interpolation removed Event Detail.

KEY_DOWN

KEY_DOWN: CORNERSTONE_TOOLS_KEY_DOWN

Triggers on the eventTarget when a key on the keyboard is pressed. Make use of Key Down Event Type for typing your event listeners for this key down event, and see what event detail is included in Key Down Event Detail.

KEY_UP

KEY_UP: CORNERSTONE_TOOLS_KEY_UP

Triggers on the eventTarget when a key on the keyboard is released. Make use of Key Up Event Type for typing your event listeners for this key up event, and see what event detail is included in Key Up Event Detail.

MOUSE_CLICK

MOUSE_CLICK: CORNERSTONE_TOOLS_MOUSE_CLICK

Triggers on the eventTarget when a mouse click is detected. It is CornerstoneTools normalized event. Make use of Mouse Click Event Type for typing your event listeners for this mouse click event, and see what event detail is included in Mouse Click Event Detail.

MOUSE_DOUBLE_CLICK

MOUSE_DOUBLE_CLICK: CORNERSTONE_TOOLS_MOUSE_DOUBLE_CLICK

Triggers on the eventTarget when a mouse double click is detected. It is CornerstoneTools normalized event. Make use of Mouse Double Click Event Type for typing your event listeners for this mouse double click event, and see what event detail is included in Mouse Double Click Event Detail.

MOUSE_DOWN

MOUSE_DOWN: CORNERSTONE_TOOLS_MOUSE_DOWN

Triggers on the eventTarget when the mouse is pressed down, it is CornerstoneTools normalized event. Make use of Mouse Down Event Type for typing your event listeners for this mouse down event, and see what event detail is included in Mouse Down Event Detail.

MOUSE_DOWN_ACTIVATE

MOUSE_DOWN_ACTIVATE: CORNERSTONE_TOOLS_MOUSE_DOWN_ACTIVATE

Triggers on the eventTarget when a handled MOUSE_DOWN event does not stopPropagation. The hook we use to create new annotation for mouse events. Make use of Mouse Down Activate Event Type for typing your event listeners for this mouse down activate event, and see what event detail is included in Mouse Down Activate Event Detail.

MOUSE_DRAG

MOUSE_DRAG: CORNERSTONE_TOOLS_MOUSE_DRAG

Triggers on the event target when mouse is dragging an annotation or textBox. Make use of Mouse Drag Event Type for typing your event listeners for this mouse drag event, and see what event detail is included in Mouse Drag Event Detail.

MOUSE_MOVE

MOUSE_MOVE: CORNERSTONE_TOOLS_MOUSE_MOVE

Triggers on the eventTarget, when the mouse is moved, it is CornerstoneTools normalized event. It can be just a mouse move or when double click is performed and annotation drawing can be performed with just mouse move. Make use of Mouse Move Event Type for typing your event listeners for this mouse move event, and see what event detail is included in Mouse Move Event Detail.

MOUSE_UP

MOUSE_UP: CORNERSTONE_TOOLS_MOUSE_UP

Triggers on the eventTarget when the mouse is released, it is CornerstoneTools normalized event. Make use of Mouse Up Event Type for typing your event listeners for this mouse up event, and see what event detail is included in Mouse Up Event Detail.

MOUSE_WHEEL

MOUSE_WHEEL: CORNERSTONE_TOOLS_MOUSE_WHEEL

Triggers on the eventTarget when a mouse wheel event is detected. It is CornerstoneTools normalized event. Make use of Mouse Wheel Event Type for typing your event listeners for this mouse wheel event, and see what event detail is included in Mouse Wheel Event Detail.

SEGMENTATION_DATA_MODIFIED

SEGMENTATION_DATA_MODIFIED: CORNERSTONE_TOOLS_SEGMENTATION_DATA_MODIFIED

Triggers on the eventTarget when a Segmentation data is modified (e.g., by brush tool). Make use of Segmentation Data Modified Event Type for typing your event listeners for this segmentation data modified event, and see what event detail is included in Segmentation Data Modified Event Detail.

SEGMENTATION_MODIFIED

SEGMENTATION_MODIFIED: CORNERSTONE_TOOLS_SEGMENTATION_MODIFIED

Triggers on the eventTarget when a Segmentation is updated in the state manager. Make use of Segmentation Modified Event Type for typing your event listeners for this segmentation modified event, and see what event detail is included in Segmentation Modified Event Detail.

SEGMENTATION_REMOVED

SEGMENTATION_REMOVED: CORNERSTONE_TOOLS_SEGMENTATION_REMOVED

Triggers on the eventTarget when a Segmentation is removed from the state manager. Make use of Segmentation Removed Event Type for typing your event listeners for this segmentation removed event, and see what event detail is included in Segmentation Removed Event Detail.

SEGMENTATION_RENDERED

SEGMENTATION_RENDERED: CORNERSTONE_TOOLS_SEGMENTATION_RENDERED

Triggers on the eventTarget when a Segmentation is rendered by the Segmentation Rendering Engine. Make use of Segmentation Rendered Event Type for typing your event listeners for this segmentation rendered event, and see what event detail is included in Segmentation Rendered Event Detail.

SEGMENTATION_REPRESENTATION_MODIFIED

SEGMENTATION_REPRESENTATION_MODIFIED: CORNERSTONE_TOOLS_SEGMENTATION_REPRESENTATION_MODIFIED

Triggers on the eventTarget when a Segmentation representation of a toolGroup is modified in the state manager. Make use of Segmentation Representation Modified Event Type for typing your event listeners for this segmentation representation modified event, and see what event detail is included in Segmentation Representation Modified Event Detail.

SEGMENTATION_REPRESENTATION_REMOVED

SEGMENTATION_REPRESENTATION_REMOVED: CORNERSTONE_TOOLS_SEGMENTATION_REPRESENTATION_REMOVED

Triggers on the eventTarget when a Segmentation representation of a toolGroup is removed in the state manager. Make use of Segmentation Representation Removed Event Type for typing your event listeners for this segmentation representation removed event, and see what event detail is included in Segmentation Representation Removed Event Detail.

TOOLGROUP_VIEWPORT_ADDED

TOOLGROUP_VIEWPORT_ADDED: CORNERSTONE_TOOLS_TOOLGROUP_VIEWPORT_ADDED

TOOLGROUP_VIEWPORT_REMOVED

TOOLGROUP_VIEWPORT_REMOVED: CORNERSTONE_TOOLS_TOOLGROUP_VIEWPORT_REMOVED

TOOL_ACTIVATED

TOOL_ACTIVATED: CORNERSTONE_TOOLS_TOOL_ACTIVATED

Triggers on the eventTarget when a new tools is activated.

Make use of Tool Activated Event Type for typing your event listeners for this tool activated event, and see what event detail is included in Tool Activated Event Detail.

TOOL_MODE_CHANGED

TOOL_MODE_CHANGED: CORNERSTONE_TOOLS_TOOL_MODE_CHANGED

Triggers on the eventTarget when a mode of a tool is changed (active, passive, enabled and disabled).

Make use of Tool Mode Changed Event Type for typing your event listeners for this tool activated event, and see what event detail is included in Tool Mode Changed Event Detail.

TOUCH_DRAG

TOUCH_DRAG: CORNERSTONE_TOOLS_TOUCH_DRAG

TOUCH_END

TOUCH_END: CORNERSTONE_TOOLS_TOUCH_END

TOUCH_PRESS

TOUCH_PRESS: CORNERSTONE_TOOLS_TOUCH_PRESS

TOUCH_START

TOUCH_START: CORNERSTONE_TOOLS_TOUCH_START

TOUCH_START_ACTIVATE

TOUCH_START_ACTIVATE: CORNERSTONE_TOOLS_TOUCH_START_ACTIVATE

TOUCH_SWIPE

TOUCH_SWIPE: CORNERSTONE_TOOLS_SWIPE

TOUCH_TAP

TOUCH_TAP: CORNERSTONE_TOOLS_TAP

KeyboardBindings

KeyboardBindings:

Alt

Alt: 18

AltMeta

AltMeta: 1891

Ctrl

Ctrl: 17

CtrlAlt

CtrlAlt: 1718

CtrlMeta

CtrlMeta: 1791

Meta

Meta: 91

Shift

Shift: 16

ShiftAlt

ShiftAlt: 1618

ShiftCtrl

ShiftCtrl: 1617

ShiftMeta

ShiftMeta: 1691

MouseBindings

MouseBindings:

Mouse This enum enumerates the different buttons returned by .buttons on the mouse event. These values are used when setting a tool active in a tool group.

See also: https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons

Auxiliary

Auxiliary: 4

usually mouse wheel button

Fifth_Button

Fifth_Button: 16

usually “Browser Forward” button

Fourth_Button

Fourth_Button: 8

usually “Browser Back” button

Primary

Primary: 1

usually the left button

Primary_And_Auxiliary

Primary_And_Auxiliary: 5

Primary_And_Secondary

Primary_And_Secondary: 3

Primary_And_Secondary_And_Auxiliary

Primary_And_Secondary_And_Auxiliary: 7

Secondary

Secondary: 2

usually the right button

Secondary_And_Auxiliary

Secondary_And_Auxiliary: 6

SegmentationRepresentations

SegmentationRepresentations:

Segmentations on viewports can be visualized in different ways. This enum defines the different ways of visualizing segmentations. Currently, only labelmap is supported.

Contour

Contour: CONTOUR

Labelmap

Labelmap: LABELMAP

Surface

Surface: SURFACE

StrategyCallbacks

StrategyCallbacks:

Defines the names of the strategy callbacks used for performing enhanced strategy operations.

AcceptPreview

AcceptPreview: acceptPreview

ComputeInnerCircleRadius

ComputeInnerCircleRadius: computeInnerCircleRadius

inner circle size

CreateIsInThreshold

CreateIsInThreshold: createIsInThreshold

For threshold functions, this creates the thresold test. Mostly an internal detail, but might be useful to share between strategies.

Fill

Fill: fill

Fills the given reygion

INTERNAL_setValue

INTERNAL_setValue: setValue

Initialize

Initialize: initialize

Some strategy functions need to initialize some data before being runnable. This is mostly an internal detail, just useful to have an enum here for this.

OnInteractionEnd

OnInteractionEnd: onInteractionEnd

finishStrategy is called at the end of a strategy being applied, usually on mouse up.

OnInteractionStart

OnInteractionStart: onInteractionStart

startStrategy is called at the start of a strategy, typically on mouse down Note this is separate from preview and the endings for preview, which could be called alternatively, but this may be nested within a preview.

Preview

Preview: preview

The preview can be used for tools to show what would happen on accepting before the change is actually done. For example, a spline tool might show a preview state, and allow that to be accepted or rejected.

RejectPreview

RejectPreview: rejectPreview

StrategyFunction

StrategyFunction: strategyFunction

The default strategy function, often synonymous with fill

Swipe

Swipe:

DOWN

DOWN: DOWN

LEFT

LEFT: LEFT

RIGHT

RIGHT: RIGHT

UP

UP: UP

ToolModes

ToolModes:

ToolModes - This enum defines the 4 tool states which are available.

Active

Active: Active

Active:

  • 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.

Disabled

Disabled: Disabled

Disabled:

  • Annotation does not render.

Enabled

Enabled: Enabled

Enabled:

  • Renders data if the tool has a renderAnnotation method.

Passive

Passive: Passive

Passive:

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

WorkerTypes

WorkerTypes:

Worker Types are used to define the types the worker that is getting performed

POLYSEG_CONTOUR_TO_LABELMAP

POLYSEG_CONTOUR_TO_LABELMAP: polySeg/convertContourToVolumeLabelmap

POLYSEG_CONTOUR_TO_SURFACE

POLYSEG_CONTOUR_TO_SURFACE: polySeg/convertContourToSurface

POLYSEG_LABELMAP_TO_SURFACE

POLYSEG_LABELMAP_TO_SURFACE: polySeg/convertLabelmapToSurface

POLYSEG_SURFACE_TO_LABELMAP

POLYSEG_SURFACE_TO_LABELMAP: polySeg/convertSurfacesToVolumeLabelmap

SURFACE_CLIPPING

SURFACE_CLIPPING: surfaceClipping