Medical Imaging Interaction Toolkit  2025.12.02
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 
47 
48 protected:
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 
84 
88  void DownloadStatusWorker(const bool isDownloading);
89 
90  QMutex m_Mutex;
91  Ui::QmitkTotalSegmentatorToolGUIControls* m_Controls;
92  bool m_FirstPreviewComputation = true;
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
#define MITKSEGMENTATIONUI_EXPORT
GUI for tools based on mitk::AutoMLSegmentationWithPreviewTool.
std::function< bool(bool)> EnableConfirmSegBtnFunctionType
void OnPreferenceChangedEvent(const mitk::IPreferences::ChangeEvent &)
Checks for changes in preferences.
mitkClassMacro(QmitkTotalSegmentatorToolGUI, QmitkMultiLabelSegWithPreviewToolGUIBase)
void ShowErrorMessage(const std::string &, QMessageBox::Icon=QMessageBox::Critical)
Creates a QMessage object and shows on screen.
void EnableAll(bool)
Enable (or Disable) GUI elements.
void OnPreviewBtnClicked()
Qt Slot.
void ConnectNewTool(mitk::SegWithPreviewTool *newTool) override
EnableConfirmSegBtnFunctionType m_SuperclassEnableConfirmSegBtnFnc
Ui::QmitkTotalSegmentatorToolGUIControls * m_Controls
void InitializeUI(QBoxLayout *mainLayout) override
~QmitkTotalSegmentatorToolGUI() override
void WriteStatusMessage(const QString &)
Writes any message in white on the tool pane.
void DownloadStatusWorker(const bool isDownloading)
Update status label as per status received from mitk::Message event.
void ToggleLicensedTasks(bool activate)
Adds and removes licensed task in combo box.
void WriteErrorMessage(const QString &)
Writes any message in red on the tool pane.
Event object sent on IPreferences::OnPropertyChanged events.
Interface to application preferences.
Base class for any auto segmentation tool that provides a preview of the new segmentation.