#include <QmitkMultiLabelInspector.h>
Definition at line 38 of file QmitkMultiLabelInspector.h.
◆ LabelValueType
◆ LabelValueVectorType
◆ IndexLevelType
◆ QmitkMultiLabelInspector()
QmitkMultiLabelInspector::QmitkMultiLabelInspector |
( |
QWidget * |
parent = nullptr | ) |
|
◆ ~QmitkMultiLabelInspector()
QmitkMultiLabelInspector::~QmitkMultiLabelInspector |
( |
| ) |
|
◆ AddNewGroup
Adds a new group with a new label to segmentation.
- Precondition
- AllowLabeModification must be set to true.
◆ AddNewLabel
Adds a new label to the segmentation. Depending on the settings the name of the label will be either default generated or the rename delegate will be used. The label will be added to the same group as the first currently selected label.
- Precondition
- AllowLabeModification must be set to true.
◆ AddNewLabelInstance
mitk::Label* QmitkMultiLabelInspector::AddNewLabelInstance |
( |
| ) |
|
|
slot |
Adds an instance of the same label/class like the first label instance indicated by GetSelectedLabels() to the segmentation.
This new label instance is returned by the function. If the inspector has no selected label, no new instance will be generated and nullptr will be returned.
- Precondition
- AllowLabeModification must be set to true.
◆ AddNewLabelInstanceInternal()
Adds an instance of the same label/class like the passed label value.
◆ AddNewLabelInternal()
◆ CurrentSelectionChanged
A signal that will be emitted if the selected labels change.
- Parameters
-
labels | A list of label values that are now selected. |
◆ DeleteLabel
void QmitkMultiLabelInspector::DeleteLabel |
( |
| ) |
|
|
slot |
Delete the first currently selected label and all its instances of the segmentation. If no label is selected nothing will happen.
- Precondition
- AllowLabeModification must be set to true.
◆ DeleteLabelInstance
void QmitkMultiLabelInspector::DeleteLabelInstance |
( |
| ) |
|
|
slot |
Removes the first currently selected label instance of the segmentation. If no label is selected nothing will happen.
- Precondition
- AllowLabeModification must be set to true.
◆ DeleteLabelInternal()
◆ GetAllowLabelModification()
bool QmitkMultiLabelInspector::GetAllowLabelModification |
( |
| ) |
const |
◆ GetAllowLockModification()
bool QmitkMultiLabelInspector::GetAllowLockModification |
( |
| ) |
const |
◆ GetAllowVisibilityModification()
bool QmitkMultiLabelInspector::GetAllowVisibilityModification |
( |
| ) |
const |
◆ GetCurrentLabel()
mitk::Label* QmitkMultiLabelInspector::GetCurrentLabel |
( |
| ) |
const |
Returns the label that currently has the focus in the tree view.
The focus is indicated by QTreeView::currentIndex, thus the mouse is over it and it has a dashed border line.
The current label must not equal the selected label(s). If the mouse is not hovering above a label (label class or instance item), the method will return nullptr.
◆ GetCurrentLevelType()
IndexLevelType QmitkMultiLabelInspector::GetCurrentLevelType |
( |
| ) |
const |
Returns the level of the index that currently has the focus in the tree view.
The focus is indicated by QTreeView::currentIndex, thus the mouse is over it and it has a dashed border line.
◆ GetCurrentlyAffactedLabelInstances()
Returns all label values that are currently affected.
Affected means that these labels (including the one returned by GetCurrentLabel) are in the subtree of the tree view element that currently has the focus (indicated by QTreeView::currentIndex, thus the mouse is over it and it has a dashed border line.
◆ GetFirstSelectedLabelObject()
mitk::Label* QmitkMultiLabelInspector::GetFirstSelectedLabelObject |
( |
| ) |
const |
|
protected |
Helper that returns the label object (if multiple labels are selected the first).
◆ GetLabelInstancesOfSelectedFirstLabel()
Returns the values of all label instances that are of the same label (class) like the first selected label instance.
If no label is selected an empty vector will be returned.
◆ GetModelManipulationOngoing()
bool QmitkMultiLabelInspector::GetModelManipulationOngoing |
( |
| ) |
const |
Indicates if the inspector is currently modifying the model/segmentation. Thus as long as the manipulation is ongoing, one should assume the model to be in an invalid state.
◆ GetMultiLabelNode
◆ GetMultiLabelSegmentation
◆ GetMultiSelectionMode()
bool QmitkMultiLabelInspector::GetMultiSelectionMode |
( |
| ) |
const |
◆ GetSelectedLabels()
Retrieve the currently selected labels (equals the last CurrentSelectionChanged values).
◆ GetSelectedLabelsFromSelectionModel()
◆ GoToLabel
A signal that will be emitted if the user has requested to "go to" a certain label.
Going to a label would be e.g. to focus the renderwindows on the centroid of the label.
- Parameters
-
label | The label that should be focused. |
point | in World coordinate that should be focused. |
◆ Initialize()
void QmitkMultiLabelInspector::Initialize |
( |
| ) |
|
|
protected |
◆ keyPressEvent()
void QmitkMultiLabelInspector::keyPressEvent |
( |
QKeyEvent * |
event | ) |
|
|
overrideprotected |
◆ keyReleaseEvent()
void QmitkMultiLabelInspector::keyReleaseEvent |
( |
QKeyEvent * |
event | ) |
|
|
overrideprotected |
◆ LabelRenameRequested
void QmitkMultiLabelInspector::LabelRenameRequested |
( |
mitk::Label * |
label, |
|
|
bool |
rename, |
|
|
bool & |
canceled |
|
) |
| const |
|
signal |
Signal that is emitted, if a label should be (re)named and default label naming is deactivated.
The instance for which a new name is requested is passed with the signal.
- Parameters
-
| label | Pointer to the instance that needs a (new) name. |
| rename | Indicates if it is a renaming or naming of a new label. |
[out] | canceled | Indicating if the request was canceled by the used. |
◆ ModelUpdated
void QmitkMultiLabelInspector::ModelUpdated |
( |
| ) |
const |
|
signal |
Signal that is emitted, if the model was updated (e.g. by a delete or add operation).
◆ OnDataChanged()
void QmitkMultiLabelInspector::OnDataChanged |
( |
const QModelIndex & |
topLeft, |
|
|
const QModelIndex & |
bottomRight, |
|
|
const QList< int > & |
roles = QList< int >() |
|
) |
| |
|
protected |
◆ OnModelReset()
void QmitkMultiLabelInspector::OnModelReset |
( |
| ) |
|
|
protected |
◆ RemoveGroup
void QmitkMultiLabelInspector::RemoveGroup |
( |
| ) |
|
|
slot |
Removes the group of the first currently selected label of the segmentation. If no label is selected nothing will happen.
- Precondition
- AllowLabeModification must be set to true.
◆ RemoveGroupInternal()
◆ SegmentationChanged
void QmitkMultiLabelInspector::SegmentationChanged |
( |
| ) |
const |
|
signal |
Signal is emitted, if the segmentation is changed that is observed by the inspector.
◆ SetAllowLabelModification
void QmitkMultiLabelInspector::SetAllowLabelModification |
( |
bool |
labelMod | ) |
|
|
slot |
◆ SetAllowLockModification
void QmitkMultiLabelInspector::SetAllowLockModification |
( |
bool |
lockMod | ) |
|
|
slot |
◆ SetAllowVisibilityModification
void QmitkMultiLabelInspector::SetAllowVisibilityModification |
( |
bool |
visiblityMod | ) |
|
|
slot |
◆ SetDefaultLabelNaming
void QmitkMultiLabelInspector::SetDefaultLabelNaming |
( |
bool |
defaultLabelNaming | ) |
|
|
slot |
◆ SetLockOfAffectedLabels
void QmitkMultiLabelInspector::SetLockOfAffectedLabels |
( |
bool |
visible | ) |
const |
|
slot |
◆ SetMultiLabelNode
void QmitkMultiLabelInspector::SetMultiLabelNode |
( |
mitk::DataNode * |
node | ) |
|
|
slot |
Sets the segmentation node that will be used /monitored by the widget.
- Parameters
-
node | A pointer to the segmentation node. |
◆ SetMultiLabelSegmentation
Sets the segmentation that will be used and monitored by the widget.
- Parameters
-
segmentation | A pointer to the segmentation to set. |
- Precondition
- Segmentation node is nullptr.
◆ SetMultiSelectionMode
void QmitkMultiLabelInspector::SetMultiSelectionMode |
( |
bool |
multiMode | ) |
|
|
slot |
◆ SetSelectedLabel
The passed label will be used as new selection in the widget.
- Parameters
-
selectedLabel | Value of the selected label. |
◆ SetSelectedLabels
Transform a list of label values into the new selection of the inspector.
- Parameters
-
selectedLabels | A list of selected label values. |
◆ SetVisibilityOfAffectedLabels
void QmitkMultiLabelInspector::SetVisibilityOfAffectedLabels |
( |
bool |
visible | ) |
const |
|
slot |
◆ UpdateSelectionModel()
◆ m_ColorItemDelegate
QStyledItemDelegate* QmitkMultiLabelInspector::m_ColorItemDelegate |
|
protected |
◆ m_Controls
Ui::QmitkMultiLabelInspector* QmitkMultiLabelInspector::m_Controls |
|
protected |
◆ m_LastValidSelectedLabels
◆ m_LockItemDelegate
QStyledItemDelegate* QmitkMultiLabelInspector::m_LockItemDelegate |
|
protected |
◆ m_Model
◆ m_Segmentation
◆ m_VisibilityItemDelegate
QStyledItemDelegate* QmitkMultiLabelInspector::m_VisibilityItemDelegate |
|
protected |
The documentation for this class was generated from the following file: