13 #ifndef mitkDataStorageSelection_h
14 #define mitkDataStorageSelection_h
45 typedef std::vector<mitk::DataNode *>
Nodes;
92 mitk::DataNode::Pointer
GetNode(
unsigned int index)
const;
167 virtual void ObjectChanged(
const itk::Object *caller,
const itk::EventObject &event);
#define MITKDATATYPESEXT_EXPORT
Abstract base class for properties.
Central node class of the MITK data tree, associating a data object with properties and mappers.
Manages a selection of DataNode objects from a DataStorage.
mitk::DataNode::Pointer GetNode() const
Returns the first node in the selection.
bool DoesAutoAddNodes() const
Query whether nodes are automatically added from the DataStorage.
mitk::DataStorage::Pointer GetDataStorage() const
Get the associated DataStorage.
std::map< mitk::PropertyList *, unsigned long > m_PropertyListDeletedObserverTags
Maps a propertylist to a delete observer tag.
virtual void AddNode(const mitk::DataNode *node)
Add a node to the selection if it is not already present.
Message2< const mitk::DataNode *, const mitk::BaseProperty * > PropertyChanged
Event fired when a property on a selected node changes.
DataStorageSelection(mitk::DataStorage *_DataStorage, bool _AutoAddNodes)
mitk::NodePredicateBase::Pointer GetPredicate() const
Get the predicate used for filtering nodes.
virtual void RemoveAllNodes()
Remove all nodes from the selection.
unsigned int m_DataStorageDeletedTag
std::map< mitk::PropertyList *, unsigned long > m_PropertyListModifiedObserverTags
Maps a propertylist to a modified observer tag.
virtual void SetDataStorage(mitk::DataStorage *_DataStorage)
Set or change the associated DataStorage.
std::vector< mitk::DataNode * > Nodes
mitk::DataNode::Pointer GetNode(unsigned int index) const
Get a node at a specific index.
DataStorageSelection & operator=(mitk::DataNode *node)
Remove all nodes and set a raw pointer as the sole element.
std::map< mitk::DataNode *, unsigned long > m_NodeModifiedObserverTags
Maps a node to a modified observer tag.
~DataStorageSelection() override
void AddListener(mitk::DataNode *node)
mitk::DataNode::Pointer FindNode(const mitk::PropertyList *propList) const
void RemoveListener(mitk::DataNode *node)
mitkClassMacroItkParent(DataStorageSelection, itk::Object)
virtual void RemoveNode(const mitk::DataNode *node)
Remove a node from the selection.
mitkNewMacro3Param(DataStorageSelection, DataStorage *, NodePredicateBase *, bool)
std::vector< mitk::DataNode * > GetNodes() const
Returns a copy of the internal node vector.
DataNodeEvent NodeChanged
Event fired when a node in the selection is modified.
virtual void SetPredicate(mitk::NodePredicateBase *_Predicate)
Set or change the filter predicate.
std::map< mitk::BaseProperty *, unsigned long > m_PropertyDeletedObserverTags
Maps a property to a delete observer tag.
mitk::DataNode::Pointer FindNode(const mitk::BaseProperty *prop) const
std::vector< mitk::DataNode * > m_Nodes
DataNodeEvent NodeAdded
Event fired when a node is added to the selection.
mitk::NodePredicateBase::Pointer m_Predicate
DataNodeEvent NodeRemoved
Event fired when a node is removed from the selection.
DataStorageSelection & operator=(mitk::DataNode::Pointer node)
Remove all nodes and set a smart pointer as the sole element.
mitk::DataStorage * m_DataStorage
mitkNewMacro2Param(DataStorageSelection, DataStorage *, bool)
std::map< mitk::BaseProperty *, unsigned long > m_PropertyModifiedObserverTags
Maps a property to a modified observer tag.
unsigned int GetSize() const
Returns the number of nodes in this selection.
DataStorageSelection(mitk::DataStorage *_DataStorage, mitk::NodePredicateBase *_Predicate, bool _AutoAddNodes)
Message1< const mitk::DataNode * > DataNodeEvent
virtual void ObjectChanged(const itk::Object *caller, const itk::EventObject &event)
Callback invoked when an observed ITK object is deleted or modified.
Abstract data management class that organizes DataNode objects in a directed acyclic graph.
Abstract base class for predicates used to filter DataNode objects in DataStorage queries.
Key-value list holding instances of BaseProperty.
Find image slices visible on a given plane.