VariationTool
Hierarchy
- BaseTool
- VariationTool
Index
Constructors
Properties
Methods
- _activateDraw
- _calculateCursor
- _deactivateDraw
- _dragCallback
- _endCallback
- _triggerAnnotationRender
- applyActiveStrategy
- applyActiveStrategyCallback
- createHoverData
- getSegmentationId
- getToolName
- invalidateCursor
- mouseMoveCallback
- onSetToolDisabled
- onSetToolEnabled
- onSetToolPassive
- preMouseDownCallback
- renderAnnotation
- setActiveStrategy
- setConfiguration
- updateCursor
Constructors
constructor
Parameters
toolProps: PublicToolProps = {}
defaultToolProps: SharedToolProp = ...
Returns VariationTool
Properties
publicconfiguration
editData
Type declaration
planeContours: any
segmentationId: string
viewport: StackViewport | default
publicmode
Tool Mode - Active/Passive/Enabled/Disabled/
publicsupportedInteractionTypes
Supported Interaction Types - currently only Mouse
publictoolGroupId
ToolGroup ID the tool instance belongs to
statictoolName
Methods
_activateDraw
Parameters
element: HTMLDivElement
Returns void
_calculateCursor
Parameters
element: any
optionalcenterCanvas: any
Returns void
_deactivateDraw
Parameters
element: HTMLDivElement
Returns void
_dragCallback
Parameters
evt: InteractionEventType
Returns void
_endCallback
Parameters
evt: InteractionEventType
Returns void
_triggerAnnotationRender
Parameters
viewport: StackViewport | default
Returns void
publicapplyActiveStrategy
Applies the active strategy function to the enabled element with the specified operation data.
Parameters
enabledElement: IEnabledElement
The element that is being operated on.
operationData: unknown
The data that needs to be passed to the strategy.
Returns any
The result of the strategy.
publicapplyActiveStrategyCallback
Applies the active strategy, with a given event type being applied. The event type function is found by indexing it on the active strategy function.
Parameters
enabledElement: IEnabledElement
The element that is being operated on.
operationData: unknown
The data that needs to be passed to the strategy.
callbackType: string
the type of the callback
Returns any
The result of the strategy.
createHoverData
Parameters
element: any
centerCanvas: any
Returns { brushCursor: { data: {}; metadata: { FrameOfReferenceUID: string; referencedImageId: string; segmentColor: Color; toolName: string; viewPlaneNormal: Point3; viewUp: Point3 } }; centerCanvas: any; segmentColor: Color; segmentIndex: number; segmentationId: string; segmentationRepresentationUID: string; viewportIdsToRender: string[] }
brushCursor: { data: {}; metadata: { FrameOfReferenceUID: string; referencedImageId: string; segmentColor: Color; toolName: string; viewPlaneNormal: Point3; viewUp: Point3 } }
centerCanvas: any
segmentColor: Color
segmentIndex: number
segmentationId: string
segmentationRepresentationUID: string
viewportIdsToRender: string[]
getSegmentationId
Returns string
publicgetToolName
Returns the name of the tool
Returns string
The name of the tool.
invalidateCursor
Returns void
mouseMoveCallback
Parameters
evt: InteractionEventType
Returns void
onSetToolDisabled
Returns void
onSetToolEnabled
Returns void
onSetToolPassive
Returns void
preMouseDownCallback
Parameters
evt: MouseDownActivateEventType
Returns boolean
renderAnnotation
Parameters
enabledElement: IEnabledElement
svgDrawingHelper: SVGDrawingHelper
Returns void
publicsetActiveStrategy
Sets the active strategy for a tool. Strategies are multiple implementations of tool behavior that can be switched by tool configuration.
Parameters
strategyName: string
name of the strategy to be set as active
Returns void
publicsetConfiguration
merges the new configuration with the tool configuration
Parameters
newConfiguration: Record<string, any>
Returns void
updateCursor
Parameters
evt: InteractionEventType
Returns void
Abstract base class from which all tools derive. Deals with cleanly merging custom and default configuration, and strategy application.