Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
#include <mitkDataStorageSelection.h>
Public Types | |
typedef std::vector< mitk::DataNode * > | Nodes |
typedef Message1< const mitk::DataNode * > | DataNodeEvent |
Public Attributes | |
DataNodeEvent | NodeChanged |
DataNodeEvent | NodeAdded |
DataNodeEvent | NodeRemoved |
Message2< const mitk::DataNode *, const mitk::BaseProperty * > | PropertyChanged |
Protected Member Functions | |
DataStorageSelection (mitk::DataStorage *_DataStorage, bool _AutoAddNodes) | |
DataStorageSelection (mitk::DataStorage *_DataStorage, mitk::NodePredicateBase *_Predicate, bool _AutoAddNodes) | |
mitk::DataNode::Pointer | FindNode (const mitk::BaseProperty *prop) const |
mitk::DataNode::Pointer | FindNode (const mitk::PropertyList *propList) const |
void | Reset () |
void | RemoveListener (mitk::DataNode *node) |
void | AddListener (mitk::DataNode *node) |
Protected Attributes | |
mitk::DataStorage * | m_DataStorage |
unsigned int | m_DataStorageDeletedTag |
mitk::NodePredicateBase::Pointer | m_Predicate |
std::vector< mitk::DataNode * > | m_Nodes |
std::map< mitk::DataNode *, unsigned long > | m_NodeModifiedObserverTags |
Maps a node to a modified observer tag. More... | |
std::map< mitk::PropertyList *, unsigned long > | m_PropertyListModifiedObserverTags |
Maps a propertylist to a modified observer tag. More... | |
std::map< mitk::PropertyList *, unsigned long > | m_PropertyListDeletedObserverTags |
Maps a propertylist to a delete observer tag. More... | |
std::map< mitk::BaseProperty *, unsigned long > | m_PropertyModifiedObserverTags |
Maps a property to a modified observer tag. More... | |
std::map< mitk::BaseProperty *, unsigned long > | m_PropertyDeletedObserverTags |
Maps a property to a delete observer tag. More... | |
bool | m_SelfCall |
bool | m_AutoAddNodes |
Definition at line 33 of file mitkDataStorageSelection.h.
typedef Message1<const mitk::DataNode *> mitk::DataStorageSelection::DataNodeEvent |
Definition at line 37 of file mitkDataStorageSelection.h.
typedef std::vector<mitk::DataNode *> mitk::DataStorageSelection::Nodes |
Definition at line 36 of file mitkDataStorageSelection.h.
|
protected |
Definition at line 24 of file mitkDataStorageSelection.cpp.
References SetDataStorage().
|
protected |
Definition at line 30 of file mitkDataStorageSelection.cpp.
References SetDataStorage().
|
virtual |
Definition at line 38 of file mitkDataStorageSelection.cpp.
References SetDataStorage().
|
protected |
Adds listeners for modified/delete event, for the propertylists modified/delete and for the modified/delete event of each property and stores listener tags
Definition at line 306 of file mitkDataStorageSelection.cpp.
References mitk::PropertyList::GetMap(), mitk::DataNode::GetPropertyList(), m_NodeModifiedObserverTags, m_PropertyDeletedObserverTags, m_PropertyListDeletedObserverTags, m_PropertyListModifiedObserverTags, m_PropertyModifiedObserverTags, mitk::New(), and ObjectChanged().
Referenced by AddNode().
|
virtual |
Add a node (if not already there)
Definition at line 124 of file mitkDataStorageSelection.cpp.
References AddListener(), m_Nodes, m_Predicate, m_SelfCall, NodeAdded, and mitk::Message1< T, A >::Send().
Referenced by operator=(), Reset(), and SetDataStorage().
bool mitk::DataStorageSelection::DoesAutoAddNodes | ( | ) | const |
Definition at line 54 of file mitkDataStorageSelection.cpp.
References m_AutoAddNodes.
|
protected |
Find a node in the list by the given prop
Definition at line 223 of file mitkDataStorageSelection.cpp.
References m_Nodes.
Referenced by ObjectChanged().
|
protected |
Find a node in the list by the given proplist
Definition at line 241 of file mitkDataStorageSelection.cpp.
References m_Nodes.
mitk::DataStorage::Pointer mitk::DataStorageSelection::GetDataStorage | ( | ) | const |
Get the DataStorage.
Definition at line 44 of file mitkDataStorageSelection.cpp.
References m_DataStorage.
mitk::DataNode::Pointer mitk::DataStorageSelection::GetNode | ( | unsigned int | index | ) | const |
Get node at a specific model index.
Definition at line 48 of file mitkDataStorageSelection.cpp.
References m_Nodes.
mitk::DataNode::Pointer mitk::DataStorageSelection::GetNode | ( | ) | const |
Returns the first node, same as calling GetNode(0)
Definition at line 47 of file mitkDataStorageSelection.cpp.
std::vector< mitk::DataNode * > mitk::DataStorageSelection::GetNodes | ( | ) | const |
Returns a copy of the node-vector
Definition at line 53 of file mitkDataStorageSelection.cpp.
References m_Nodes.
mitk::NodePredicateBase::Pointer mitk::DataStorageSelection::GetPredicate | ( | ) | const |
Get the predicate.
Definition at line 45 of file mitkDataStorageSelection.cpp.
References m_Predicate.
unsigned int mitk::DataStorageSelection::GetSize | ( | ) | const |
Returns the size of this selection
Definition at line 46 of file mitkDataStorageSelection.cpp.
References m_Nodes.
mitk::DataStorageSelection::mitkClassMacroItkParent | ( | DataStorageSelection | , |
itk::Object | |||
) |
mitk::DataStorageSelection::mitkNewMacro2Param | ( | DataStorageSelection | , |
DataStorage * | , | ||
bool | |||
) |
mitk::DataStorageSelection::mitkNewMacro3Param | ( | DataStorageSelection | , |
DataStorage * | , | ||
NodePredicateBase * | , | ||
bool | |||
) |
|
virtual |
Called whenever an itk Object this class holds gets deleted or modified
Definition at line 182 of file mitkDataStorageSelection.cpp.
References FindNode(), m_SelfCall, NodeChanged, PropertyChanged, mitk::Message1< T, A >::Send(), and SetDataStorage().
Referenced by AddListener(), and SetDataStorage().
DataStorageSelection & mitk::DataStorageSelection::operator= | ( | mitk::DataNode * | node | ) |
Removes all nodes, sets node as new first element
Definition at line 55 of file mitkDataStorageSelection.cpp.
References AddNode(), and RemoveAllNodes().
DataStorageSelection & mitk::DataStorageSelection::operator= | ( | mitk::DataNode::Pointer | node | ) |
Removes all nodes, sets node as new first element
Definition at line 62 of file mitkDataStorageSelection.cpp.
|
virtual |
Removes a node
Definition at line 169 of file mitkDataStorageSelection.cpp.
References m_Nodes, and RemoveNode().
Referenced by operator=(), and Reset().
|
protected |
If a node is already in this list, all listeners will be removed
Definition at line 281 of file mitkDataStorageSelection.cpp.
References m_NodeModifiedObserverTags, m_PropertyDeletedObserverTags, m_PropertyListDeletedObserverTags, m_PropertyListModifiedObserverTags, and m_PropertyModifiedObserverTags.
Referenced by RemoveNode().
|
virtual |
Removes a node
Definition at line 148 of file mitkDataStorageSelection.cpp.
References m_Nodes, m_SelfCall, NodeRemoved, RemoveListener(), and mitk::Message1< T, A >::Send().
Referenced by RemoveAllNodes(), and SetDataStorage().
|
protected |
Removes all nodes and fill the vector again
Definition at line 255 of file mitkDataStorageSelection.cpp.
References AddNode(), mitk::DataStorage::GetAll(), mitk::DataStorage::GetSubset(), m_AutoAddNodes, m_DataStorage, m_Predicate, and RemoveAllNodes().
Referenced by SetDataStorage(), and SetPredicate().
|
virtual |
Sets the DataStorage.
Definition at line 68 of file mitkDataStorageSelection.cpp.
References mitk::MessageBase< AbstractDelegate >::AddListener(), AddNode(), mitk::DataStorage::AddNodeEvent, m_AutoAddNodes, m_DataStorage, m_DataStorageDeletedTag, mitk::New(), ObjectChanged(), mitk::MessageBase< AbstractDelegate >::RemoveListener(), RemoveNode(), mitk::DataStorage::RemoveNodeEvent, and Reset().
Referenced by DataStorageSelection(), ObjectChanged(), and ~DataStorageSelection().
|
virtual |
Sets the predicate. QmitkDataStorageTableModel is owner of the predicate!
Definition at line 114 of file mitkDataStorageSelection.cpp.
References m_Predicate, and Reset().
|
protected |
Saves if new nodes are automatically added to this selection
Definition at line 188 of file mitkDataStorageSelection.h.
Referenced by DoesAutoAddNodes(), Reset(), and SetDataStorage().
|
protected |
Pointer to the DataStorage from which the nodes are selected
Definition at line 147 of file mitkDataStorageSelection.h.
Referenced by GetDataStorage(), Reset(), and SetDataStorage().
|
protected |
DeleteTag for the DataStorage
Definition at line 151 of file mitkDataStorageSelection.h.
Referenced by SetDataStorage().
|
protected |
Maps a node to a modified observer tag.
Definition at line 164 of file mitkDataStorageSelection.h.
Referenced by AddListener(), and RemoveListener().
|
protected |
Holds all selected Nodes.
Definition at line 160 of file mitkDataStorageSelection.h.
Referenced by AddNode(), FindNode(), GetNode(), GetNodes(), GetSize(), RemoveAllNodes(), and RemoveNode().
|
protected |
Holds the predicate that defines this SubSet of Nodes. If m_Predicate is NULL all Nodes will be selected.
Definition at line 156 of file mitkDataStorageSelection.h.
Referenced by AddNode(), GetPredicate(), Reset(), and SetPredicate().
|
protected |
Maps a property to a delete observer tag.
Definition at line 180 of file mitkDataStorageSelection.h.
Referenced by AddListener(), and RemoveListener().
|
protected |
Maps a propertylist to a delete observer tag.
Definition at line 172 of file mitkDataStorageSelection.h.
Referenced by AddListener(), and RemoveListener().
|
protected |
Maps a propertylist to a modified observer tag.
Definition at line 168 of file mitkDataStorageSelection.h.
Referenced by AddListener(), and RemoveListener().
|
protected |
Maps a property to a modified observer tag.
Definition at line 176 of file mitkDataStorageSelection.h.
Referenced by AddListener(), and RemoveListener().
|
protected |
If set to true no event processing will be performed
Definition at line 184 of file mitkDataStorageSelection.h.
Referenced by AddNode(), ObjectChanged(), and RemoveNode().
DataNodeEvent mitk::DataStorageSelection::NodeAdded |
Definition at line 40 of file mitkDataStorageSelection.h.
Referenced by AddNode().
DataNodeEvent mitk::DataStorageSelection::NodeChanged |
Definition at line 39 of file mitkDataStorageSelection.h.
Referenced by ObjectChanged().
DataNodeEvent mitk::DataStorageSelection::NodeRemoved |
Definition at line 41 of file mitkDataStorageSelection.h.
Referenced by RemoveNode().
Message2<const mitk::DataNode *, const mitk::BaseProperty *> mitk::DataStorageSelection::PropertyChanged |
Definition at line 42 of file mitkDataStorageSelection.h.
Referenced by ObjectChanged().