Class vtkMRMLLayerDMLayerManager
Defined in File vtkMRMLLayerDMLayerManager.h
Inheritance Relationships
Base Type
public vtkObject
Class Documentation
-
class vtkMRMLLayerDMLayerManager : public vtkObject
Inheritance diagram for vtkMRMLLayerDMLayerManager:
Collaboration diagram for vtkMRMLLayerDMLayerManager:
Responsible for adding and removing renderer layers to a vtkRenderWindow depending on the display pipeline preferred render order value.
Display pipeline order values are arbitrary unsigned int. This class will create and set the actual Renderer layers so that their ordering is consistent with expected VTK behavior.
Renderer 0 is left unchanged by the class and is expected to already exist in the render window.
When pipelines are added / removed, renderers are created or deleted, and renderer layers are optimized depending on the pipelines’ preferred render order number. Order number is read-only during update and is expected to be static per pipeline.
Public Types
-
using LayerKey = std::tuple<unsigned int, std::uintptr_t>
Public Functions
-
vtkTypeMacro(vtkMRMLLayerDMLayerManager, vtkObject)
-
void AddPipeline(vtkMRMLLayerDMPipelineI *pipeline)
Adds the pipeline to the layers. May change an update of the layer ordering. Will trigger the SetRenderer call on the pipeline when it’s added to its layer.
-
int GetNumberOfDistinctLayers() const
-
int GetNumberOfManagedLayers() const
-
int GetNumberOfRenderers() const
Returns the current number of managed renderers in the render window.
-
void RemovePipeline(vtkMRMLLayerDMPipelineI *pipeline)
Removes the pipeline from the layers. May change the layer ordering if pipeline was the last one of its current renderer.
-
void ResetCameraClippingRange() const
Iterates over the renderers and resets their clipping range to visible bounds.
-
void SetRenderWindow(vtkRenderWindow *renderWindow)
Changes the render window managed by the layer manager. Will trigger a removal of all managed layers and creation of new layers if the render window is not null.
-
void SetDefaultCamera(const vtkSmartPointer<vtkCamera> &camera)
If the default camera has changed, update the layers with ne new camera.
Public Static Functions
-
static vtkMRMLLayerDMLayerManager *New()
-
static LayerKey GetPipelineLayerKey(vtkMRMLLayerDMPipelineI *pipeline)
-
using LayerKey = std::tuple<unsigned int, std::uintptr_t>