13 #ifndef QmitkNewSegmentationDialog_h
14 #define QmitkNewSegmentationDialog_h
54 const mitk::Label* label =
nullptr,
Mode mode = Mode::NewLabel, QWidget* parent =
nullptr);
63 void OnFinished(
int result);
64 void OnSuggestionSelected();
65 void OnSuggestionDoubleClicked();
66 void OnColorButtonClicked();
67 void OnNameEdited(
const QString& text);
68 void OnFilterEdited(
const QString& text);
69 void OnFilterClearClicked();
70 void OnAutoFilterToggled(
bool checked);
73 void InitializeDialog();
74 void SetupConnections();
75 void LoadAndApplyPreferences();
77 void UpdateColorButtonBackground();
78 void UpdateNameList();
79 void UpdateSuggestionInfo();
80 void UpdateOKButton();
81 void UpdateControlStates();
82 void ApplyFilter(
const QString& filterText);
83 void SelectSuggestionByName(
const QString& name);
84 bool TryPreselectMatchingSuggestion(
const QString& name);
85 bool GetAutoFilter()
const;
87 Ui::QmitkNewSegmentationDialog* m_Ui;
90 bool m_EnforceSuggestions;
93 mitk::Label::Pointer m_Suggestion;
97 int m_TotalSuggestions;
98 int m_VisibleSuggestions;
Dialog for naming labels.
QmitkNewSegmentationDialog(const mitk::MultiLabelSegmentation *labelSetImage, const mitk::Label *label=nullptr, Mode mode=Mode::NewLabel, QWidget *parent=nullptr)
const mitk::Label * GetSuggestion() const
static bool DoRenameLabel(mitk::Label *label, mitk::MultiLabelSegmentation *segmentation, QWidget *parent=nullptr, Mode mode=Mode::NewLabel)
Static helper function to (re)name a label.
mitk::Color GetColor() const
~QmitkNewSegmentationDialog() override
A data structure describing a label.
MultiLabelSegmentation class for handling labels and layers in a segmentation session.
ConstLabelVector ConstLabelVectorType
itk::RGBPixel< float > Color
Color Standard RGB color typedef (float)
#define MITK_QT_SEGMENTATION