Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkExtractFromMultiLabelSegmentationWidget.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 QmitkExtractFromMultiLabelSegmentationWidget_h
14 #define QmitkExtractFromMultiLabelSegmentationWidget_h
15 
19 
20 #include <QWidget>
21 #include <memory>
22 #include <vector>
23 
24 namespace Ui
25 {
26  class QmitkExtractFromMultiLabelSegmentationWidgetControls;
27 }
28 
29 namespace mitk
30 {
31  class DataNode;
32  class DataStorage;
33  class Surface;
34  class Image;
35  class MultiLabelSegmentation;
36 }
37 
49 {
50  Q_OBJECT
51 
52 public:
53 
59  explicit QmitkExtractFromMultiLabelSegmentationWidget(mitk::DataStorage* dataStorage, QWidget* parent = nullptr);
60 
63 
64 signals:
66  void NewResultsReady(const QList<mitk::DataNode::Pointer>& nodes);
67 
68 private slots:
69 
71  void OnSegSelectionChanged(QmitkAbstractNodeSelectionWidget::NodeList /*nodes*/);
72 
74  void OnExtractPressed();
75 
77  void OnRemoveResultPressed();
78 
79 private:
80  bool m_InternalEvent = false;
82  std::vector<mitk::WeakPointer<mitk::DataNode>> m_LastResultNodes;
83 
84  void ConfigureWidgets();
85 
86  mitk::DataNode::Pointer StoreToDataStorage(mitk::Image* image, const std::string& name, mitk::DataNode* parent);
87 
89  void UpdateRemoveResultButton();
90 
91  std::unique_ptr<Ui::QmitkExtractFromMultiLabelSegmentationWidgetControls> m_Controls;
92 };
93 
94 #endif
#define MITKSEGMENTATIONUI_EXPORT
QList< mitk::DataNode::Pointer > NodeList
Widget for extracting images from multi-label segmentations.
QmitkExtractFromMultiLabelSegmentationWidget(mitk::DataStorage *dataStorage, QWidget *parent=nullptr)
Constructs the widget with GUI elements and signal/slot connections.
~QmitkExtractFromMultiLabelSegmentationWidget() override
Destructor.
void NewResultsReady(const QList< mitk::DataNode::Pointer > &nodes)
Emitted after extraction result node(s) were added to the data storage.
Central node class of the MITK data tree, associating a data object with properties and mappers.
Definition: mitkDataNode.h:72
Abstract data management class that organizes DataNode objects in a directed acyclic graph.
Image class for storing multi-dimensional medical image data.
Definition: mitkImage.h:76
class ITK_EXPORT Image
Find image slices visible on a given plane.