Medical Imaging Interaction Toolkit  2021.10.99-9c07a326
Medical Imaging Interaction Toolkit
mitk::DataStorageSelection Class Reference

#include <mitkDataStorageSelection.h>

Inheritance diagram for mitk::DataStorageSelection:
Collaboration diagram for mitk::DataStorageSelection:

Public Types

typedef std::vector< mitk::DataNode * > Nodes
 
typedef Message1< const mitk::DataNode * > DataNodeEvent
 

Public Member Functions

 mitkClassMacroItkParent (DataStorageSelection, itk::Object)
 
 mitkNewMacro2Param (DataStorageSelection, DataStorage *, bool)
 
 mitkNewMacro3Param (DataStorageSelection, DataStorage *, NodePredicateBase *, bool)
 
 ~DataStorageSelection () override
 
mitk::DataStorage::Pointer GetDataStorage () const
 
mitk::NodePredicateBase::Pointer GetPredicate () const
 
unsigned int GetSize () const
 
mitk::DataNode::Pointer GetNode (unsigned int index) const
 
mitk::DataNode::Pointer GetNode () const
 
std::vector< mitk::DataNode * > GetNodes () const
 
bool DoesAutoAddNodes () const
 
DataStorageSelectionoperator= (mitk::DataNode *node)
 
DataStorageSelectionoperator= (mitk::DataNode::Pointer node)
 
virtual void SetDataStorage (mitk::DataStorage *_DataStorage)
 
virtual void SetPredicate (mitk::NodePredicateBase *_Predicate)
 
virtual void AddNode (const mitk::DataNode *node)
 
virtual void RemoveNode (const mitk::DataNode *node)
 
virtual void RemoveAllNodes ()
 
virtual void ObjectChanged (const itk::Object *caller, const itk::EventObject &event)
 

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::DataStoragem_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
 

Detailed Description

Definition at line 29 of file mitkDataStorageSelection.h.

Member Typedef Documentation

◆ DataNodeEvent

◆ Nodes

Definition at line 32 of file mitkDataStorageSelection.h.

Constructor & Destructor Documentation

◆ DataStorageSelection() [1/2]

mitk::DataStorageSelection::DataStorageSelection ( mitk::DataStorage _DataStorage,
bool  _AutoAddNodes 
)
protected

◆ DataStorageSelection() [2/2]

mitk::DataStorageSelection::DataStorageSelection ( mitk::DataStorage _DataStorage,
mitk::NodePredicateBase _Predicate,
bool  _AutoAddNodes 
)
protected

◆ ~DataStorageSelection()

mitk::DataStorageSelection::~DataStorageSelection ( )
override

Member Function Documentation

◆ AddListener()

void mitk::DataStorageSelection::AddListener ( mitk::DataNode node)
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

◆ AddNode()

virtual void mitk::DataStorageSelection::AddNode ( const mitk::DataNode node)
virtual

Add a node (if not already there)

◆ DoesAutoAddNodes()

bool mitk::DataStorageSelection::DoesAutoAddNodes ( ) const
See also
m_AutoAddNodes

◆ FindNode() [1/2]

mitk::DataNode::Pointer mitk::DataStorageSelection::FindNode ( const mitk::BaseProperty prop) const
protected

Find a node in the list by the given prop

◆ FindNode() [2/2]

mitk::DataNode::Pointer mitk::DataStorageSelection::FindNode ( const mitk::PropertyList propList) const
protected

Find a node in the list by the given proplist

◆ GetDataStorage()

mitk::DataStorage::Pointer mitk::DataStorageSelection::GetDataStorage ( ) const

Get the DataStorage.

◆ GetNode() [1/2]

mitk::DataNode::Pointer mitk::DataStorageSelection::GetNode ( unsigned int  index) const

Get node at a specific model index.

◆ GetNode() [2/2]

mitk::DataNode::Pointer mitk::DataStorageSelection::GetNode ( ) const

Returns the first node, same as calling GetNode(0)

◆ GetNodes()

std::vector<mitk::DataNode *> mitk::DataStorageSelection::GetNodes ( ) const

Returns a copy of the node-vector

◆ GetPredicate()

mitk::NodePredicateBase::Pointer mitk::DataStorageSelection::GetPredicate ( ) const

Get the predicate.

◆ GetSize()

unsigned int mitk::DataStorageSelection::GetSize ( ) const

Returns the size of this selection

◆ mitkClassMacroItkParent()

mitk::DataStorageSelection::mitkClassMacroItkParent ( DataStorageSelection  ,
itk::Object   
)

◆ mitkNewMacro2Param()

mitk::DataStorageSelection::mitkNewMacro2Param ( DataStorageSelection  ,
DataStorage ,
bool   
)

◆ mitkNewMacro3Param()

mitk::DataStorageSelection::mitkNewMacro3Param ( DataStorageSelection  ,
DataStorage ,
NodePredicateBase ,
bool   
)

◆ ObjectChanged()

virtual void mitk::DataStorageSelection::ObjectChanged ( const itk::Object *  caller,
const itk::EventObject &  event 
)
virtual

Called whenever an itk Object this class holds gets deleted or modified

◆ operator=() [1/2]

DataStorageSelection& mitk::DataStorageSelection::operator= ( mitk::DataNode node)

Removes all nodes, sets node as new first element

◆ operator=() [2/2]

DataStorageSelection& mitk::DataStorageSelection::operator= ( mitk::DataNode::Pointer  node)

Removes all nodes, sets node as new first element

◆ RemoveAllNodes()

virtual void mitk::DataStorageSelection::RemoveAllNodes ( )
virtual

Removes a node

◆ RemoveListener()

void mitk::DataStorageSelection::RemoveListener ( mitk::DataNode node)
protected

If a node is already in this list, all listeners will be removed

◆ RemoveNode()

virtual void mitk::DataStorageSelection::RemoveNode ( const mitk::DataNode node)
virtual

Removes a node

◆ Reset()

void mitk::DataStorageSelection::Reset ( )
protected

Removes all nodes and fill the vector again

◆ SetDataStorage()

virtual void mitk::DataStorageSelection::SetDataStorage ( mitk::DataStorage _DataStorage)
virtual

Sets the DataStorage.

◆ SetPredicate()

virtual void mitk::DataStorageSelection::SetPredicate ( mitk::NodePredicateBase _Predicate)
virtual

Sets the predicate. QmitkDataStorageTableModel is owner of the predicate!

Member Data Documentation

◆ m_AutoAddNodes

bool mitk::DataStorageSelection::m_AutoAddNodes
protected

Saves if new nodes are automatically added to this selection

Definition at line 184 of file mitkDataStorageSelection.h.

◆ m_DataStorage

mitk::DataStorage* mitk::DataStorageSelection::m_DataStorage
protected

Pointer to the DataStorage from which the nodes are selected

Definition at line 143 of file mitkDataStorageSelection.h.

◆ m_DataStorageDeletedTag

unsigned int mitk::DataStorageSelection::m_DataStorageDeletedTag
protected

DeleteTag for the DataStorage

Definition at line 147 of file mitkDataStorageSelection.h.

◆ m_NodeModifiedObserverTags

std::map<mitk::DataNode *, unsigned long> mitk::DataStorageSelection::m_NodeModifiedObserverTags
protected

Maps a node to a modified observer tag.

Definition at line 160 of file mitkDataStorageSelection.h.

◆ m_Nodes

std::vector<mitk::DataNode *> mitk::DataStorageSelection::m_Nodes
protected

Holds all selected Nodes.

Definition at line 156 of file mitkDataStorageSelection.h.

◆ m_Predicate

mitk::NodePredicateBase::Pointer mitk::DataStorageSelection::m_Predicate
protected

Holds the predicate that defines this SubSet of Nodes. If m_Predicate is nullptr all Nodes will be selected.

Definition at line 152 of file mitkDataStorageSelection.h.

◆ m_PropertyDeletedObserverTags

std::map<mitk::BaseProperty *, unsigned long> mitk::DataStorageSelection::m_PropertyDeletedObserverTags
protected

Maps a property to a delete observer tag.

Definition at line 176 of file mitkDataStorageSelection.h.

◆ m_PropertyListDeletedObserverTags

std::map<mitk::PropertyList *, unsigned long> mitk::DataStorageSelection::m_PropertyListDeletedObserverTags
protected

Maps a propertylist to a delete observer tag.

Definition at line 168 of file mitkDataStorageSelection.h.

◆ m_PropertyListModifiedObserverTags

std::map<mitk::PropertyList *, unsigned long> mitk::DataStorageSelection::m_PropertyListModifiedObserverTags
protected

Maps a propertylist to a modified observer tag.

Definition at line 164 of file mitkDataStorageSelection.h.

◆ m_PropertyModifiedObserverTags

std::map<mitk::BaseProperty *, unsigned long> mitk::DataStorageSelection::m_PropertyModifiedObserverTags
protected

Maps a property to a modified observer tag.

Definition at line 172 of file mitkDataStorageSelection.h.

◆ m_SelfCall

bool mitk::DataStorageSelection::m_SelfCall
protected

If set to true no event processing will be performed

Definition at line 180 of file mitkDataStorageSelection.h.

◆ NodeAdded

DataNodeEvent mitk::DataStorageSelection::NodeAdded

Definition at line 36 of file mitkDataStorageSelection.h.

◆ NodeChanged

DataNodeEvent mitk::DataStorageSelection::NodeChanged

Definition at line 35 of file mitkDataStorageSelection.h.

◆ NodeRemoved

DataNodeEvent mitk::DataStorageSelection::NodeRemoved

Definition at line 37 of file mitkDataStorageSelection.h.

◆ PropertyChanged

Message2<const mitk::DataNode *, const mitk::BaseProperty *> mitk::DataStorageSelection::PropertyChanged

Definition at line 38 of file mitkDataStorageSelection.h.


The documentation for this class was generated from the following file: