Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
QmitkMonaiLabelToolGUI.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef QmitkMonaiLabelToolGUI_h
14 #define QmitkMonaiLabelToolGUI_h
15 
17 #include "ui_QmitkMonaiLabelToolGUIControls.h"
19 #include <QMessageBox>
20 #include <mitkIPreferences.h>
21 #include <mitkMonaiLabelTool.h>
22 #include <QMap>
23 
25 {
26  Q_OBJECT
27 
28 public:
30  itkCloneMacro(Self);
31 
32 protected slots:
33 
34  void OnPreviewBtnClicked();
35  void OnFetchBtnClicked();
36  void OnModelChanged(const QString &);
37 
38 protected:
39  QmitkMonaiLabelToolGUI(int dimension);
41 
42  void ConnectNewTool(mitk::SegWithPreviewTool *newTool) override;
43  void InitializeUI(QBoxLayout *mainLayout) override;
44 
45  void EnableWidgets(bool enabled) override;
46 
47  virtual void DisplayWidgets(bool enabled);
48 
52  void WriteStatusMessage(const QString &);
53 
57  void WriteErrorMessage(const QString &);
58 
62  void ShowErrorMessage(const std::string &message);
63 
67  void StatusMessageListener(const bool status);
68 
72  void OnPreferenceChangedEvent(const mitk::IPreferences::ChangeEvent &event);
73 
77  void PopulateModelBox(QString appName, std::vector<mitk::MonaiModelInfo> models, bool allowAllModels);
78 
82  void PopulateUI(bool allowAllModels);
83 
84 private:
85  mitk::IPreferences *m_Preferences;
86  Ui_QmitkMonaiLabelToolGUIControls m_Controls;
87  bool m_FirstPreviewComputation = true;
88  EnableConfirmSegBtnFunctionType m_SuperclassEnableConfirmSegBtnFnc;
89  int m_Dimension;
90 };
91 
92 #endif
mitk::SegWithPreviewTool
Base class for any auto segmentation tool that provides a preview of the new segmentation.
Definition: mitkSegWithPreviewTool.h:38
MITKSEGMENTATIONUI_EXPORT
#define MITKSEGMENTATIONUI_EXPORT
Definition: MitkSegmentationUIExports.h:15
QmitkMultiLabelSegWithPreviewToolGUIBase.h
mitk::IPreferences::ChangeEvent
Event object sent on IPreferences::OnPropertyChanged events.
Definition: mitkIPreferences.h:56
QmitkMultiLabelSegWithPreviewToolGUIBase::InitializeUI
void InitializeUI(QBoxLayout *mainLayout) override
QmitkMonaiLabelToolGUI
Definition: QmitkMonaiLabelToolGUI.h:24
QmitkMultiLabelSegWithPreviewToolGUIBase::EnableWidgets
void EnableWidgets(bool enabled) override
QmitkMultiLabelSegWithPreviewToolGUIBase::mitkClassMacro
mitkClassMacro(QmitkMultiLabelSegWithPreviewToolGUIBase, QmitkSegWithPreviewToolGUIBase)
MitkSegmentationUIExports.h
mitkIPreferences.h
mitk::IPreferences
Interface to application preferences.
Definition: mitkIPreferences.h:50
mitkMonaiLabelTool.h
QmitkMultiLabelSegWithPreviewToolGUIBase
GUI for tools based on mitk::AutoMLSegmentationWithPreviewTool.
Definition: QmitkMultiLabelSegWithPreviewToolGUIBase.h:28
QmitkSegWithPreviewToolGUIBase::EnableConfirmSegBtnFunctionType
std::function< bool(bool)> EnableConfirmSegBtnFunctionType
Definition: QmitkSegWithPreviewToolGUIBase.h:63
QmitkSegWithPreviewToolGUIBase::ConnectNewTool
virtual void ConnectNewTool(mitk::SegWithPreviewTool *newTool)