Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
Display the data selection of a ToolManager. More...
#include <QmitkToolWorkingDataSelectionBox.h>
Public Types | |
enum | DisplayMode { ListDataIfAllToolsMatch, ListDataIfAnyToolMatches } |
What kind of items should be displayed. More... | |
Signals | |
void | WorkingNodeSelected (const mitk::DataNode *) |
Public Member Functions | |
QmitkToolWorkingDataSelectionBox (QWidget *parent=nullptr) | |
~QmitkToolWorkingDataSelectionBox () override | |
mitk::DataStorage * | GetDataStorage () |
void | SetDataStorage (mitk::DataStorage &storage) |
void | UpdateDataDisplay () |
Can be called to trigger an update of the list contents. More... | |
mitk::ToolManager * | GetToolManager () |
Returns the associated mitk::ToolManager. More... | |
void | SetToolManager (mitk::ToolManager &) |
Tell this object to listen to another ToolManager. More... | |
mitk::ToolManager::DataVectorType | GetAllNodes (bool onlyDerivedFromOriginal=true) |
A list of all displayed DataNode objects. This method might be convenient for program modules that want to display additional information about these nodes, like a total volume of all segmentations, etc. More... | |
mitk::ToolManager::DataVectorType | GetSelectedNodes () |
A list of all selected DataNode objects. This method might be convenient for program modules that want to display additional information about these nodes, like a total volume of all segmentations, etc. More... | |
mitk::DataNode * | GetSelectedNode () |
Like GetSelectedNodes(), but will only return one object. Will only return what QListView gives as selected object (documentation says nothing is returned if list is in Single selection mode). More... | |
void | OnToolManagerWorkingDataModified () |
Callback function, no need to call it. This is used to observe and react to changes in the mitk::ToolManager object. More... | |
void | OnToolManagerReferenceDataModified () |
Callback function, no need to call it. This is used to observe and react to changes in the mitk::ToolManager object. More... | |
Protected Types | |
typedef std::map< QListWidgetItem *, mitk::DataNode * > | ItemNodeMapType |
Protected Slots | |
void | OnWorkingDataSelectionChanged () |
Protected Attributes | |
mitk::ToolManager::Pointer | m_ToolManager |
ItemNodeMapType | m_Node |
bool | m_SelfCall |
mitk::DataNode * | m_LastSelectedReferenceData |
std::string | m_ToolGroupsForFiltering |
bool | m_DisplayOnlyDerivedNodes |
Display the data selection of a ToolManager.
Shows the working data of a ToolManager in a segmentation setting. By default only the segmentation name is shown.
The working images (segmentations) are listed in a QListView, each row telling the color and name of a single segmentation. One or several segmentations can be selected to be the "active" segmentations.
Definition at line 39 of file QmitkToolWorkingDataSelectionBox.h.
|
protected |
Definition at line 123 of file QmitkToolWorkingDataSelectionBox.h.
What kind of items should be displayed.
Every mitk::Tool holds a NodePredicateBase object, telling the kind of data that this tool will successfully work with. There are two ways that this list box deals with these predicates.
DEFAULT is: list data if ANY one of the displayed tools' predicate matches. Other option: list data if ALL one of the displayed tools' predicate matches
Enumerator | |
---|---|
ListDataIfAllToolsMatch | |
ListDataIfAnyToolMatches |
Definition at line 54 of file QmitkToolWorkingDataSelectionBox.h.
QmitkToolWorkingDataSelectionBox::QmitkToolWorkingDataSelectionBox | ( | QWidget * | parent = nullptr | ) |
|
override |
Definition at line 38 of file QmitkToolWorkingDataSelectionBox.cpp.
mitk::ToolManager::DataVectorType QmitkToolWorkingDataSelectionBox::GetAllNodes | ( | bool | onlyDerivedFromOriginal = true | ) |
A list of all displayed DataNode objects. This method might be convenient for program modules that want to display additional information about these nodes, like a total volume of all segmentations, etc.
Build up predicate:
Definition at line 207 of file QmitkToolWorkingDataSelectionBox.cpp.
References mitk::DataStorage::GetAll(), mitk::DataStorage::GetDerivations(), mitk::Tool::GetGroup(), mitk::Tool::GetName(), mitk::DataStorage::GetSubset(), mitk::Tool::GetWorkingDataPreference(), m_ToolGroupsForFiltering, m_ToolManager, and mitk::NodePredicateOr::New().
Referenced by UpdateDataDisplay().
mitk::DataStorage * QmitkToolWorkingDataSelectionBox::GetDataStorage | ( | ) |
Definition at line 42 of file QmitkToolWorkingDataSelectionBox.cpp.
References m_ToolManager.
mitk::DataNode * QmitkToolWorkingDataSelectionBox::GetSelectedNode | ( | ) |
Like GetSelectedNodes(), but will only return one object. Will only return what QListView gives as selected object (documentation says nothing is returned if list is in Single selection mode).
Definition at line 192 of file QmitkToolWorkingDataSelectionBox.cpp.
References m_Node.
mitk::ToolManager::DataVectorType QmitkToolWorkingDataSelectionBox::GetSelectedNodes | ( | ) |
A list of all selected DataNode objects. This method might be convenient for program modules that want to display additional information about these nodes, like a total volume of all segmentations, etc.
Definition at line 163 of file QmitkToolWorkingDataSelectionBox.cpp.
References m_Node.
Referenced by OnWorkingDataSelectionChanged().
mitk::ToolManager * QmitkToolWorkingDataSelectionBox::GetToolManager | ( | ) |
Returns the associated mitk::ToolManager.
Definition at line 52 of file QmitkToolWorkingDataSelectionBox.cpp.
References m_ToolManager.
void QmitkToolWorkingDataSelectionBox::OnToolManagerReferenceDataModified | ( | ) |
Callback function, no need to call it. This is used to observe and react to changes in the mitk::ToolManager object.
Definition at line 109 of file QmitkToolWorkingDataSelectionBox.cpp.
References m_LastSelectedReferenceData, m_ToolManager, and UpdateDataDisplay().
Referenced by QmitkToolWorkingDataSelectionBox(), and SetToolManager().
void QmitkToolWorkingDataSelectionBox::OnToolManagerWorkingDataModified | ( | ) |
Callback function, no need to call it. This is used to observe and react to changes in the mitk::ToolManager object.
Definition at line 98 of file QmitkToolWorkingDataSelectionBox.cpp.
References m_SelfCall, m_ToolManager, UpdateDataDisplay(), and WorkingNodeSelected().
Referenced by QmitkToolWorkingDataSelectionBox(), and SetToolManager().
|
protectedslot |
Definition at line 75 of file QmitkToolWorkingDataSelectionBox.cpp.
References GetSelectedNodes(), m_SelfCall, m_ToolManager, and WorkingNodeSelected().
Referenced by QmitkToolWorkingDataSelectionBox().
void QmitkToolWorkingDataSelectionBox::SetDataStorage | ( | mitk::DataStorage & | storage | ) |
Definition at line 47 of file QmitkToolWorkingDataSelectionBox.cpp.
References m_ToolManager.
void QmitkToolWorkingDataSelectionBox::SetToolManager | ( | mitk::ToolManager & | newManager | ) |
Tell this object to listen to another ToolManager.
Definition at line 57 of file QmitkToolWorkingDataSelectionBox.cpp.
References m_ToolManager, OnToolManagerReferenceDataModified(), OnToolManagerWorkingDataModified(), and UpdateDataDisplay().
void QmitkToolWorkingDataSelectionBox::UpdateDataDisplay | ( | ) |
Can be called to trigger an update of the list contents.
Definition at line 120 of file QmitkToolWorkingDataSelectionBox.cpp.
References GetAllNodes(), mitk::DataNode::GetColor(), mitk::DataNode::GetName(), and m_Node.
Referenced by OnToolManagerReferenceDataModified(), OnToolManagerWorkingDataModified(), and SetToolManager().
|
signal |
Referenced by OnToolManagerWorkingDataModified(), and OnWorkingDataSelectionChanged().
|
protected |
Definition at line 135 of file QmitkToolWorkingDataSelectionBox.h.
|
protected |
Definition at line 131 of file QmitkToolWorkingDataSelectionBox.h.
Referenced by OnToolManagerReferenceDataModified().
|
protected |
Definition at line 127 of file QmitkToolWorkingDataSelectionBox.h.
Referenced by GetSelectedNode(), GetSelectedNodes(), and UpdateDataDisplay().
|
protected |
Definition at line 129 of file QmitkToolWorkingDataSelectionBox.h.
Referenced by OnToolManagerWorkingDataModified(), and OnWorkingDataSelectionChanged().
|
protected |
Definition at line 133 of file QmitkToolWorkingDataSelectionBox.h.
Referenced by GetAllNodes().
|
protected |
Definition at line 125 of file QmitkToolWorkingDataSelectionBox.h.
Referenced by GetAllNodes(), GetDataStorage(), GetToolManager(), OnToolManagerReferenceDataModified(), OnToolManagerWorkingDataModified(), OnWorkingDataSelectionChanged(), QmitkToolWorkingDataSelectionBox(), SetDataStorage(), and SetToolManager().