SphereScissorsTool
Hierarchy
- BaseTool
- SphereScissorsTool
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
toolProps: PublicToolProps = {}
defaultToolProps: SharedToolProp = ...
Returns SphereScissorsTool
Properties
publicconfiguration
editData
Type declaration
annotation: any
optionalcenterCanvas?: number[]
optionalhandleIndex?: number
optionalhasMoved?: boolean
imageIdReferenceMap: Map<string, string>
movingTextBox: boolean
optionalnewAnnotation?: boolean
referencedVolumeId: string
segmentColor: [number, number, number, number]
segmentIndex: number
segmentationRepresentationUID: string
segmentsLocked: number[]
toolGroupId: string
viewportIdsToRender: string[]
volumeId: string
isDrawing
isHandleOutsideImage
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
Add event handlers for the modify event loop, and prevent default event propagation.
Parameters
element: any
Returns void
_deactivateDraw
Add event handlers for the modify event loop, and prevent default event prapogation.
Parameters
element: any
Returns void
_dragCallback
Parameters
evt: InteractionEventType
Returns void
_endCallback
Parameters
evt: InteractionEventType
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.
publicgetToolName
Returns the name of the tool
Returns string
The name of the tool.
preMouseDownCallback
Based on the current position of the mouse and the enabledElement, it finds the active segmentation info and use it for the current tool.
Parameters
evt: InteractionEventType
EventTypes.NormalizedMouseEventType
Returns true
The annotation object.
renderAnnotation
it is used to draw the sphereScissor annotation in each request animation frame. Note that the annotation are disappeared after the segmentation modification.
Parameters
enabledElement: IEnabledElement
The Cornerstone’s enabledElement.
svgDrawingHelper: SVGDrawingHelper
The svgDrawingHelper providing the context for drawing.
Returns boolean
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 for manipulating segmentation data by drawing a sphere in 3d space. It acts on the active Segmentation on the viewport (enabled element) and requires an active segmentation to be already present. By default it will use the activeSegmentIndex for the segmentation to modify. You can use SegmentationModule to set the active segmentation and segmentIndex. Todo: sphere scissor has some memory problem which lead to ui blocking behavior that needs to be fixed.