Medical Imaging Interaction Toolkit  2025.12.02
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 #ifndef mitkSceneReaderV1_h
14 #define mitkSceneReaderV1_h
15 
16 #include <mitkSceneReader.h>
17 #include <mitkUIDGenerator.h>
18 
19 namespace tinyxml2
20 {
21  class XMLElement;
22 }
23 
24 namespace mitk
25 {
26  class SceneReaderV1 : public SceneReader
27  {
28  public:
30  itkFactorylessNewMacro(Self);
31  itkCloneMacro(Self);
32 
33  bool LoadScene(tinyxml2::XMLDocument &document,
34  const std::string &workingDirectory,
35  DataStorage *storage) override;
36 
37  protected:
41  DataNode::Pointer LoadBaseDataFromDataTag(const tinyxml2::XMLElement *dataElement,
42  const PropertyList *properties,
43  const std::string &workingDirectory,
44  bool &error);
45 
49  bool DecorateNodeWithProperties(DataNode *node, const tinyxml2::XMLElement *nodeElement, const std::string &workingDirectory);
50 
63 
64  typedef std::pair<DataNode::Pointer, std::list<std::string>> NodesAndParentsPair;
65  typedef std::list<NodesAndParentsPair> OrderedNodesList;
66  typedef std::map<std::string, DataNode *> IDToNodeMappingType;
67  typedef std::map<DataNode *, std::string> NodeToIDMappingType;
68 
72 
74  };
75 }
76 
77 #endif
Class for nodes of the DataTree.
Definition: mitkDataNode.h:64
Data management class that handles 'was created by' relations.
Key-value list holding instances of BaseProperty.
std::map< DataNode *, std::string > NodeToIDMappingType
bool DecorateNodeWithProperties(DataNode *node, const tinyxml2::XMLElement *nodeElement, const std::string &workingDirectory)
reads all the properties from the XML document and recreates them in node
bool LoadScene(tinyxml2::XMLDocument &document, const std::string &workingDirectory, DataStorage *storage) override
std::pair< DataNode::Pointer, std::list< std::string > > NodesAndParentsPair
std::list< NodesAndParentsPair > OrderedNodesList
IDToNodeMappingType m_NodeForID
DataNode::Pointer LoadBaseDataFromDataTag(const tinyxml2::XMLElement *dataElement, const PropertyList *properties, const std::string &workingDirectory, bool &error)
tries to create one DataNode from a given XML <node> element
OrderedNodesList m_OrderedNodePairs
std::map< std::string, DataNode * > IDToNodeMappingType
void ClearNodePropertyListWithExceptions(DataNode &node, PropertyList &propertyList)
Clear a default property list and handle some exceptions.
mitkClassMacro(SceneReaderV1, SceneReader)
NodeToIDMappingType m_IDForNode
Generated unique IDs.
Find image slices visible on a given plane.