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;

Default

Default:

Highlighted

Highlighted: Highlighted

Locked

Locked: Locked

Selected

Selected: Selected

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

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.

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

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.