SegmentationDisplayTool
Hierarchy
- BaseTool
- SegmentationDisplayTool
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
toolProps: PublicToolProps = {}
defaultToolProps: SharedToolProp = ...
Returns SegmentationDisplayTool
Properties
publicconfiguration
publicmode
Tool Mode - Active/Passive/Enabled/Disabled/
publicsupportedInteractionTypes
Supported Interaction Types - currently only Mouse
publictoolGroupId
ToolGroup ID the tool instance belongs to
statictoolName
Methods
_getMergedRepresentationsConfig
Merge the toolGroup specific configuration with the default global configuration
Parameters
toolGroupId: string
Returns SegmentationRepresentationConfig
addPlanarFreeHandToolIfAbsent
Parameters
toolGroupId: any
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.
onSetToolDisabled
Returns void
onSetToolEnabled
Returns void
renderSegmentation
It is used to trigger the render for each segmentations in the toolGroup. Based on the segmentation representation type, it will call the corresponding render function.
Parameters
toolGroupId: string
the toolGroupId
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
In Cornerstone3DTools, displaying of segmentations are handled by the SegmentationDisplayTool. Generally, any Segmentation can be viewed in various representations such as labelmap (3d), contours, surface etc. As of now, Cornerstone3DTools only implements Labelmap representation.
SegmentationDisplayTool works at ToolGroup level, and is responsible for displaying the segmentation representation for ALL viewports of a toolGroup, this way we can support complex scenarios for displaying segmentations.
Current Limitations:
Similar to other tools in Cornerstone3DTools, the SegmentationDisplayTool should be added to the CornerstoneTools by calling cornerstoneTools.addTool(SegmentationDisplayTool) and a toolGroup should be created for it using the ToolGroupManager API, finally viewports information such as viewportId and renderingEngineId should be provided to the toolGroup and the SegmentationDisplayTool should be set to be activated.