Medical Imaging Interaction Toolkit  2025.08.99-f7084adb
Medical Imaging Interaction Toolkit
QmitkMultiLabelSelectionLabel Class Reference

#include <QmitkMultiLabelSelectionLabel.h>

Inheritance diagram for QmitkMultiLabelSelectionLabel:
Collaboration diagram for QmitkMultiLabelSelectionLabel:

Public Types

using LabelValueType = mitk::MultiLabelSegmentation::LabelValueType
 
using LabelValueVectorType = mitk::MultiLabelSegmentation::LabelValueVectorType
 

Public Slots

void SetSelectedLabels (const LabelValueVectorType &selectedLabels)
 Transform a list of label values into the new selection of the inspector. More...
 
void SetSelectedLabel (mitk::MultiLabelSegmentation::LabelValueType selectedLabel)
 The passed label will be used as new selection in the widget. More...
 
void SetMultiLabelSegmentation (mitk::MultiLabelSegmentation *segmentation)
 Sets the segmentation that will be used and monitored by the widget. More...
 
void SetMultiLabelNode (mitk::DataNode *node)
 Sets the segmentation node that will be used /monitored by the widget. More...
 
void SetHighlightingActivated (bool visiblityMod)
 
void SetEmptyInfo (QString info)
 

Signals

void CurrentSelectionChanged (LabelValueVectorType labels) const
 A signal that will be emitted if the selected labels change. More...
 

Public Member Functions

 QmitkMultiLabelSelectionLabel (QWidget *parent=nullptr)
 
 ~QmitkMultiLabelSelectionLabel ()
 
bool GetHighlightingActivated () const
 
mitk::MultiLabelSegmentationGetMultiLabelSegmentation () const
 
mitk::DataNodeGetMultiLabelNode () const
 
QString GetEmptyInfo () const
 
LabelValueVectorType GetSelectedLabels () const
 Retrieve the currently selected labels (equals the last CurrentSelectionChanged values). More...
 

Protected Member Functions

void Initialize ()
 
void UpdateWidget ()
 

Protected Attributes

mitk::MultiLabelSegmentation::Pointer m_Segmentation
 
LabelValueVectorType m_LastValidSelectedLabels
 
std::unique_ptr< Ui::QmitkMultiLabelSelectionLabel > m_Controls
 

Detailed Description

Definition at line 35 of file QmitkMultiLabelSelectionLabel.h.

Member Typedef Documentation

◆ LabelValueType

◆ LabelValueVectorType

Constructor & Destructor Documentation

◆ QmitkMultiLabelSelectionLabel()

QmitkMultiLabelSelectionLabel::QmitkMultiLabelSelectionLabel ( QWidget *  parent = nullptr)

◆ ~QmitkMultiLabelSelectionLabel()

QmitkMultiLabelSelectionLabel::~QmitkMultiLabelSelectionLabel ( )

Member Function Documentation

◆ CurrentSelectionChanged

void QmitkMultiLabelSelectionLabel::CurrentSelectionChanged ( LabelValueVectorType  labels) const
signal

A signal that will be emitted if the selected labels change.

Parameters
labelsA list of label values that are now selected.

◆ GetEmptyInfo()

QString QmitkMultiLabelSelectionLabel::GetEmptyInfo ( ) const

◆ GetHighlightingActivated()

bool QmitkMultiLabelSelectionLabel::GetHighlightingActivated ( ) const

◆ GetMultiLabelNode()

mitk::DataNode* QmitkMultiLabelSelectionLabel::GetMultiLabelNode ( ) const

◆ GetMultiLabelSegmentation()

mitk::MultiLabelSegmentation* QmitkMultiLabelSelectionLabel::GetMultiLabelSegmentation ( ) const

◆ GetSelectedLabels()

LabelValueVectorType QmitkMultiLabelSelectionLabel::GetSelectedLabels ( ) const

Retrieve the currently selected labels (equals the last CurrentSelectionChanged values).

◆ Initialize()

void QmitkMultiLabelSelectionLabel::Initialize ( )
protected

◆ SetEmptyInfo

void QmitkMultiLabelSelectionLabel::SetEmptyInfo ( QString  info)
slot

Set the info text that should be displayed if no label is selected. The string can contain HTML code, if desired.

◆ SetHighlightingActivated

void QmitkMultiLabelSelectionLabel::SetHighlightingActivated ( bool  visiblityMod)
slot

◆ SetMultiLabelNode

void QmitkMultiLabelSelectionLabel::SetMultiLabelNode ( mitk::DataNode node)
slot

Sets the segmentation node that will be used /monitored by the widget.

Parameters
nodeA pointer to the segmentation node.
Remarks
If not set, highlighting in render windows will not work.

◆ SetMultiLabelSegmentation

void QmitkMultiLabelSelectionLabel::SetMultiLabelSegmentation ( mitk::MultiLabelSegmentation segmentation)
slot

Sets the segmentation that will be used and monitored by the widget.

Parameters
segmentationA pointer to the segmentation to set.
Remarks
You cannot set the segmentation directly if a segmentation node is also set. Reset the node (nullptr) if you want to change to direct segmentation setting.
Precondition
Segmentation node is nullptr.

◆ SetSelectedLabel

void QmitkMultiLabelSelectionLabel::SetSelectedLabel ( mitk::MultiLabelSegmentation::LabelValueType  selectedLabel)
slot

The passed label will be used as new selection in the widget.

Parameters
selectedLabelValue of the selected label.
Remarks
Using this method to select labels will not trigger the CurrentSelectionChanged signal. Observers should regard that to avoid signal loops.

◆ SetSelectedLabels

void QmitkMultiLabelSelectionLabel::SetSelectedLabels ( const LabelValueVectorType selectedLabels)
slot

Transform a list of label values into the new selection of the inspector.

Parameters
selectedLabelsA list of selected label values.
Remarks
Using this method to select labels will not trigger the CurrentSelectionChanged signal. Observers should regard that to avoid signal loops.

◆ UpdateWidget()

void QmitkMultiLabelSelectionLabel::UpdateWidget ( )
protected

Member Data Documentation

◆ m_Controls

std::unique_ptr<Ui::QmitkMultiLabelSelectionLabel> QmitkMultiLabelSelectionLabel::m_Controls
protected

Definition at line 113 of file QmitkMultiLabelSelectionLabel.h.

◆ m_LastValidSelectedLabels

LabelValueVectorType QmitkMultiLabelSelectionLabel::m_LastValidSelectedLabels
protected

Definition at line 111 of file QmitkMultiLabelSelectionLabel.h.

◆ m_Segmentation

mitk::MultiLabelSegmentation::Pointer QmitkMultiLabelSelectionLabel::m_Segmentation
protected

Definition at line 109 of file QmitkMultiLabelSelectionLabel.h.


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