Enums
Index
Enumerations
AnnotationStyleStates
AutoGenerated
Default
Highlighted
Locked
Selected
ChangeTypes
ChangeTypes defines the types of changes occurring on annotation and segmentation data.
Completed
Completed occurs only for the annotation completed event, just to identify it
HandlesUpdated
HandlesUpdated occurs when the handle data is added or removed, or moved around
InitialSetup
InitialSetup occurs when an annotation has been created initially and has the first render/data calculation being applied.
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
Occurs when an interpolation result is updated with more tool specific data.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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_REMOVED
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
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_END
TOUCH_PRESS
TOUCH_START
TOUCH_START_ACTIVATE
TOUCH_SWIPE
TOUCH_TAP
KeyboardBindings
Alt
AltMeta
Ctrl
CtrlAlt
CtrlMeta
Meta
Shift
ShiftAlt
ShiftCtrl
ShiftMeta
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
usually mouse wheel button
Fifth_Button
usually “Browser Forward” button
Fourth_Button
usually “Browser Back” button
Primary
usually the left button
Primary_And_Auxiliary
Primary_And_Secondary
Primary_And_Secondary_And_Auxiliary
Secondary
usually the right button
Secondary_And_Auxiliary
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
Labelmap
Surface
StrategyCallbacks
Defines the names of the strategy callbacks used for performing enhanced strategy operations.
AcceptPreview
ComputeInnerCircleRadius
inner circle size
CreateIsInThreshold
For threshold functions, this creates the thresold test. Mostly an internal detail, but might be useful to share between strategies.
Fill
Fills the given reygion
INTERNAL_setValue
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
finishStrategy is called at the end of a strategy being applied, usually on mouse up.
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
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
StrategyFunction
The default strategy function, often synonymous with fill
Swipe
DOWN
LEFT
RIGHT
UP
ToolModes
ToolModes - This enum defines the 4 tool states which are available.
Active
Active:
- Can be actively used by mouse/touch events mapped to its
ToolBinding
s. - 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:
- Annotation does not render.
Enabled
Enabled:
- Renders data if the tool has a
renderAnnotation
method.
Passive
Passive:
- Can be passively interacted by grabbing a tool or its handles.
- Renders data if the tool has a
renderAnnotation
method.
WorkerTypes
Worker Types are used to define the types the worker that is getting performed
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;