Slicer  4.10
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) VTK_OVERRIDE;
32 
33  virtual vtkMRMLNode* CreateNodeInstance() VTK_OVERRIDE;
34 
37  virtual void ReadXMLAttributes( const char** atts) VTK_OVERRIDE;
38 
41  virtual void WriteXML(ostream& of, int indent) VTK_OVERRIDE;
42 
45  virtual void WriteNodeBodyXML(ostream& of, int indent) VTK_OVERRIDE;
46 
49  virtual void Copy(vtkMRMLNode *node) VTK_OVERRIDE;
50 
53  virtual const char* GetNodeTagName() VTK_OVERRIDE {return "SceneView";}
54 
57  virtual void UpdateScene(vtkMRMLScene *scene) VTK_OVERRIDE;
58 
61  virtual void UpdateStoredScene();
62 
66  virtual void ProcessChildNode(vtkMRMLNode *node) VTK_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 
112  virtual vtkMRMLStorageNode* CreateDefaultStorageNode() VTK_OVERRIDE;
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:
135  void operator=(const vtkMRMLSceneViewNode&);
136 
137 
138  vtkMRMLScene* SnapshotScene;
139 
141  vtkStdString SceneViewDescription;
142 
144  vtkImageData* ScreenShot;
145 
147  int ScreenShotType;
148 
149 };
150 
151 #endif
virtual vtkMRMLStorageNode * CreateDefaultStorageNode()
LRU Cache.
virtual vtkMRMLNode * CreateNodeInstance() VTK_OVERRIDE=0
MRMLNode methods.
MRML node to represent a 3D surface model.
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:54
virtual void ProcessChildNode(vtkMRMLNode *)
Set dependencies between this node and a child node when parsing XML file.
Definition: vtkMRMLNode.h:169
A superclass for other storage nodes.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:138
virtual void UpdateScene(vtkMRMLScene *scene) VTK_OVERRIDE
Finds the storage node and read the data