Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLSubjectHierarchyLegacyNode.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Program: 3D Slicer
4 
5  Copyright (c) Laboratory for Percutaneous Surgery (PerkLab)
6  Queen's University, Kingston, ON, Canada. All Rights Reserved.
7 
8  See COPYRIGHT.txt
9  or http://www.slicer.org/copyright/copyright.txt for details.
10 
11  Unless required by applicable law or agreed to in writing, software
12  distributed under the License is distributed on an "AS IS" BASIS,
13  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  See the License for the specific language governing permissions and
15  limitations under the License.
16 
17  This file was originally developed by Csaba Pinter, PerkLab, Queen's University
18  and was supported through the Applied Cancer Research Unit program of Cancer Care
19  Ontario with funds provided by the Ontario Ministry of Health and Long-Term Care
20 
21 ==============================================================================*/
22 
23 // .NAME vtkMRMLSubjectHierarchyLegacyNode
24 // .SECTION
25 // MRML node to represent legacy subject hierarchy node
26 //
27 
28 #ifndef __vtkMRMLSubjectHierarchyLegacyNode_h
29 #define __vtkMRMLSubjectHierarchyLegacyNode_h
30 
31 // MRML includes
32 #include <vtkMRMLHierarchyNode.h>
33 
34 // STD includes
35 #include <map>
36 
54 {
55 public:
56  // Separator characters for (de)serializing the UID map
57  static const std::string SUBJECTHIERARCHY_UID_ITEM_SEPARATOR;
59 
60 public:
67  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
68 
69  virtual vtkMRMLNode* CreateNodeInstance() VTK_OVERRIDE;
70 
72  virtual void ReadXMLAttributes(const char** atts) VTK_OVERRIDE;
73 
75  virtual void WriteXML(ostream& of, int indent) VTK_OVERRIDE;
76 
78  virtual void Copy(vtkMRMLNode *node) VTK_OVERRIDE;
79 
81  virtual const char* GetNodeTagName() VTK_OVERRIDE;
82 
83 public:
89  static vtkMRMLSubjectHierarchyLegacyNode* GetSubjectHierarchyLegacyNodeByUID(vtkMRMLScene* scene, const char* uidName, const char* uidValue);
90 
97  static vtkMRMLSubjectHierarchyLegacyNode* GetSubjectHierarchyLegacyNodeByUIDList(vtkMRMLScene* scene, const char* uidName, const char* uidValue);
98 
99 public:
101  static void DeserializeUIDList(std::string uidListString, std::vector<std::string>& deserializedUIDList);
102 
107  std::vector<vtkMRMLSubjectHierarchyLegacyNode*> GetSubjectHierarchyNodesReferencedByDICOM();
108 
109 public:
111  vtkSetStringMacro(Level);
113  vtkGetStringMacro(Level);
114 
116  vtkSetStringMacro(OwnerPluginName);
118  vtkGetStringMacro(OwnerPluginName);
119 
122  std::string GetUID(std::string uidName);
123 
125  std::map<std::string, std::string> GetUIDs()const;
126 
127 protected:
129  char* Level;
130 
132  char* OwnerPluginName;
133 
136  std::map<std::string, std::string> UIDs;
137 
138 protected:
140  ~vtkMRMLSubjectHierarchyLegacyNode();
141  vtkMRMLSubjectHierarchyLegacyNode(const vtkMRMLSubjectHierarchyLegacyNode&);
142  void operator=(const vtkMRMLSubjectHierarchyLegacyNode&);
143 };
144 
145 #endif
Legacy subject hierarchy node to allow loading older MRML scenes.
virtual vtkMRMLNode * CreateNodeInstance() VTK_OVERRIDE
Create instance of the default node. Like New only virtual.
static const std::string SUBJECTHIERARCHY_UID_ITEM_SEPARATOR
LRU Cache.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
Abstract class representing a hierarchy member.
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:54
static vtkMRMLHierarchyNode * New()
static const std::string SUBJECTHIERARCHY_UID_NAME_VALUE_SEPARATOR
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:135