Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
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
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:64
mitk::SceneReaderV1::OrderedNodesList
std::list< NodesAndParentsPair > OrderedNodesList
Definition: mitkSceneReaderV1.h:65
mitkUIDGenerator.h
itk::SmartPointer< Self >
mitk::SceneReaderV1::m_UIDGen
UIDGenerator m_UIDGen
Definition: mitkSceneReaderV1.h:73
mitk::SceneReaderV1::LoadScene
bool LoadScene(tinyxml2::XMLDocument &document, const std::string &workingDirectory, DataStorage *storage) override
mitk::SceneReader
Definition: mitkSceneReader.h:29
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::SceneReaderV1::mitkClassMacro
mitkClassMacro(SceneReaderV1, SceneReader)
mitk::SceneReaderV1::NodeToIDMappingType
std::map< DataNode *, std::string > NodeToIDMappingType
Definition: mitkSceneReaderV1.h:67
mitk::SceneReaderV1::m_IDForNode
NodeToIDMappingType m_IDForNode
Definition: mitkSceneReaderV1.h:71
mitk::SceneReaderV1::m_OrderedNodePairs
OrderedNodesList m_OrderedNodePairs
Definition: mitkSceneReaderV1.h:69
mitk::PropertyList
Key-value list holding instances of BaseProperty.
Definition: mitkPropertyList.h:56
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:66
mitk::SceneReaderV1::m_NodeForID
IDToNodeMappingType m_NodeForID
Definition: mitkSceneReaderV1.h:70
tinyxml2
Definition: mitkContourModelReader.h:25
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:26
mitk::UIDGenerator
Generated unique IDs.
Definition: mitkUIDGenerator.h:31
mitk::DataNode
Class for nodes of the DataTree.
Definition: mitkDataNode.h:63