Medical Imaging Interaction Toolkit  2023.04.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 
18 namespace tinyxml2
19 {
20  class XMLElement;
21 }
22 
23 namespace mitk
24 {
25  class SceneReaderV1 : public SceneReader
26  {
27  public:
29  itkFactorylessNewMacro(Self);
30  itkCloneMacro(Self);
31 
32  bool LoadScene(tinyxml2::XMLDocument &document,
33  const std::string &workingDirectory,
34  DataStorage *storage) override;
35 
36  protected:
40  DataNode::Pointer LoadBaseDataFromDataTag(const tinyxml2::XMLElement *dataElement,
41  const PropertyList *properties,
42  const std::string &workingDirectory,
43  bool &error);
44 
48  bool DecorateNodeWithProperties(DataNode *node, const tinyxml2::XMLElement *nodeElement, const std::string &workingDirectory);
49 
62 
63  typedef std::pair<DataNode::Pointer, std::list<std::string>> NodesAndParentsPair;
64  typedef std::list<NodesAndParentsPair> OrderedNodesList;
65  typedef std::map<std::string, DataNode *> IDToNodeMappingType;
66  typedef std::map<DataNode *, std::string> NodeToIDMappingType;
67 
71 
73  };
74 }
75 
76 #endif
mitk::SceneReaderV1::DecorateNodeWithProperties
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
mitk::SceneReaderV1::ClearNodePropertyListWithExceptions
void ClearNodePropertyListWithExceptions(DataNode &node, PropertyList &propertyList)
Clear a default property list and handle some exceptions.
mitkSceneReader.h
mitk::SceneReaderV1::NodesAndParentsPair
std::pair< DataNode::Pointer, std::list< std::string > > NodesAndParentsPair
Definition: mitkSceneReaderV1.h:63
mitk::SceneReaderV1::OrderedNodesList
std::list< NodesAndParentsPair > OrderedNodesList
Definition: mitkSceneReaderV1.h:64
itk::SmartPointer< Self >
mitk::SceneReaderV1::m_UIDGen
UIDGenerator m_UIDGen
Definition: mitkSceneReaderV1.h:72
mitk::SceneReaderV1::LoadScene
bool LoadScene(tinyxml2::XMLDocument &document, const std::string &workingDirectory, DataStorage *storage) override
mitk::SceneReader
Definition: mitkSceneReader.h:29
mitk
DataCollection - Class to facilitate loading/accessing structured data.
Definition: RenderingTests.dox:1
mitk::SceneReaderV1::mitkClassMacro
mitkClassMacro(SceneReaderV1, SceneReader)
mitk::SceneReaderV1::NodeToIDMappingType
std::map< DataNode *, std::string > NodeToIDMappingType
Definition: mitkSceneReaderV1.h:66
mitk::SceneReaderV1::m_IDForNode
NodeToIDMappingType m_IDForNode
Definition: mitkSceneReaderV1.h:70
mitk::SceneReaderV1::m_OrderedNodePairs
OrderedNodesList m_OrderedNodePairs
Definition: mitkSceneReaderV1.h:68
mitk::PropertyList
Key-value list holding instances of BaseProperty.
Definition: mitkPropertyList.h:64
mitk::DataStorage
Data management class that handles 'was created by' relations.
Definition: mitkDataStorage.h:43
mitk::SceneReaderV1::IDToNodeMappingType
std::map< std::string, DataNode * > IDToNodeMappingType
Definition: mitkSceneReaderV1.h:65
mitk::SceneReaderV1::m_NodeForID
IDToNodeMappingType m_NodeForID
Definition: mitkSceneReaderV1.h:69
tinyxml2
Definition: mitkXMLSerializable.h:20
mitk::SceneReaderV1::LoadBaseDataFromDataTag
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
mitk::SceneReaderV1
Definition: mitkSceneReaderV1.h:25
mitk::UIDGenerator
Generated unique IDs.
Definition: mitkUIDGenerator.h:31
mitk::DataNode
Class for nodes of the DataTree.
Definition: mitkDataNode.h:63