21#ifndef __vtkMRMLLayerDMPipeline_h
22#define __vtkMRMLLayerDMPipeline_h
24#include "vtkSlicerLayerDMModuleMRMLDisplayableManagerExport.h"
30#include <vtkCommand.h>
58 void PrintSelf(ostream& os, vtkIndent indent)
override;
230 bool UpdateObservation(vtkObject* prevObj, vtkObject* obj,
const std::vector<unsigned long>& events)
const;
231 bool UpdateObservation(vtkObject* prevObj, vtkObject* obj,
unsigned long event = vtkCommand::ModifiedEvent)
const;
253 void SetRenderers(
const std::vector<vtkRenderer*>& renderers,
const std::vector<unsigned int>& renderOrders);
269 virtual void OnUpdate(vtkObject* obj,
unsigned long eventId,
void* callData);
272 bool RenderersMatchPipelineRenderers(
const std::vector<vtkRenderer*>& renderers,
const std::vector<unsigned int>& renderOrders);
274 vtkWeakPointer<vtkMRMLAbstractViewNode> ViewNode;
275 vtkWeakPointer<vtkMRMLNode> DisplayNode;
276 std::map<unsigned int, vtkWeakPointer<vtkRenderer>> RenderersMap;
277 bool IsUpdateDisplayBlocked;
279 bool InteractionProcessingBlocked;
280 vtkSmartPointer<vtkMRMLLayerDMObjectEventObserver> Observer;
281 vtkWeakPointer<vtkMRMLLayerDMPipelineManager> PipelineManager;
282 vtkWeakPointer<vtkMRMLScene> Scene;
Abstract MRML node to represent a view. The class holds the properties common to any view type (3D,...
VTK object observer with one callback endpoint when an event is triggered. Can observe multiple objec...
Class responsible for handling adding / updating / removing pipelines depending on nodes added / remo...
Interface for the layered displayable manager pipelines.
unsigned int GetMaxRenderOrder() const
Maximum render order handled by the DM.
virtual std::vector< unsigned int > GetRenderOrders() const
~vtkMRMLLayerDMPipeline() override=default
virtual vtkCamera * GetCustomCamera(unsigned int renderOrder) const
vtkRenderer * GetRenderer() const
virtual bool CanProcessInteractionEvent(vtkMRMLInteractionEventData *eventData, double &distance2)
virtual void OnRendererRemoved(vtkRenderer *renderer)
virtual bool ProcessInteractionEvent(vtkMRMLInteractionEventData *eventData)
static vtkMRMLLayerDMPipeline * New()
virtual void OnUpdate(vtkObject *obj, unsigned long eventId, void *callData)
bool UpdateObservation(vtkObject *prevObj, vtkObject *obj, unsigned long event=vtkCommand::ModifiedEvent) const
vtkMRMLAbstractViewNode * GetViewNode() const
Returns the current view node.
vtkRenderer * GetRenderer(unsigned int renderOrder) const
vtkMRMLScene * GetScene() const
Returns the current scene.
unsigned int GetVtkRendererOrder(const vtkRenderer *renderer) const
void RemoveObservations(vtkObject *prevObj) const
vtkMRMLLayerDMPipeline * GetNodePipeline(vtkMRMLNode *node) const
bool IsInteractionProcessingBlocked() const
virtual vtkCamera * GetCustomCamera() const
virtual void OnRendererAdded(vtkRenderer *renderer)
vtkMRMLLayerDMPipelineManager * GetPipelineManager() const
Returns the instance of pipeline manager which created the pipeline.
virtual void LoseFocus(vtkMRMLInteractionEventData *eventData)
void RequestRender() const
virtual void SetViewNode(vtkMRMLAbstractViewNode *viewNode)
virtual unsigned int GetRenderOrder() const
bool BlockInteractionProcessing(bool isBlocked)
void SetFrozen(bool isFrozen)
bool UpdateObservation(vtkObject *prevObj, vtkObject *obj, const std::vector< unsigned long > &events) const
std::vector< vtkRenderer * > GetRenderers() const
Returns the current renderers attached to the pipeline in increasing order of GetRenderOrders.
virtual void OnDefaultCameraModified(vtkCamera *camera)
virtual void SetScene(vtkMRMLScene *scene)
virtual void UpdateFromMRML()
vtkMRMLNode * GetDisplayNode() const
Returns the current display node.
virtual int GetWidgetState() const
virtual void OnReferenceToDisplayNodeAdded(vtkMRMLNode *fromNode, const std::string &role)
void SetRenderers(const std::vector< vtkRenderer * > &renderers, const std::vector< unsigned int > &renderOrders)
bool BlockUpdateDisplay(bool isBlocked)
If.
virtual void SetPipelineManager(vtkMRMLLayerDMPipelineManager *pipelineManager)
void SetRenderer(vtkRenderer *renderer)
virtual int GetMouseCursor() const
bool IsUpdateObserverBlocked() const
void PrintSelf(ostream &os, vtkIndent indent) override
virtual void OnReferenceToDisplayNodeRemoved(vtkMRMLNode *fromNode, const std::string &role)
virtual void SetDisplayNode(vtkMRMLNode *displayNode)
bool BlockUpdateObserver(bool isBlocked) const
Abstract Superclass for all specific types of MRML nodes.
A set of MRML Nodes that supports serialization and undo/redo.