17 #ifndef MITKDATASTORAGE_H_HEADER_INCLUDED_
18 #define MITKDATASTORAGE_H_HEADER_INCLUDED_
20 #include "itkObject.h"
21 #include "itkSimpleFastMutexLock.h"
22 #include "itkVectorContainer.h"
31 class NodePredicateBase;
56 typedef itk::VectorContainer<unsigned int, mitk::DataNode::Pointer>
SetOfObjects;
112 bool onlyDirectSources =
true)
const = 0;
126 bool onlyDirectDerivations =
true)
const = 0;
152 bool onlyDirectDerivations =
true)
const;
157 template <
class DataType>
166 return dynamic_cast<DataType *
>(n->
GetData());
171 template <
class DataType>
174 return this->GetNamedObject<DataType>(name.c_str());
181 template <
class DataType>
184 bool onlyDirectDerivations =
true)
const
188 mitk::DataNode *n = this->GetNamedDerivedNode(name, sourceNode, onlyDirectDerivations);
192 return dynamic_cast<DataType *
>(n->
GetData());
282 const char *boolPropertyKey =
nullptr,
284 const char *boolPropertyKey2 =
nullptr)
const;
297 const char *boolPropertyKey2 =
nullptr)
const;
309 const char *boolPropertyKey =
nullptr);
320 const char *boolPropertyKey2 =
nullptr);
332 const char *boolPropertyKey =
nullptr)
334 return ComputeBoundingBox(
"visible", renderer, boolPropertyKey);
349 const char *boolPropertyKey2);
364 return ComputeTimeBounds(
"visible", renderer, boolPropertyKey);
376 void BlockNodeModifiedEvents(
bool block);
391 void OnNodeInteractorChanged(itk::Object *caller,
const itk::EventObject &event);
398 void OnNodeModifiedOrDeleted(
const itk::Object *caller,
const itk::EventObject &event);
436 virtual void PrintSelf(std::ostream &os, itk::Indent indent)
const override;
mitk::TimeBounds ComputeTimeBounds(const mitk::BaseRenderer *renderer, const char *boolPropertyKey)
Compute the time-bounds of all visible parts of the data tree structure, for general rendering or ren...
Data management class that handles 'was created by' relations.
itk::SmartPointer< Self > Pointer
std::set< std::string > GroupTagList
itk::VectorContainer< unsigned int, mitk::DataNode::Pointer > SetOfObjects
A Container of objects that is used as a result set of GetSubset() query operations (Set of...
itk::FixedArray< ScalarType, 2 > TimeBounds
Standard typedef for time-bounds.
DataType * GetNamedDerivedObject(const char *name, const mitk::DataNode *sourceNode, bool onlyDirectDerivations=true) const
Convenience method to get the first data object of a given data type with a given name that is derive...
itk::SimpleFastMutexLock m_MutexOne
std::map< const mitk::DataNode *, unsigned long > m_NodeModifiedObserverTags
Saves Modified-Observer Tags for each node in order to remove the event listeners again...
DataType * GetNamedObject(const std::string name) const
Convenience method to get the first data object of a given data type with a given name...
Organizes the rendering process.
DataStorageEvent DeleteNodeEvent
DeleteNodeEvent is emitted directly before a node is deleted.
DataCollection - Class to facilitate loading/accessing structured data.
BaseData * GetData() const
Get the data object (instance of BaseData, e.g., an Image) managed by this DataNode.
itk::SmartPointer< const Self > ConstPointer
Message1< const mitk::DataNode * > DataStorageEvent
mitk::DataNode * GetNamedNode(const std::string name) const
Convenience method to get the first node with a given name.
DataType * GetNamedObject(const char *name) const
Convenience method to get the first data object of a given data type with a given name...
#define mitkClassMacroItkParent(className, SuperClassName)
std::map< const mitk::DataNode *, unsigned long > m_NodeDeleteObserverTags
Saves Delete-Observer Tags for each node in order to remove the event listeners again.
DataStorageEvent AddNodeEvent
AddEvent is emitted whenever a new node has been added to the DataStorage.
DataStorageEvent RemoveNodeEvent
RemoveEvent is emitted directly before a node is removed from the DataStorage.
std::map< const mitk::DataNode *, unsigned long > m_NodeInteractorChangedObserverTags
DataStorageEvent ChangedNodeEvent
ChangedEvent is emitted directly after a node was changed.
Interface for evaluation conditions used in the DataStorage class GetSubset() method.
bool m_BlockNodeModifiedEvents
If this class changes nodes itself, set this to TRUE in order to suppress NodeChangedEvent to be emit...
DataStorageEvent InteractorChangedNodeEvent
mitk::BoundingBox::Pointer ComputeVisibleBoundingBox(const mitk::BaseRenderer *renderer=nullptr, const char *boolPropertyKey=nullptr)
Compute the bounding box of all visible parts of the data tree structure, for general rendering or re...
Class for nodes of the DataTree.