Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
vtkMRMLSceneViewNode.h
Go to the documentation of this file.
1/*=auto=========================================================================
2
3 Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH) All Rights Reserved.
4
5 See COPYRIGHT.txt
6 or http://www.slicer.org/copyright/copyright.txt for details.
7
8 Program: 3D Slicer
9 Module: $RCSfile: vtkMRMLSceneViewNode.h,v $
10 Date: $Date: 2006/03/19 17:12:29 $
11 Version: $Revision: 1.13 $
12
13=========================================================================auto=*/
14
15#ifndef __vtkMRMLSceneViewNode_h
16#define __vtkMRMLSceneViewNode_h
17
18#include "vtkMRMLStorableNode.h"
19
20// VTK includes
21class vtkCollection;
22class vtkImageData;
23
24// STD includes
25#include <string>
26
28class VTK_MRML_EXPORT vtkMRMLSceneViewNode : public vtkMRMLStorableNode
29{
30 public:
33 void PrintSelf(ostream& os, vtkIndent indent) override;
34
36
37 void SetScene(vtkMRMLScene* scene) override;
38
41 void ReadXMLAttributes( const char** atts) override;
42
45 void WriteXML(ostream& of, int indent) override;
46
49 void WriteNodeBodyXML(ostream& of, int indent) override;
50
53 void Copy(vtkMRMLNode *node) override;
54
57 const char* GetNodeTagName() override {return "SceneView";}
58
61 void UpdateScene(vtkMRMLScene *scene) override;
62
65 virtual void UpdateStoredScene();
66
70 void ProcessChildNode(vtkMRMLNode *node) override;
71
74
78 void StoreScene();
79
83
93 bool RestoreScene(bool removeNodes = true);
94
96
98 void SetSceneViewDescription(const std::string& newDescription);
99 vtkGetMacro(SceneViewDescription, std::string);
100
102 virtual void SetScreenShot(vtkImageData* newScreenShot);
103 vtkGetObjectMacro(ScreenShot, vtkImageData);
104
111 // TODO use an enum for the types
112 virtual void SetScreenShotType(int type);
113 vtkGetMacro(ScreenShotType, int);
114
115
119
123 int GetNodesByClass(const char *className, std::vector<vtkMRMLNode *> &nodes);
128 vtkCollection* GetNodesByClass(const char *className);
129
134
135 void SetSceneViewRootDir( const char* name);
136
137protected:
142
143
145
148
150 vtkImageData* ScreenShot;
151
154
155};
156
157#endif
friend class vtkMRMLScene
vtkMRMLScene * GetStoredScene()
void SetSceneViewRootDir(const char *name)
int ScreenShotType
The type of the screenshot.
virtual void SetScreenShotType(int type)
vtkCollection * GetNodesByClass(const char *className)
static vtkMRMLSceneViewNode * New()
void UpdateScene(vtkMRMLScene *scene) override
Updates scene nodes.
~vtkMRMLSceneViewNode() override
vtkMRMLStorageNode * CreateDefaultStorageNode() override
Create default storage node or nullptr if does not have one.
void SetSceneViewDescription(const std::string &newDescription)
A description of this sceneView.
bool RestoreScene(bool removeNodes=true)
std::string SceneViewDescription
The associated Description.
int GetNodesByClass(const char *className, std::vector< vtkMRMLNode * > &nodes)
void Copy(vtkMRMLNode *node) override
Copy the node's attributes to this object.
void ReadXMLAttributes(const char **atts) override
Read node attributes from XML file.
vtkMRMLNode * CreateNodeInstance() override
MRMLNode methods.
void PrintSelf(ostream &os, vtkIndent indent) override
void operator=(const vtkMRMLSceneViewNode &)
vtkImageData * ScreenShot
The vtkImageData of the screenshot.
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
void ProcessChildNode(vtkMRMLNode *node) override
bool IncludeNodeInSceneView(vtkMRMLNode *node)
void SetScene(vtkMRMLScene *scene) override
This method is for internal use only. Use AddNode method of vtkMRMLScene to add a node to the scene.
vtkMRMLSceneViewNode(const vtkMRMLSceneViewNode &)
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
virtual void UpdateStoredScene()
Updates internal nodes.
void WriteNodeBodyXML(ostream &of, int indent) override
Write this node's body to a MRML file in XML format.
virtual void SetScreenShot(vtkImageData *newScreenShot)
The attached screenshot of this sceneView.
void SetAbsentStorageFileNames()
A superclass for other storage nodes.