Slicer  4.11
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 
81  void RestoreSceneView(const char* id, bool removeNodes = true);
82 
84  const char* MoveSceneViewUp(const char* id);
85 
87  const char* MoveSceneViewDown(const char* id);
88 
90  void RemoveSceneViewNode(vtkMRMLSceneViewNode *sceneViewNode);
91 
92 protected:
93 
95 
97 
98  void OnMRMLSceneNodeAdded(vtkMRMLNode* node) override;
99  void OnMRMLSceneEndImport() override;
100  void OnMRMLSceneEndRestore() override;
101  void OnMRMLSceneEndClose() override;
102 
103  void OnMRMLNodeModified(vtkMRMLNode* node) override;
104 
105 private:
106 
107  std::string m_StringHolder;
108 
109 private:
111  void operator=(const vtkSlicerSceneViewsModuleLogic&) = delete;
112 };
113 
114 #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:61
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