Medical Imaging Interaction Toolkit  2022.04.99-194dd5d8
Medical Imaging Interaction Toolkit
mitkSceneReaderV1.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #include "mitkSceneReader.h"
14 
15 namespace tinyxml2
16 {
17  class XMLElement;
18 }
19 
20 namespace mitk
21 {
22  class SceneReaderV1 : public SceneReader
23  {
24  public:
26  itkFactorylessNewMacro(Self);
27  itkCloneMacro(Self);
28 
29  bool LoadScene(tinyxml2::XMLDocument &document,
30  const std::string &workingDirectory,
31  DataStorage *storage) override;
32 
33  protected:
37  DataNode::Pointer LoadBaseDataFromDataTag(const tinyxml2::XMLElement *dataElement,
38  const std::string &workingDirectory,
39  bool &error);
40 
44  bool DecorateNodeWithProperties(DataNode *node, const tinyxml2::XMLElement *nodeElement, const std::string &workingDirectory);
45 
57  void ClearNodePropertyListWithExceptions(DataNode &node, PropertyList &propertyList);
58 
64  bool DecorateBaseDataWithProperties(BaseData::Pointer data,
65  const tinyxml2::XMLElement *baseDataNodeElem,
66  const std::string &workingDir);
67 
68  typedef std::pair<DataNode::Pointer, std::list<std::string>> NodesAndParentsPair;
69  typedef std::list<NodesAndParentsPair> OrderedNodesList;
70  typedef std::map<std::string, DataNode *> IDToNodeMappingType;
71  typedef std::map<DataNode *, std::string> NodeToIDMappingType;
72 
73  OrderedNodesList m_OrderedNodePairs;
74  IDToNodeMappingType m_NodeForID;
75  NodeToIDMappingType m_IDForNode;
76 
78  };
79 }
Data management class that handles &#39;was created by&#39; relations.
Generated unique IDs.
DataCollection - Class to facilitate loading/accessing structured data.
std::pair< DataNode::Pointer, std::list< std::string > > NodesAndParentsPair
Key-value list holding instances of BaseProperty.
NodeToIDMappingType m_IDForNode
std::map< DataNode *, std::string > NodeToIDMappingType
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
IDToNodeMappingType m_NodeForID
OrderedNodesList m_OrderedNodePairs
std::list< NodesAndParentsPair > OrderedNodesList
std::map< std::string, DataNode * > IDToNodeMappingType
Class for nodes of the DataTree.
Definition: mitkDataNode.h:63