Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkConvertToMultiLabelSegmentationWidget.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 QmitkConvertToMultiLabelSegmentationWidget_h
14 #define QmitkConvertToMultiLabelSegmentationWidget_h
15 
19 
20 #include <QWidget>
21 #include <memory>
22 #include <vector>
23 
24 namespace Ui
25 {
26  class QmitkConvertToMultiLabelSegmentationWidgetControls;
27 }
28 
29 namespace mitk
30 {
31  class DataNode;
32  class DataStorage;
33  class Surface;
34  class Image;
35  class MultiLabelSegmentation;
36 }
37 
48 {
49  Q_OBJECT
50 
51 public:
52 
58  explicit QmitkConvertToMultiLabelSegmentationWidget(mitk::DataStorage* dataStorage, QWidget* parent = nullptr);
59 
62 
63 signals:
65  void NewResultsReady(const QList<mitk::DataNode::Pointer>& nodes);
66 
67 private slots:
68 
70  void OnInputSelectionChanged(QmitkAbstractNodeSelectionWidget::NodeList /*nodes*/);
71 
72  void OnOutputSelectionChanged(QmitkAbstractNodeSelectionWidget::NodeList /*nodes*/);
73 
74  void OnRefSelectionChanged(QmitkAbstractNodeSelectionWidget::NodeList /*nodes*/);
75 
76 
78  void OnConvertPressed();
79 
81  void OnRemoveResultPressed();
82 
83 private:
84  void ConvertNodes(const QmitkNodeSelectionDialog::NodeList& nodes);
85 
86  bool m_InternalEvent = false;
88  std::vector<mitk::WeakPointer<mitk::DataNode>> m_LastResultNodes;
89 
91  void ConfigureWidgets();
92 
94  void UpdateRemoveResultButton();
95 
96  std::unique_ptr<Ui::QmitkConvertToMultiLabelSegmentationWidgetControls> m_Controls;
97 };
98 
99 #endif
#define MITKSEGMENTATIONUI_EXPORT
QList< mitk::DataNode::Pointer > NodeList
Widget for converting images, surfaces, and contour models into multi-label segmentations.
void NewResultsReady(const QList< mitk::DataNode::Pointer > &nodes)
Emitted after new segmentation result node(s) were added to the data storage.
QmitkConvertToMultiLabelSegmentationWidget(mitk::DataStorage *dataStorage, QWidget *parent=nullptr)
Constructs the widget with GUI elements and signal/slot connections.
~QmitkConvertToMultiLabelSegmentationWidget() override
Destructor.
QList< mitk::DataNode::Pointer > NodeList
Abstract data management class that organizes DataNode objects in a directed acyclic graph.
class ITK_EXPORT Image
Find image slices visible on a given plane.