Medical Imaging Interaction Toolkit
2016.11.0
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=0) | |
virtual | ~QmitkToolWorkingDataSelectionBox () |
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.
There is a separate page describing the general design of QmitkInteractiveSegmentation: QmitkInteractiveSegmentationTechnicalPage
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 46 of file QmitkToolWorkingDataSelectionBox.h.
|
protected |
Definition at line 130 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 61 of file QmitkToolWorkingDataSelectionBox.h.
QmitkToolWorkingDataSelectionBox::QmitkToolWorkingDataSelectionBox | ( | QWidget * | parent = 0 | ) |
|
virtual |
Definition at line 42 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 211 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, mitk::NodePredicateOr::New(), and mitk::New().
Referenced by UpdateDataDisplay().
mitk::DataStorage * QmitkToolWorkingDataSelectionBox::GetDataStorage | ( | ) |
Definition at line 46 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 196 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 167 of file QmitkToolWorkingDataSelectionBox.cpp.
References m_Node.
Referenced by OnWorkingDataSelectionChanged().
mitk::ToolManager * QmitkToolWorkingDataSelectionBox::GetToolManager | ( | ) |
Returns the associated mitk::ToolManager.
Definition at line 56 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 113 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 102 of file QmitkToolWorkingDataSelectionBox.cpp.
References m_SelfCall, m_ToolManager, UpdateDataDisplay(), and WorkingNodeSelected().
Referenced by QmitkToolWorkingDataSelectionBox(), and SetToolManager().
|
protectedslot |
Definition at line 79 of file QmitkToolWorkingDataSelectionBox.cpp.
References GetSelectedNodes(), m_SelfCall, m_ToolManager, and WorkingNodeSelected().
Referenced by QmitkToolWorkingDataSelectionBox().
void QmitkToolWorkingDataSelectionBox::SetDataStorage | ( | mitk::DataStorage & | storage | ) |
Definition at line 51 of file QmitkToolWorkingDataSelectionBox.cpp.
References m_ToolManager.
void QmitkToolWorkingDataSelectionBox::SetToolManager | ( | mitk::ToolManager & | newManager | ) |
Tell this object to listen to another ToolManager.
Definition at line 61 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 124 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 142 of file QmitkToolWorkingDataSelectionBox.h.
|
protected |
Definition at line 138 of file QmitkToolWorkingDataSelectionBox.h.
Referenced by OnToolManagerReferenceDataModified().
|
protected |
Definition at line 134 of file QmitkToolWorkingDataSelectionBox.h.
Referenced by GetSelectedNode(), GetSelectedNodes(), and UpdateDataDisplay().
|
protected |
Definition at line 136 of file QmitkToolWorkingDataSelectionBox.h.
Referenced by OnToolManagerWorkingDataModified(), and OnWorkingDataSelectionChanged().
|
protected |
Definition at line 140 of file QmitkToolWorkingDataSelectionBox.h.
Referenced by GetAllNodes().
|
protected |
Definition at line 132 of file QmitkToolWorkingDataSelectionBox.h.
Referenced by GetAllNodes(), GetDataStorage(), GetToolManager(), OnToolManagerReferenceDataModified(), OnToolManagerWorkingDataModified(), OnWorkingDataSelectionChanged(), QmitkToolWorkingDataSelectionBox(), SetDataStorage(), and SetToolManager().