Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
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
32class vtkMRMLNode;
33class vtkRenderer;
34class vtkRenderWindowInteractor;
35
43class VTK_MRML_DISPLAYABLEMANAGER_EXPORT vtkMRMLDisplayableManagerGroup : public vtkObject
44{
45public:
47 vtkTypeMacro(vtkMRMLDisplayableManagerGroup, vtkObject);
48 void PrintSelf(ostream& os, vtkIndent indent) override;
49
54 void Initialize(vtkMRMLDisplayableManagerFactory* factory, vtkRenderer* renderer);
55
58
61
64
66
69
73 void SetRenderer(vtkRenderer* newRenderer);
74
76 vtkRenderWindowInteractor* GetInteractor();
77
83
85 vtkRenderer* GetRenderer();
86
89 void SetMRMLDisplayableNode(vtkMRMLNode* newMRMLDisplayableNode);
90
96 static bool IsADisplayableManager(const char* displayableManagerName);
97
101 static vtkMRMLAbstractDisplayableManager* InstantiateDisplayableManager(const char* displayableManagerName);
102
111
115
116protected:
119
121 static void DoCallback(vtkObject* vtk_obj, unsigned long event, void* client_data, void* call_data);
124 void onDisplayableManagerFactoryRegisteredEvent(const char* displayableManagerName);
125 void onDisplayableManagerFactoryUnRegisteredEvent(const char* displayableManagerName);
126
127 class vtkInternal;
128 vtkInternal* Internal;
129
130private:
132 void operator=(const vtkMRMLDisplayableManagerGroup&) = delete;
133};
134
135#endif
Superclass for displayable manager classes.
Factory where displayable manager classes are registered.
~vtkMRMLDisplayableManagerGroup() override
void SetAndObserveDisplayableManagerFactory(vtkMRMLDisplayableManagerFactory *factory)
Set and observe DisplayableManager factory.
void AddDisplayableManager(vtkMRMLAbstractDisplayableManager *displayableManager)
Add a DisplayableManager and initialize it if required.
vtkRenderWindowInteractor * GetInteractor()
Convenient method to get the WindowInteractor associated with the Renderer.
static vtkMRMLAbstractDisplayableManager * InstantiateDisplayableManager(const char *displayableManagerName)
void PrintSelf(ostream &os, vtkIndent indent) override
void SetRenderer(vtkRenderer *newRenderer)
void onDisplayableManagerFactoryUnRegisteredEvent(const char *displayableManagerName)
int GetDisplayableManagerCount()
Return the number of DisplayableManager already added to the group.
virtual vtkMRMLLightBoxRendererManagerProxy * GetLightBoxRendererManagerProxy()
void SetMRMLDisplayableNode(vtkMRMLNode *newMRMLDisplayableNode)
virtual void SetLightBoxRendererManagerProxy(vtkMRMLLightBoxRendererManagerProxy *)
vtkMRMLAbstractDisplayableManager * GetNthDisplayableManager(int n)
void Initialize(vtkMRMLDisplayableManagerFactory *factory, vtkRenderer *renderer)
void onDisplayableManagerFactoryRegisteredEvent(const char *displayableManagerName)
static bool IsADisplayableManager(const char *displayableManagerName)
vtkMRMLNode * GetMRMLDisplayableNode()
Set / Get MRML Displayable Node.
static void DoCallback(vtkObject *vtk_obj, unsigned long event, void *client_data, void *call_data)
vtkMRMLAbstractDisplayableManager * GetDisplayableManagerByClassName(const char *className)
Return a DisplayableManager given its class name.
static vtkMRMLDisplayableManagerGroup * New()
vtkRenderer * GetRenderer()
Get Renderer.
Proxy class to provide mechanisms for a displayable manager to communicate with 3rd party renderer ma...
Abstract Superclass for all specific types of MRML nodes.