Slicer  5.0
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
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
21 #include <vtkStdString.h>
22 class vtkCollection;
23 class vtkImageData;
24 
25 class vtkMRMLStorageNode;
26 class VTK_MRML_EXPORT vtkMRMLSceneViewNode : public vtkMRMLStorableNode
27 {
28  public:
29  static vtkMRMLSceneViewNode *New();
31  void PrintSelf(ostream& os, vtkIndent indent) override;
32 
33  vtkMRMLNode* CreateNodeInstance() override;
34 
37  void ReadXMLAttributes( const char** atts) override;
38 
41  void WriteXML(ostream& of, int indent) override;
42 
45  void WriteNodeBodyXML(ostream& of, int indent) override;
46 
49  void Copy(vtkMRMLNode *node) override;
50 
53  const char* GetNodeTagName() override {return "SceneView";}
54 
57  void UpdateScene(vtkMRMLScene *scene) override;
58 
61  virtual void UpdateStoredScene();
62 
66  void ProcessChildNode(vtkMRMLNode *node) override;
67 
69  vtkMRMLScene* GetStoredScene();
70 
74  void StoreScene();
75 
78  void AddMissingNodes();
79 
89  bool RestoreScene(bool removeNodes = true);
90 
91  void SetAbsentStorageFileNames();
92 
94  void SetSceneViewDescription(const vtkStdString& newDescription);
95  vtkGetMacro(SceneViewDescription, vtkStdString);
96 
98  virtual void SetScreenShot(vtkImageData* newScreenShot);
99  vtkGetObjectMacro(ScreenShot, vtkImageData);
100 
107  // TODO use an enum for the types
108  virtual void SetScreenShotType(int type);
109  vtkGetMacro(ScreenShotType, int);
110 
111 
115 
119  int GetNodesByClass(const char *className, std::vector<vtkMRMLNode *> &nodes);
124  vtkCollection* GetNodesByClass(const char *className);
125 
129  bool IncludeNodeInSceneView(vtkMRMLNode *node);
130 
131  void SetSceneViewRootDir( const char* name);
132 
133 protected:
135  ~vtkMRMLSceneViewNode() override;
137  void operator=(const vtkMRMLSceneViewNode&);
138 
139 
141 
143  vtkStdString SceneViewDescription;
144 
146  vtkImageData* ScreenShot;
147 
150 
151 };
152 
153 #endif
virtual void WriteNodeBodyXML(ostream &of, int indent)
Write this node&#39;s body to a MRML file in XML format.
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
virtual vtkMRMLStorageNode * CreateDefaultStorageNode()
void ReadXMLAttributes(const char **atts) override
Read node attributes from XML file
vtkMRMLNode * CreateNodeInstance() override=0
MRMLNode methods.
friend class vtkMRMLSceneViewNode
Definition: vtkMRMLNode.h:172
void Copy(vtkMRMLNode *node) override
Copy node contents from another node of the same type. Reimplemented to copy default sequence storage...
MRML node to represent a 3D surface model.
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:57
int ScreenShotType
The type of the screenshot.
vtkStdString SceneViewDescription
The associated Description.
virtual void ProcessChildNode(vtkMRMLNode *)
Set dependencies between this node and a child node when parsing XML file.
Definition: vtkMRMLNode.h:201
A superclass for other storage nodes.
void UpdateScene(vtkMRMLScene *scene) override
Finds the storage node and read the data
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
vtkImageData * ScreenShot
The vtkImageData of the screenshot.
void operator=(const vtkMRMLStorableNode &)
void WriteXML(ostream &of, int indent) override
Write this node&#39;s information to a MRML file in XML format.
void PrintSelf(ostream &os, vtkIndent indent) override