Medical Imaging Interaction Toolkit  2026.06.00
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 {
32  class SceneReaderV1 : public SceneReader
33  {
34  public:
36  itkFactorylessNewMacro(Self);
37  itkCloneMacro(Self);
38 
47  bool LoadScene(tinyxml2::XMLDocument &document,
48  const std::string &workingDirectory,
49  DataStorage *storage) override;
50 
51  protected:
55  DataNode::Pointer LoadBaseDataFromDataTag(const tinyxml2::XMLElement *dataElement,
56  const PropertyList *properties,
57  const std::string &workingDirectory,
58  bool &error);
59 
63  bool DecorateNodeWithProperties(DataNode *node, const tinyxml2::XMLElement *nodeElement, const std::string &workingDirectory);
64 
77 
78  typedef std::pair<DataNode::Pointer, std::list<std::string>> NodesAndParentsPair;
79  typedef std::list<NodesAndParentsPair> OrderedNodesList;
80  typedef std::map<std::string, DataNode *> IDToNodeMappingType;
81  typedef std::map<DataNode *, std::string> NodeToIDMappingType;
82 
86 
88  };
89 }
90 
91 #endif
Central node class of the MITK data tree, associating a data object with properties and mappers.
Definition: mitkDataNode.h:72
Abstract data management class that organizes DataNode objects in a directed acyclic graph.
Key-value list holding instances of BaseProperty.
Version 1 implementation of the MITK scene reader.
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
Load a scene from an XML document into the given DataStorage.
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
Reads a MITK scene from an XML document and populates a DataStorage.
Generates unique identifier strings.
Find image slices visible on a given plane.