Slicer 5.7
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
41// STD includes
42#include <string>
43
44class VTK_SLICER_SCENEVIEWS_MODULE_LOGIC_EXPORT vtkSlicerSceneViewsModuleLogic :
46{
47public:
48
51 void PrintSelf(ostream& os, vtkIndent indent) override;
52
54 void SetMRMLSceneInternal(vtkMRMLScene * newScene) override;
55
57 void RegisterNodes() override;
58
60 void CreateSceneView(const char* name, const char* description, int screenshotType, vtkImageData* screenshot);
61
63 void ModifySceneView(std::string id, const char* name, const char* description, int screenshotType, vtkImageData* screenshot);
64
66 std::string GetSceneViewName(const char* id);
67
69 std::string GetSceneViewDescription(const char* id);
70
72 int GetSceneViewScreenshotType(const char* id);
73
75 vtkImageData* GetSceneViewScreenshot(const char* id);
76
82 bool RestoreSceneView(const char* id, bool removeNodes = true);
83
85 const char* MoveSceneViewUp(const char* id);
86
88 const char* MoveSceneViewDown(const char* id);
89
92
93protected:
94
96
98
99 void OnMRMLSceneNodeAdded(vtkMRMLNode* node) override;
100 void OnMRMLSceneEndImport() override;
101 void OnMRMLSceneEndRestore() override;
102 void OnMRMLSceneEndClose() override;
103
104 void OnMRMLNodeModified(vtkMRMLNode* node) override;
105
106private:
107
108 std::string m_StringHolder;
109
110private:
112 void operator=(const vtkSlicerSceneViewsModuleLogic&) = delete;
113};
114
115#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
void RemoveSceneViewNode(vtkMRMLSceneViewNode *sceneViewNode)
Remove a scene view node.
void ModifySceneView(std::string id, const char *name, const char *description, int screenshotType, vtkImageData *screenshot)
Modify an existing sceneView.
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
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.
std::string GetSceneViewName(const char *id)
Return the name 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.
std::string GetSceneViewDescription(const char *id)
Return the description of an existing sceneView.
vtkImageData * GetSceneViewScreenshot(const char *id)
Return the screenshot of an existing sceneView.
void OnMRMLSceneEndRestore() override
void OnMRMLSceneEndClose() override