Slicer  4.10
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 
82  bool HasStorageNodeID(const char* storageNodeID);
83 
92  void SetSlicerDataType ( const char *type );
93  const char *GetSlicerDataType ();
94 
95  int GetNumberOfStorageNodes();
96  const char *GetNthStorageNodeID(int n);
97  const char *GetStorageNodeID();
98 
101  vtkMRMLStorageNode* GetNthStorageNode(int n);
102  vtkMRMLStorageNode* GetStorageNode();
103 
109  virtual vtkMRMLStorageNode* CreateDefaultStorageNode();
110 
115  virtual std::string GetDefaultStorageNodeClassName(const char* filename = NULL);
116 
119  virtual bool AddDefaultStorageNode(const char* filename = NULL);
120 
134  virtual bool GetModifiedSinceRead();
135 
139  virtual void StorableModified();
140 
141  protected:
145  void operator=(const vtkMRMLStorableNode&);
146 
147  static const char* StorageNodeReferenceRole;
148  static const char* StorageNodeReferenceMRMLAttributeName;
149 
150  virtual const char* GetStorageNodeReferenceRole();
151  virtual const char* GetStorageNodeReferenceMRMLAttributeName();
152 
153  vtkTagTable *UserTagTable;
154 
158  std::string SlicerDataType;
159 
167  virtual vtkTimeStamp GetStoredTime();
168 
177  vtkTimeStamp StorableModifiedTime;
178 };
179 
180 #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 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