13 #ifndef mitkStandaloneDataStorage_h
14 #define mitkStandaloneDataStorage_h
16 #include "itkVectorContainer.h"
24 class NodePredicateBase;
41 itkFactorylessNewMacro(Self);
71 bool onlyDirectSources =
true)
const override;
85 bool onlyDirectDerivations =
true)
const override;
90 SetOfObjects::ConstPointer
GetAll()
const override;
97 typedef std::map<mitk::DataNode::ConstPointer, SetOfObjects::ConstPointer>
AdjacencyList;
111 bool onlyDirectlyRelated =
true)
const;
119 void PrintSelf(std::ostream &os, itk::Indent indent)
const override;
Class for nodes of the DataTree.
Data management class that handles 'was created by' relations.
itk::VectorContainer< unsigned int, DataNode::Pointer > SetOfObjects
A Container of objects that is used as a result set of GetSubset() query operations (Set of.
Interface for evaluation conditions used in the DataStorage class GetSubset() method.
Data management class that handles 'was created by' relations.
~StandaloneDataStorage() override
void PrintSelf(std::ostream &os, itk::Indent indent) const override
Prints the contents of the StandaloneDataStorage to os. Do not call directly, call ->Print() instead.
AdjacencyList m_SourceNodes
Nodes and their relation are stored in m_SourceNodes.
SetOfObjects::ConstPointer GetDerivations(const mitk::DataNode *node, const NodePredicateBase *condition=nullptr, bool onlyDirectDerivations=true) const override
returns a set of derived objects for a given node.
SetOfObjects::ConstPointer GetSources(const mitk::DataNode *node, const NodePredicateBase *condition=nullptr, bool onlyDirectSources=true) const override
returns a set of source objects for a given node that meet the given condition(s).
void RemoveFromRelation(const mitk::DataNode *node, AdjacencyList &relation)
deletes all references to a node in a given relation (used in Remove() and TreeListener)
void Remove(const mitk::DataNode *node) override
Removes node from the StandaloneDataStorage.
bool IsInitialized() const
convenience method to check if the object has been initialized (i.e. a data tree has been set)
mitkClassMacro(StandaloneDataStorage, mitk::DataStorage)
AdjacencyList m_DerivedNodes
Nodes are stored in reverse relation for easier traversal in the opposite direction of the relation.
SetOfObjects::ConstPointer GetRelations(const mitk::DataNode *node, const AdjacencyList &relation, const NodePredicateBase *condition=nullptr, bool onlyDirectlyRelated=true) const
Traverses the Relation graph and extracts a list of related elements (e.g. Sources or Derivations)
bool Exists(const mitk::DataNode *node) const override
Checks if a node exists in the StandaloneDataStorage.
void Add(mitk::DataNode *node, const mitk::DataStorage::SetOfObjects *parents=nullptr) override
Adds a DataNode containing a data object to its internal storage.
SetOfObjects::ConstPointer GetAll() const override
returns a set of all data objects that are stored in the data storage
std::map< mitk::DataNode::ConstPointer, SetOfObjects::ConstPointer > AdjacencyList
noncyclical directed graph data structure to store the nodes with their relation
Find image slices visible on a given plane.