Slicer  5.3
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) override;
68 
69  vtkMRMLNode* CreateNodeInstance() override;
70 
72  void ReadXMLAttributes(const char** atts) override;
73 
75  void WriteXML(ostream& of, int indent) override;
76 
78  void Copy(vtkMRMLNode *node) override;
79 
81  const char* GetNodeTagName() 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{nullptr};
130 
132  char* OwnerPluginName{nullptr};
133 
136  std::map<std::string, std::string> UIDs;
137 
138 protected:
143 };
144 
145 #endif
Legacy subject hierarchy node to allow loading older MRML scenes.
void ReadXMLAttributes(const char **atts) override
Read node attributes from XML file
void Copy(vtkMRMLNode *node) override
Copy the node&#39;s attributes to this object
vtkMRMLNode * CreateNodeInstance() override
Create instance of the default node. Like New only virtual.
static const std::string SUBJECTHIERARCHY_UID_ITEM_SEPARATOR
void PrintSelf(ostream &os, vtkIndent indent) override
void WriteXML(ostream &of, int indent) override
Write this node&#39;s information to a MRML file in XML format.
Abstract class representing a hierarchy member.
void operator=(const vtkMRMLHierarchyNode &)
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:57
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
static vtkMRMLHierarchyNode * New()
static const std::string SUBJECTHIERARCHY_UID_NAME_VALUE_SEPARATOR
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
std::map< std::string, std::string > UIDs