Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLStorableNode.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: vtkMRMLStorableNode.h,v $
10  Date: $Date: 2006/03/19 17:12:28 $
11  Version: $Revision: 1.6 $
12 
13 =========================================================================auto=*/
14 
15 #ifndef __vtkMRMLStorableNode_h
16 #define __vtkMRMLStorableNode_h
17 
18 // MRML includes
19 #include "vtkMRMLNode.h"
20 class vtkMRMLStorageNode;
21 
22 // VTK includes
23 class vtkTagTable;
24 
25 // STD includes
26 #include <vector>
27 
33 class VTK_MRML_EXPORT vtkMRMLStorableNode : public vtkMRMLNode
34 {
35 public:
37  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
38 
39  //--------------------------------------------------------------------------
41  //--------------------------------------------------------------------------
42  vtkGetObjectMacro ( UserTagTable, vtkTagTable );
43 
44  //--------------------------------------------------------------------------
46  //--------------------------------------------------------------------------
47 
48  virtual vtkMRMLNode* CreateNodeInstance() VTK_OVERRIDE = 0;
49 
50  virtual const char* GetNodeTagName() VTK_OVERRIDE = 0;
51 
54  virtual void ReadXMLAttributes( const char** atts) VTK_OVERRIDE;
55 
58  virtual void WriteXML(ostream& of, int indent) VTK_OVERRIDE;
59 
62  virtual void Copy(vtkMRMLNode *node) VTK_OVERRIDE;
63 
66  virtual void UpdateScene(vtkMRMLScene *scene) VTK_OVERRIDE;
67 
70  virtual void ProcessMRMLEvents ( vtkObject * /*caller*/,
71  unsigned long /*event*/,
72  void * /*callData*/ ) VTK_OVERRIDE;
73 
76  void SetAndObserveStorageNodeID(const char *storageNodeID);
77  void AddAndObserveStorageNodeID(const char *storageNodeID);
78  void SetAndObserveNthStorageNodeID(int n, const char *storageNodeID);
79 
88  void SetSlicerDataType ( const char *type );
89  const char *GetSlicerDataType ();
90 
91  int GetNumberOfStorageNodes();
92  const char *GetNthStorageNodeID(int n);
93  const char *GetStorageNodeID();
94 
97  vtkMRMLStorageNode* GetNthStorageNode(int n);
98  vtkMRMLStorageNode* GetStorageNode();
99 
105  virtual vtkMRMLStorageNode* CreateDefaultStorageNode();
106 
111  virtual std::string GetDefaultStorageNodeClassName(const char* filename = NULL);
112 
115  virtual bool AddDefaultStorageNode(const char* filename = NULL);
116 
130  virtual bool GetModifiedSinceRead();
131 
135  virtual void StorableModified();
136 
137  protected:
139  ~vtkMRMLStorableNode();
140  vtkMRMLStorableNode(const vtkMRMLStorableNode&);
141  void operator=(const vtkMRMLStorableNode&);
142 
143  static const char* StorageNodeReferenceRole;
144  static const char* StorageNodeReferenceMRMLAttributeName;
145 
146  virtual const char* GetStorageNodeReferenceRole();
147  virtual const char* GetStorageNodeReferenceMRMLAttributeName();
148 
149  vtkTagTable *UserTagTable;
150 
154  std::string SlicerDataType;
155 
163  virtual vtkTimeStamp GetStoredTime();
164 
173  vtkTimeStamp StorableModifiedTime;
174 };
175 
176 #endif
LRU Cache.
virtual vtkMRMLNode * CreateNodeInstance()=0
Create instance of the default node. Like New only virtual.
MRML node to represent a 3D surface model.
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:54
A supercalss for other storage nodes.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:135