21#ifndef __vtkMRMLLayerDMPipelineManager_h
22#define __vtkMRMLLayerDMPipelineManager_h
24#include "vtkSlicerLayerDMModuleMRMLDisplayableManagerExport.h"
27#include <vtkCommand.h>
29#include <vtkSmartPointer.h>
30#include <vtkWeakPointer.h>
61 void PrintSelf(ostream& os, vtkIndent indent)
override;
122 void SetFactory(
const vtkSmartPointer<vtkMRMLLayerDMPipelineFactory>& factory);
161 void OnDefaultCameraModified();
164 void UpdatePipeline(
const vtkSmartPointer<vtkMRMLLayerDMPipeline>& pipeline)
const;
169 void RemoveOutdatedPipelines();
172 void AddMissingPipelines();
176 bool IsPipelineCreatorOutdated(
vtkMRMLNode* node)
const;
178 vtkSmartPointer<vtkMRMLLayerDMPipelineFactory> Factory;
179 vtkSmartPointer<vtkMRMLLayerDMLayerManager> LayerManager;
180 vtkSmartPointer<vtkMRMLLayerDMCameraSynchronizer> CameraSynchronizer;
181 vtkSmartPointer<vtkMRMLLayerDMInteractionLogic> InteractionLogic;
182 vtkSmartPointer<vtkMRMLLayerDMObjectEventObserver> EventObserver;
183 vtkSmartPointer<vtkCamera> DefaultCamera;
184 vtkSmartPointer<vtkMRMLLayerDMNodeReferenceObserver> NodeReferenceObserver;
186 vtkWeakPointer<vtkMRMLAbstractViewNode> ViewNode;
187 vtkWeakPointer<vtkMRMLScene> Scene;
188 vtkWeakPointer<vtkRenderWindow> RenderWindow;
190 std::map<vtkMRMLNode*, vtkSmartPointer<vtkMRMLLayerDMPipeline>> PipelineMap;
191 std::map<vtkMRMLNode*, vtkWeakPointer<vtkMRMLLayerDMPipelineCreator>> PipelineCreatorMap;
192 std::function<void()> RequestRenderCallback;
194 bool IsRequestRenderBlocked{
false };
Abstract MRML node to represent a view. The class holds the properties common to any view type (3D,...
Class responsible for synchronizing the camera of the different display layers. If a pipeline doesn't...
Pipeline manager interaction logic class.
Responsible for adding and removing renderer layers to a vtkRenderWindow depending on the display pip...
VTK object observer with one callback endpoint when an event is triggered. Can observe multiple objec...
Interface responsible for creating new pipelines given input pairs of viewNode and node.
Class responsible for creating new pipelines given input viewNode and Node pairs.
bool CreatePipelineForNode(vtkMRMLNode *displayNode)
void SetFactory(const vtkSmartPointer< vtkMRMLLayerDMPipelineFactory > &factory)
int GetNumberOfPipelines() const
Returns the number of pipelines currently managed by the pipeline manager.
void RequestRender()
Reset camera clipping range and call display manager request render.
void ResetCameraClippingRange() const
void LoseFocus(vtkMRMLInteractionEventData *eventData) const
bool ProcessInteractionEvent(vtkMRMLInteractionEventData *eventData) const
Delegates process interaction event to.
int GetMouseCursor() const
Returns the mouse cursor from the latest pipeline having handled the latest interaction.
void PrintSelf(ostream &os, vtkIndent indent) override
void SetViewNode(vtkMRMLAbstractViewNode *viewNode)
Set the view node (initialization).
bool RemovePipeline(vtkMRMLNode *displayNode)
bool BlockRequestRender(bool isBlocked)
void UpdateAllPipelines()
void SetRequestRender(const std::function< void()> &requestRender)
Set the request render callback used during.
static vtkMRMLLayerDMPipelineManager * New()
~vtkMRMLLayerDMPipelineManager() override
void SetRenderWindow(vtkRenderWindow *renderWindow)
Set the render window on which the pipeline manager is attached (initialization).
bool AddNode(vtkMRMLNode *node)
vtkMRMLLayerDMPipeline * GetNthPipeline(int iPipeline) const
bool CanProcessInteractionEvent(vtkMRMLInteractionEventData *eventData, double &distance2) const
Delegates can process interaction event to.
void SetRenderer(vtkRenderer *renderer) const
Set the default renderer used by the display manager (initialization).
void ClearDisplayableNodes()
vtkCamera * GetDefaultCamera() const
vtkMRMLLayerDMPipelineManager()
void SetScene(vtkMRMLScene *scene)
Set the scene (initialization).
bool RemoveNode(vtkMRMLNode *node)
vtkSmartPointer< vtkMRMLLayerDMPipeline > GetNodePipeline(vtkMRMLNode *node) const
Returns the pipeline associated with the input display node if any.
Interface for the layered displayable manager pipelines.
Abstract Superclass for all specific types of MRML nodes.
A set of MRML Nodes that supports serialization and undo/redo.