Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
mitk::SceneReaderV1 Class Reference

#include <mitkSceneReaderV1.h>

Inheritance diagram for mitk::SceneReaderV1:
Collaboration diagram for mitk::SceneReaderV1:

Public Member Functions

 mitkClassMacro (SceneReaderV1, SceneReader)
 
Pointer Clone () const
 
bool LoadScene (tinyxml2::XMLDocument &document, const std::string &workingDirectory, DataStorage *storage) override
 
- Public Member Functions inherited from mitk::SceneReader
 mitkClassMacroItkParent (SceneReader, itk::Object)
 
Pointer Clone () const
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from mitk::SceneReader
static Pointer New ()
 

Protected Types

typedef std::pair< DataNode::Pointer, std::list< std::string > > NodesAndParentsPair
 
typedef std::list< NodesAndParentsPairOrderedNodesList
 
typedef std::map< std::string, DataNode * > IDToNodeMappingType
 
typedef std::map< DataNode *, std::string > NodeToIDMappingType
 

Protected Member Functions

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 More...
 
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 More...
 
void ClearNodePropertyListWithExceptions (DataNode &node, PropertyList &propertyList)
 Clear a default property list and handle some exceptions. More...
 

Protected Attributes

OrderedNodesList m_OrderedNodePairs
 
IDToNodeMappingType m_NodeForID
 
NodeToIDMappingType m_IDForNode
 
UIDGenerator m_UIDGen
 

Detailed Description

Definition at line 25 of file mitkSceneReaderV1.h.

Member Typedef Documentation

◆ IDToNodeMappingType

typedef std::map<std::string, DataNode *> mitk::SceneReaderV1::IDToNodeMappingType
protected

Definition at line 65 of file mitkSceneReaderV1.h.

◆ NodesAndParentsPair

typedef std::pair<DataNode::Pointer, std::list<std::string> > mitk::SceneReaderV1::NodesAndParentsPair
protected

Definition at line 63 of file mitkSceneReaderV1.h.

◆ NodeToIDMappingType

typedef std::map<DataNode *, std::string> mitk::SceneReaderV1::NodeToIDMappingType
protected

Definition at line 66 of file mitkSceneReaderV1.h.

◆ OrderedNodesList

Definition at line 64 of file mitkSceneReaderV1.h.

Member Function Documentation

◆ ClearNodePropertyListWithExceptions()

void mitk::SceneReaderV1::ClearNodePropertyListWithExceptions ( DataNode node,
PropertyList propertyList 
)
protected

Clear a default property list and handle some exceptions.

Called after assigning a BaseData object to a fresh DataNode via SetData(). This call to SetData() would create default properties that have not been there when saving the scene. Since they can produce problems, we clear the list and use only those properties that we read from the scene file.

This method also handles some exceptions for backwards compatibility. Those exceptions are documented directly in the code of the method.

◆ Clone()

Pointer mitk::SceneReaderV1::Clone ( ) const

◆ DecorateNodeWithProperties()

bool mitk::SceneReaderV1::DecorateNodeWithProperties ( DataNode node,
const tinyxml2::XMLElement *  nodeElement,
const std::string &  workingDirectory 
)
protected

reads all the properties from the XML document and recreates them in node

◆ LoadBaseDataFromDataTag()

DataNode::Pointer mitk::SceneReaderV1::LoadBaseDataFromDataTag ( const tinyxml2::XMLElement *  dataElement,
const PropertyList properties,
const std::string &  workingDirectory,
bool &  error 
)
protected

tries to create one DataNode from a given XML <node> element

◆ LoadScene()

bool mitk::SceneReaderV1::LoadScene ( tinyxml2::XMLDocument &  document,
const std::string &  workingDirectory,
DataStorage storage 
)
overridevirtual

Reimplemented from mitk::SceneReader.

◆ mitkClassMacro()

mitk::SceneReaderV1::mitkClassMacro ( SceneReaderV1  ,
SceneReader   
)

◆ New()

static Pointer mitk::SceneReaderV1::New ( )
static

Member Data Documentation

◆ m_IDForNode

NodeToIDMappingType mitk::SceneReaderV1::m_IDForNode
protected

Definition at line 70 of file mitkSceneReaderV1.h.

◆ m_NodeForID

IDToNodeMappingType mitk::SceneReaderV1::m_NodeForID
protected

Definition at line 69 of file mitkSceneReaderV1.h.

◆ m_OrderedNodePairs

OrderedNodesList mitk::SceneReaderV1::m_OrderedNodePairs
protected

Definition at line 68 of file mitkSceneReaderV1.h.

◆ m_UIDGen

UIDGenerator mitk::SceneReaderV1::m_UIDGen
protected

Definition at line 72 of file mitkSceneReaderV1.h.


The documentation for this class was generated from the following file: