18 #include <itkCommand.h>
25 :
m_DataStorage(nullptr), m_Predicate(nullptr), m_SelfCall(false), m_AutoAddNodes(_AutoAddNodes)
33 :
m_DataStorage(nullptr), m_Predicate(_Predicate), m_SelfCall(false), m_AutoAddNodes(_AutoAddNodes)
64 *
this = node.GetPointer();
143 m_Nodes.push_back(nonConstNode);
174 unsigned int i =
m_Nodes.size();
198 if ((prop = dynamic_cast<const mitk::BaseProperty *>(caller)))
202 else if ((propList = dynamic_cast<const mitk::PropertyList *>(caller)))
206 else if (dynamic_cast<const mitk::DataStorage *>(caller))
228 for (
auto it2 = (*it)->GetPropertyList()->GetMap()->begin(); it2 != (*it)->GetPropertyList()->GetMap()->end();
231 if (it2->second == prop)
246 if ((*it)->GetPropertyList() == propList)
273 for (
auto it = _NodeSet->begin(); it != _NodeSet->end(); it++)
296 for (
auto it = propList->GetMap()->begin(); it != propList->GetMap()->end(); ++it)
322 for (
auto it = propList->
GetMap()->begin(); it != propList->
GetMap()->end(); ++it)
void RemoveListener(const AbstractDelegate &delegate) const
virtual void ObjectChanged(const itk::Object *caller, const itk::EventObject &event)
DataStorageSelection & operator=(mitk::DataNode *node)
virtual void RemoveNode(const mitk::DataNode *node)
void AddListener(const AbstractDelegate &delegate) const
mitk::PropertyList * GetPropertyList(const mitk::BaseRenderer *renderer=nullptr) const
Get the PropertyList of the renderer. If renderer is NULL, the BaseRenderer-independent PropertyList ...
Data management class that handles 'was created by' relations.
itk::SmartPointer< Self > Pointer
DataCollection - Class to facilitate loading/accessing structured data.
std::map< mitk::BaseProperty *, unsigned long > m_PropertyDeletedObserverTags
Maps a property to a delete observer tag.
bool DoesAutoAddNodes() const
Key-value list holding instances of BaseProperty.
DataNodeEvent NodeChanged
mitk::DataNode::Pointer FindNode(const mitk::BaseProperty *prop) const
itk::SmartPointer< const Self > ConstPointer
void AddListener(mitk::DataNode *node)
std::vector< mitk::DataNode * > GetNodes() const
mitk::DataNode::Pointer GetNode() const
virtual void SetDataStorage(mitk::DataStorage *_DataStorage)
virtual SetOfObjects::ConstPointer GetAll() const =0
returns a set of all data objects that are stored in the data storage
Abstract base class for properties.
mitk::DataStorage::Pointer m_DataStorage
SetOfObjects::ConstPointer GetSubset(const NodePredicateBase *condition) const
returns a set of data objects that meet the given condition(s)
unsigned int m_DataStorageDeletedTag
std::map< mitk::BaseProperty *, unsigned long > m_PropertyModifiedObserverTags
Maps a property to a modified observer tag.
DataStorageSelection(mitk::DataStorage *_DataStorage, bool _AutoAddNodes)
std::map< mitk::PropertyList *, unsigned long > m_PropertyListModifiedObserverTags
Maps a propertylist to a modified observer tag.
virtual void RemoveAllNodes()
DataStorageEvent AddNodeEvent
AddEvent is emitted whenever a new node has been added to the DataStorage.
Message2< const mitk::DataNode *, const mitk::BaseProperty * > PropertyChanged
mitk::DataStorage * m_DataStorage
DataStorageEvent RemoveNodeEvent
RemoveEvent is emitted directly before a node is removed from the DataStorage.
mitk::DataStorage::Pointer GetDataStorage() const
virtual void SetPredicate(mitk::NodePredicateBase *_Predicate)
void RemoveListener(mitk::DataNode *node)
Interface for evaluation conditions used in the DataStorage class GetSubset() method.
std::vector< mitk::DataNode * > m_Nodes
virtual void AddNode(const mitk::DataNode *node)
virtual ~DataStorageSelection()
DataNodeEvent NodeRemoved
mitk::NodePredicateBase::Pointer m_Predicate
std::map< mitk::DataNode *, unsigned long > m_NodeModifiedObserverTags
Maps a node to a modified observer tag.
std::map< mitk::PropertyList *, unsigned long > m_PropertyListDeletedObserverTags
Maps a propertylist to a delete observer tag.
mitk::NodePredicateBase::Pointer GetPredicate() const
unsigned int GetSize() const
Class for nodes of the DataTree.
const PropertyMap * GetMap() const
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.