Medical Imaging Interaction Toolkit  2025.08.99-f7084adb
Medical Imaging Interaction Toolkit
QmitkTotalSegmentatorToolGUI.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 QmitkTotalSegmentatorToolGUI_h_Included
14 #define QmitkTotalSegmentatorToolGUI_h_Included
15 
17 
19 #include <mitkIPreferences.h>
20 #include <QMutex>
21 #include <QMessageBox>
22 
23 namespace Ui
24 {
25  class QmitkTotalSegmentatorToolGUIControls;
26 }
27 
28 /*
29  \ingroup org_mitk_gui_qt_interactivesegmentation_internal
30  \brief GUI for mitk::TotalSegmentatorTool.
31 */
33 {
34  Q_OBJECT
35 
36 public:
38  itkFactorylessNewMacro(Self);
39  itkCloneMacro(Self);
40 
41 protected slots:
42 
46  void OnPreviewBtnClicked();
47 
48 protected:
50  ~QmitkTotalSegmentatorToolGUI() override;
51 
52  void ConnectNewTool(mitk::SegWithPreviewTool* newTool) override;
53  void InitializeUI(QBoxLayout* mainLayout) override;
54 
58  void EnableAll(bool);
59 
63  void ToggleLicensedTasks(bool activate);
64 
68  void ShowErrorMessage(const std::string&, QMessageBox::Icon = QMessageBox::Critical);
69 
73  void WriteStatusMessage(const QString&);
74 
78  void WriteErrorMessage(const QString&);
79 
83  void OnPreferenceChangedEvent(const mitk::IPreferences::ChangeEvent&);
84 
88  void DownloadStatusWorker(const bool isDownloading);
89 
90  QMutex m_Mutex;
91  Ui::QmitkTotalSegmentatorToolGUIControls* m_Controls;
92  bool m_FirstPreviewComputation = true;
93  EnableConfirmSegBtnFunctionType m_SuperclassEnableConfirmSegBtnFnc;
95  const QStringList VALID_TASKS = {
96  "total",
97  "total_mr",
98  "cerebral_bleed",
99  "hip_implant",
100  "body",
101  "lung_vessels",
102  "pleural_pericard_effusion",
103  "head_glands_cavities",
104  "head_muscles",
105  "headneck_bones_vessels",
106  "headneck_muscles",
107  "liver_vessels",
108  "oculomotor_muscles",
109  "lung_nodules",
110  "kidney_cysts",
111  "breasts",
112  "liver_segments",
113  "liver_segments_mr",
114  "craniofacial_structures"
115  };
116 
117  const QStringList LICENSED_TASKS = {"heartchambers_highres",
118  "appendicular_bones",
119  "appendicular_bones_mr",
120  "tissue_types",
121  "tissue_types_mr",
122  "tissue_4_types",
123  "brain_structures",
124  "vertebrae_body",
125  "face",
126  "face_mr",
127  "thigh_shoulder_muscles",
128  "thigh_shoulder_muscles_mr",
129  "coronary_arteries"};
130 
131 };
132 
133 #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
QmitkTotalSegmentatorToolGUI::m_SuperclassEnableConfirmSegBtnFnc
EnableConfirmSegBtnFunctionType m_SuperclassEnableConfirmSegBtnFnc
Definition: QmitkTotalSegmentatorToolGUI.h:93
QmitkTotalSegmentatorToolGUI::m_Preferences
mitk::IPreferences * m_Preferences
Definition: QmitkTotalSegmentatorToolGUI.h:94
Ui
Definition: BlueBerryExampleLauncherDialog.h:21
QmitkTotalSegmentatorToolGUI::m_Controls
Ui::QmitkTotalSegmentatorToolGUIControls * m_Controls
Definition: QmitkTotalSegmentatorToolGUI.h:91
QmitkMultiLabelSegWithPreviewToolGUIBase::mitkClassMacro
mitkClassMacro(QmitkMultiLabelSegWithPreviewToolGUIBase, QmitkSegWithPreviewToolGUIBase)
MitkSegmentationUIExports.h
mitkIPreferences.h
mitk::IPreferences
Interface to application preferences.
Definition: mitkIPreferences.h:50
QmitkTotalSegmentatorToolGUI
Definition: QmitkTotalSegmentatorToolGUI.h:32
QmitkMultiLabelSegWithPreviewToolGUIBase
GUI for tools based on mitk::AutoMLSegmentationWithPreviewTool.
Definition: QmitkMultiLabelSegWithPreviewToolGUIBase.h:28
QmitkTotalSegmentatorToolGUI::m_Mutex
QMutex m_Mutex
Definition: QmitkTotalSegmentatorToolGUI.h:90
QmitkSegWithPreviewToolGUIBase::ConnectNewTool
virtual void ConnectNewTool(mitk::SegWithPreviewTool *newTool)