ToolGroupManager
Index
Functions
createToolGroup
Parameters
toolGroupId: string
The unique ID of the tool group.
Returns IToolGroup | undefined
A reference to the tool group that was created.
destroy
Destroy all tool groups
Returns void
destroyToolGroup
Given a tool group Id, destroy the toolGroup. It will also cleanup all segmentations associated with that tool group too
Parameters
toolGroupId: string
The Id of the tool group to be destroyed.
Returns void
getAllToolGroups
Return the array of tool groups
Returns IToolGroup[]
An array of tool groups.
getToolGroup
Given a tool group Id, return the tool group
Parameters
toolGroupId: string
The Id of the tool group to be retrieved.
Returns IToolGroup | undefined
The tool group that has the same id as the tool group id that was passed in.
getToolGroupForViewport
Given a rendering engine Id and a viewport Id, return the tool group that contains that rendering engine and viewport. Note: A viewport can only be associated with a single tool group. You cannot have a viewport that belongs to multiple tool groups. To achieve so, create a new viewport and a new toolGroup for it. This will not impact memory usage much as the volume textures are shared across all viewports rendering the same image.
Parameters
viewportId: string
The Id of the viewport that the tool is being added to.
optionalrenderingEngineId: string
The Id of the rendering engine that the tool group is associated with.
Returns IToolGroup | undefined
A tool group.
getToolGroupsWithToolName
Returns the toolGroups that has the given toolName as active, passive or enabled.
Parameters
toolName: string
The name of the tool
Returns IToolGroup[] | []
An array of tool groups.
Create a new tool group with the given name. ToolGroups are the new way in Cornerstone3DTools to share tool configuration, state (enabled, disabled, etc.) across a set of viewports.