13 #ifndef QmitkNewSegmentationDialog_h
14 #define QmitkNewSegmentationDialog_h
55 const mitk::Label* label =
nullptr,
Mode mode = Mode::NewLabel, QWidget* parent =
nullptr);
64 void OnFinished(
int result);
65 void OnSuggestionSelected();
66 void OnSuggestionDoubleClicked();
67 void OnColorButtonClicked();
68 void OnNameEdited(
const QString& text);
69 void OnFilterEdited(
const QString& text);
70 void OnFilterClearClicked();
71 void OnAutoFilterToggled(
bool checked);
74 void InitializeDialog();
75 void SetupConnections();
76 void LoadAndApplyPreferences();
78 void UpdateColorButtonBackground();
79 void UpdateNameList();
80 void UpdateSuggestionInfo();
81 void UpdateOKButton();
82 void UpdateControlStates();
83 void ApplyFilter(
const QString& filterText);
84 void SelectSuggestionByName(
const QString& name);
85 QString EffectiveNameFilter()
const;
86 bool GetAutoFilter()
const;
88 std::unique_ptr<Ui::QmitkNewSegmentationDialog> m_Ui;
91 bool m_EnforceSuggestions;
94 mitk::Label::Pointer m_Suggestion;
97 QString m_InitialName;
99 int m_TotalSuggestions;
100 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 in a multi-label segmentation.
MultiLabelSegmentation class for handling labels and layers in a segmentation session.
ConstLabelVector ConstLabelVectorType
itk::RGBPixel< float > Color
Standard RGB color typedef using float components.
#define MITK_QT_SEGMENTATION