Slicer  5.1
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLDisplayableManagerGroup.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Program: 3D Slicer
4 
5  Copyright (c) Kitware Inc.
6 
7  See COPYRIGHT.txt
8  or http://www.slicer.org/copyright/copyright.txt for details.
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 
16  This file was originally developed by Jean-Christophe Fillion-Robin, Kitware Inc.
17  and was partially funded by NIH grant 3P41RR013218-12S1
18 
19 ==============================================================================*/
20 
21 #ifndef __vtkMRMLDisplayableManagerGroup_h
22 #define __vtkMRMLDisplayableManagerGroup_h
23 
24 // VTK includes
25 #include <vtkObject.h>
26 
27 #include "vtkMRMLDisplayableManagerExport.h"
28 
32 class vtkMRMLNode;
33 class vtkRenderer;
34 class vtkRenderWindowInteractor;
35 
43 class VTK_MRML_DISPLAYABLEMANAGER_EXPORT vtkMRMLDisplayableManagerGroup : public vtkObject
44 {
45 public:
46 
47  static vtkMRMLDisplayableManagerGroup *New();
48  vtkTypeMacro(vtkMRMLDisplayableManagerGroup,vtkObject);
49  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
55  void Initialize(vtkMRMLDisplayableManagerFactory * factory, vtkRenderer * renderer);
56 
58  void SetAndObserveDisplayableManagerFactory(vtkMRMLDisplayableManagerFactory * factory);
59 
61  void AddDisplayableManager(vtkMRMLAbstractDisplayableManager * displayableManager);
62 
64  int GetDisplayableManagerCount();
65 
66  vtkMRMLAbstractDisplayableManager *GetNthDisplayableManager(int n);
67 
70  GetDisplayableManagerByClassName(const char* className);
71 
75  void SetRenderer(vtkRenderer* newRenderer);
76 
78  vtkRenderWindowInteractor* GetInteractor();
79 
84  void RequestRender();
85 
87  vtkRenderer* GetRenderer();
88 
90  vtkMRMLNode* GetMRMLDisplayableNode();
91  void SetMRMLDisplayableNode(vtkMRMLNode* newMRMLDisplayableNode);
92 
98  static bool IsADisplayableManager(const char* displayableManagerName);
99 
103  static vtkMRMLAbstractDisplayableManager* InstantiateDisplayableManager(
104  const char* displayableManagerName);
105 
106 
114  virtual void SetLightBoxRendererManagerProxy(vtkMRMLLightBoxRendererManagerProxy *);
115 
118  virtual vtkMRMLLightBoxRendererManagerProxy* GetLightBoxRendererManagerProxy();
119 
120 protected:
121 
123  ~vtkMRMLDisplayableManagerGroup() override;
124 
126  static void DoCallback(vtkObject* vtk_obj, unsigned long event,
127  void* client_data, void* call_data);
130  void onDisplayableManagerFactoryRegisteredEvent(const char* displayableManagerName);
131  void onDisplayableManagerFactoryUnRegisteredEvent(const char* displayableManagerName);
132 
133  class vtkInternal;
134  vtkInternal* Internal;
135 
136 private:
137 
139  void operator=(const vtkMRMLDisplayableManagerGroup&) = delete;
140 
141 };
142 
143 #endif
Superclass for displayable manager classes.
Proxy class to provide mechanisms for a displayable manager to communicate with 3rd party renderer ma...
Factory where displayable manager classes are registered.
DisplayableManagerGroup is a collection of DisplayableManager.
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167