Slicer  5.0
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkSlicerSceneViewsModuleLogic.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 Daniel Haehn, UPenn
17  and was partially funded by NIH grant 3P41RR013218-12S1
18 
19 ==============================================================================*/
20 
21 #ifndef __vtkMRMLSceneViewsModuleLogic_h
22 #define __vtkMRMLSceneViewsModuleLogic_h
23 
24 // SlicerLogic includes
25 #include "vtkSlicerBaseLogic.h"
26 
27 // MRMLLogic includes
28 #include "vtkMRMLAbstractLogic.h"
29 
30 #include "vtkSlicerSceneViewsModuleLogicExport.h"
31 //#include "qSlicerSceneViewsModuleExport.h"
32 
33 #include "vtkSlicerModuleLogic.h"
34 
35 // MRML includes
37 
38 // VTK includes
39 class vtkImageData;
40 #include <vtkStdString.h>
41 
42 #include <string>
43 
45 class VTK_SLICER_SCENEVIEWS_MODULE_LOGIC_EXPORT vtkSlicerSceneViewsModuleLogic :
47 {
48 public:
49 
52  void PrintSelf(ostream& os, vtkIndent indent) override;
53 
55  void SetMRMLSceneInternal(vtkMRMLScene * newScene) override;
56 
58  void RegisterNodes() override;
59 
61  void CreateSceneView(const char* name, const char* description, int screenshotType, vtkImageData* screenshot);
62 
64  void ModifySceneView(vtkStdString id, const char* name, const char* description, int screenshotType, vtkImageData* screenshot);
65 
67  vtkStdString GetSceneViewName(const char* id);
68 
70  vtkStdString GetSceneViewDescription(const char* id);
71 
73  int GetSceneViewScreenshotType(const char* id);
74 
76  vtkImageData* GetSceneViewScreenshot(const char* id);
77 
83  bool RestoreSceneView(const char* id, bool removeNodes = true);
84 
86  const char* MoveSceneViewUp(const char* id);
87 
89  const char* MoveSceneViewDown(const char* id);
90 
92  void RemoveSceneViewNode(vtkMRMLSceneViewNode *sceneViewNode);
93 
94 protected:
95 
97 
99 
100  void OnMRMLSceneNodeAdded(vtkMRMLNode* node) override;
101  void OnMRMLSceneEndImport() override;
102  void OnMRMLSceneEndRestore() override;
103  void OnMRMLSceneEndClose() override;
104 
105  void OnMRMLNodeModified(vtkMRMLNode* node) override;
106 
107 private:
108 
109  std::string m_StringHolder;
110 
111 private:
113  void operator=(const vtkSlicerSceneViewsModuleLogic&) = delete;
114 };
115 
116 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
static vtkSlicerModuleLogic * New()
The Usual vtk class functions.
virtual void OnMRMLSceneEndImport()
virtual void OnMRMLSceneEndClose()
virtual void OnMRMLNodeModified(vtkMRMLNode *)
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:57
virtual void OnMRMLSceneNodeAdded(vtkMRMLNode *)
virtual void SetMRMLSceneInternal(vtkMRMLScene *newScene)
virtual void OnMRMLSceneEndRestore()
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167