Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkBooleanOperationsWidget.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 QmitkBooleanOperationsWidget_h
14 #define QmitkBooleanOperationsWidget_h
15 
16 #include <mitkLabelSetImage.h>
17 
19 
20 #include <QWidget>
21 
23 #include <memory>
24 
25 namespace Ui
26 {
27  class QmitkBooleanOperationsWidgetControls;
28 }
29 
30 namespace mitk
31 {
32  class DataNode;
33  class DataStorage;
34 }
35 
46 {
47  Q_OBJECT
48 
49 public:
55  explicit QmitkBooleanOperationsWidget(mitk::DataStorage* dataStorage, QWidget* parent = nullptr);
56 
59 
60 private slots:
61  void OnSegSelectionChanged(QmitkAbstractNodeSelectionWidget::NodeList nodes);
62  void OnLabelSelectionChanged(mitk::MultiLabelSegmentation::LabelValueVectorType labels);
63  void OnDifferenceButtonClicked();
64  void OnIntersectionButtonClicked();
65  void OnUnionButtonClicked();
66 
67 private:
68  void ConfigureWidgets();
76  void SaveResultLabelMask(
77  const mitk::Image* resultMask, const std::string& labelName, const std::string& provenanceOpName) const;
78 
79 
80  std::unique_ptr<Ui::QmitkBooleanOperationsWidgetControls> m_Controls;
81 };
82 
83 #endif
#define MITKSEGMENTATIONUI_EXPORT
QList< mitk::DataNode::Pointer > NodeList
Widget providing boolean operations (difference, intersection, union) on multi-label segmentation lab...
QmitkBooleanOperationsWidget(mitk::DataStorage *dataStorage, QWidget *parent=nullptr)
Constructs the boolean operations widget.
~QmitkBooleanOperationsWidget() override
Destructor.
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
std::vector< LabelValueType > LabelValueVectorType
Find image slices visible on a given plane.