Skip to main content

Function: getToolGroupForViewport()

getToolGroupForViewport(viewportId, renderingEngineId?): IToolGroup | undefined

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.

renderingEngineId?: string

The Id of the rendering engine that the tool group is associated with.

Returns

IToolGroup | undefined

A tool group.

Defined in

tools/src/store/ToolGroupManager/getToolGroupForViewport.ts:19