Slicer  4.13
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 
87  void RestoreScene(bool removeNodes = true);
88 
89  void SetAbsentStorageFileNames();
90 
92  void SetSceneViewDescription(const vtkStdString& newDescription);
93  vtkGetMacro(SceneViewDescription, vtkStdString);
94 
96  virtual void SetScreenShot(vtkImageData* newScreenShot);
97  vtkGetObjectMacro(ScreenShot, vtkImageData);
98 
105  // TODO use an enum for the types
106  virtual void SetScreenShotType(int type);
107  vtkGetMacro(ScreenShotType, int);
108 
109 
113 
117  int GetNodesByClass(const char *className, std::vector<vtkMRMLNode *> &nodes);
122  vtkCollection* GetNodesByClass(const char *className);
123 
127  bool IncludeNodeInSceneView(vtkMRMLNode *node);
128 
129  void SetSceneViewRootDir( const char* name);
130 
131 protected:
133  ~vtkMRMLSceneViewNode() override;
135  void operator=(const vtkMRMLSceneViewNode&);
136 
137 
139 
141  vtkStdString SceneViewDescription;
142 
144  vtkImageData* ScreenShot;
145 
148 
149 };
150 
151 #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
virtual void Copy(vtkMRMLNode *node)
Copy node contents from another node of the same type. Does not copy node ID and Scene. Performs deep copy - an independent copy is created from all data, including bulk data.
MRML node to represent a 3D surface model.
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:61
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