Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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
33
34// STD includes
35#include <map>
36
53{
54public:
55 // Separator characters for (de)serializing the UID map
56 static const std::string SUBJECTHIERARCHY_UID_ITEM_SEPARATOR;
58
59public:
66 void PrintSelf(ostream& os, vtkIndent indent) override;
67
69
71 void ReadXMLAttributes(const char** atts) override;
72
74 void WriteXML(ostream& of, int indent) override;
75
77 void Copy(vtkMRMLNode *node) override;
78
80 const char* GetNodeTagName() override;
81
82public:
88 static vtkMRMLSubjectHierarchyLegacyNode* GetSubjectHierarchyLegacyNodeByUID(vtkMRMLScene* scene, const char* uidName, const char* uidValue);
89
96 static vtkMRMLSubjectHierarchyLegacyNode* GetSubjectHierarchyLegacyNodeByUIDList(vtkMRMLScene* scene, const char* uidName, const char* uidValue);
97
98public:
100 static void DeserializeUIDList(std::string uidListString, std::vector<std::string>& deserializedUIDList);
101
106 std::vector<vtkMRMLSubjectHierarchyLegacyNode*> GetSubjectHierarchyNodesReferencedByDICOM();
107
108public:
110 vtkSetStringMacro(Level);
112 vtkGetStringMacro(Level);
113
115 vtkSetStringMacro(OwnerPluginName);
117 vtkGetStringMacro(OwnerPluginName);
118
121 std::string GetUID(std::string uidName);
122
124 std::map<std::string, std::string> GetUIDs()const;
125
126protected:
128 char* Level{nullptr};
129
131 char* OwnerPluginName{nullptr};
132
135 std::map<std::string, std::string> UIDs;
136
137protected:
142};
143
144#endif
friend class vtkMRMLScene
char * Level
Level identifier (default levels are Subject and Study)
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
void PrintSelf(ostream &os, vtkIndent indent) override
static void DeserializeUIDList(std::string uidListString, std::vector< std::string > &deserializedUIDList)
Deserialize a UID list string (stored in the UID map) into a vector of UID strings.
char * OwnerPluginName
Name of the owner plugin that claimed this node.
std::vector< vtkMRMLSubjectHierarchyLegacyNode * > GetSubjectHierarchyNodesReferencedByDICOM()
static vtkMRMLSubjectHierarchyLegacyNode * GetSubjectHierarchyLegacyNodeByUIDList(vtkMRMLScene *scene, const char *uidName, const char *uidValue)
static vtkMRMLSubjectHierarchyLegacyNode * GetSubjectHierarchyLegacyNodeByUID(vtkMRMLScene *scene, const char *uidName, const char *uidValue)
void ReadXMLAttributes(const char **atts) override
Read node attributes from XML file.
void Copy(vtkMRMLNode *node) override
Copy the node's attributes to this object.
vtkMRMLSubjectHierarchyLegacyNode(const vtkMRMLSubjectHierarchyLegacyNode &)
static vtkMRMLSubjectHierarchyLegacyNode * New()
static const std::string SUBJECTHIERARCHY_UID_NAME_VALUE_SEPARATOR
void operator=(const vtkMRMLSubjectHierarchyLegacyNode &)
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Contour)
std::map< std::string, std::string > UIDs
std::map< std::string, std::string > GetUIDs() const
Get UID map for this subject hierarchy node.
vtkMRMLNode * CreateNodeInstance() override
Create instance of the default node. Like New only virtual.
std::string GetUID(std::string uidName)