Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLCameraDisplayableManager.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  Based on Slicer/Base/GUI/vtkSlicerViewerWidget.h,
17  this file was developed by Jean-Christophe Fillion-Robin, Kitware Inc.
18  and was partially funded by NIH grant 3P41RR013218-12S1
19 
20 ==============================================================================*/
21 
22 #ifndef __vtkMRMLCameraDisplayableManager_h
23 #define __vtkMRMLCameraDisplayableManager_h
24 
25 // MRMLDisplayableManager includes
27 
28 #include "vtkMRMLDisplayableManagerExport.h"
29 
30 class vtkMRMLCameraNode;
31 
32 class VTK_MRML_DISPLAYABLEMANAGER_EXPORT vtkMRMLCameraDisplayableManager :
34 {
35 
36 public:
39  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
40 
41  virtual void RemoveMRMLObservers() VTK_OVERRIDE;
42 
43  void UpdateCameraNode();
44 
45  vtkMRMLCameraNode* GetCameraNode();
46 
47 // void AddCameraObservers();
48 // void RemoveCameraObservers();
49 
51  enum
52  {
53  ActiveCameraChangedEvent = 30000
54  };
55 
56 protected:
57 
60 
61  virtual void Create() VTK_OVERRIDE;
62 
63  virtual void OnMRMLSceneEndClose() VTK_OVERRIDE;
64  virtual void OnMRMLSceneStartImport() VTK_OVERRIDE;
65  virtual void OnMRMLSceneEndImport() VTK_OVERRIDE;
66  virtual void OnMRMLSceneEndRestore() VTK_OVERRIDE;
67  virtual void OnMRMLSceneNodeAdded(vtkMRMLNode* node) VTK_OVERRIDE;
68  virtual void OnMRMLSceneNodeRemoved(vtkMRMLNode* node) VTK_OVERRIDE;
69 
70  virtual void ProcessMRMLNodesEvents(vtkObject *caller,
71  unsigned long event,
72  void *callData) VTK_OVERRIDE;
73  virtual void OnMRMLNodeModified(vtkMRMLNode* node) VTK_OVERRIDE;
74 
75  void SetAndObserveCameraNode(vtkMRMLCameraNode * newCameraNode);
76  virtual void AdditionalInitializeStep() VTK_OVERRIDE;
77  void SetCameraToRenderer();
78  void SetCameraToInteractor();
79 
80 private:
81 
83  void operator=(const vtkMRMLCameraDisplayableManager&); // Not Implemented
84 
85  class vtkInternal;
86  vtkInternal * Internal;
87 
88 };
89 
90 #endif
virtual void RemoveMRMLObservers()
Remove MRML observers.
static vtkMRMLAbstractThreeDViewDisplayableManager * New()
MRML node to represent camera node.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:135