publicBrushTool
Hierarchy
- BaseTool
- BrushTool
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
toolProps: PublicToolProps = {}
defaultToolProps: SharedToolProp = ...
Returns BrushTool
Properties
publicconfiguration
publicmode
publicsupportedInteractionTypes
Supported Interaction Types - currently only Mouse
publictoolGroupId
ToolGroup ID the tool instance belongs to
statictoolName
Methods
publicacceptPreview
Accepts a preview, marking it as the active segment.
Parameters
element: HTMLDivElement = ...
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.
createEditData
Parameters
element: any
Returns { imageIdReferenceMap: undefined; referencedVolumeId: any; segmentationRepresentationUID: string; segmentsLocked: number[] | []; volumeId: string } | { imageIdReferenceMap: Map<string, string>; referencedVolumeId?: undefined; segmentationRepresentationUID: string; segmentsLocked: number[] | []; volumeId: undefined }
publicgetToolName
Returns the name of the tool
Returns string
The name of the tool.
publicinvalidateBrushCursor
Returns void
mouseMoveCallback
This call will be made when the mouse moves and the tool is active, but not actually drawing at the moment. The behavior is:
- Update the cursor
- Call the active strategy event ‘preview’ and ‘rejectPreview’ on the mouse cursor position on a periodic basis to create a preview when configured to do so.
The preview will be shown after the mouse has been stationary for 250 ms. Any preview will be cancelled (immediately) after moving outside the center distance. As well, if the mouse moves but stays inside the center area for 250 ms, then the cancel will happen with a new preview being added.
See mouse up details for how the preview gets accepted.
The preview also needs to be cancelled on changing tools.
Parameters
evt: InteractionEventType
Returns void
onSetToolDisabled
Parameters
evt: any
Returns void
onSetToolEnabled
Returns void
onSetToolPassive
Parameters
evt: any
Returns void
preMouseDownCallback
Parameters
evt: MouseDownActivateEventType
Returns boolean
previewCallback
Returns void
publicrejectPreview
Cancels any preview view being shown, resetting any segments being shown.
Parameters
element: HTMLDivElement = ...
Returns void
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
Tool Mode - Active/Passive/Enabled/Disabled/