Slicer 5.4
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
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 vtkSlicerSceneViewsModuleLogic_h
22#define vtkSlicerSceneViewsModuleLogic_h
23
24// SlicerLogic includes
25#include "vtkSlicerBaseLogic.h"
26
27// MRMLLogic includes
29
30#include "vtkSlicerSceneViewsModuleLogicExport.h"
31//#include "qSlicerSceneViewsModuleExport.h"
32
34
35// MRML includes
37
38// VTK includes
39class vtkImageData;
40#include <vtkStdString.h>
41
42#include <string>
43
45class VTK_SLICER_SCENEVIEWS_MODULE_LOGIC_EXPORT vtkSlicerSceneViewsModuleLogic :
47{
48public:
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
93
94protected:
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
107private:
108
109 std::string m_StringHolder;
110
111private:
113 void operator=(const vtkSlicerSceneViewsModuleLogic&) = delete;
114};
115
116#endif
Abstract Superclass for all specific types of MRML nodes.
A set of MRML Nodes that supports serialization and undo/redo.
const char * MoveSceneViewDown(const char *id)
Move sceneView up.
void RegisterNodes() override
Register MRML Node classes to Scene. Gets called automatically when the MRMLScene is attached to this...
void OnMRMLSceneEndImport() override
~vtkSlicerSceneViewsModuleLogic() override
vtkStdString GetSceneViewName(const char *id)
Return the name of an existing sceneView.
void RemoveSceneViewNode(vtkMRMLSceneViewNode *sceneViewNode)
Remove a scene view node.
void OnMRMLNodeModified(vtkMRMLNode *node) override
void CreateSceneView(const char *name, const char *description, int screenshotType, vtkImageData *screenshot)
Create a sceneView..
void OnMRMLSceneNodeAdded(vtkMRMLNode *node) override
void ModifySceneView(vtkStdString id, const char *name, const char *description, int screenshotType, vtkImageData *screenshot)
Modify an existing sceneView.
static vtkSlicerSceneViewsModuleLogic * New()
int GetSceneViewScreenshotType(const char *id)
Return the screenshotType of an existing sceneView.
void SetMRMLSceneInternal(vtkMRMLScene *newScene) override
Initialize listening to MRML events.
vtkStdString GetSceneViewDescription(const char *id)
Return the description of an existing sceneView.
bool RestoreSceneView(const char *id, bool removeNodes=true)
void PrintSelf(ostream &os, vtkIndent indent) override
const char * MoveSceneViewUp(const char *id)
Move sceneView up.
vtkImageData * GetSceneViewScreenshot(const char *id)
Return the screenshot of an existing sceneView.
void OnMRMLSceneEndRestore() override
void OnMRMLSceneEndClose() override