Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
QmitkMorphologicalOperationsWidget.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 QmitkMorphologicalOperationsWidget_h
14 #define QmitkMorphologicalOperationsWidget_h
15 
17 
19 #include <mitkRenderingManager.h>
20 
22 
23 #include <QWidget>
24 
25 namespace Ui
26 {
27  class QmitkMorphologicalOperationsWidgetControls;
28 }
29 
30 namespace mitk
31 {
32  class DataNode;
33  class DataStorage;
34 }
35 
39 {
40  Q_OBJECT
41 
42 public:
43  explicit QmitkMorphologicalOperationsWidget(mitk::DataStorage* dataStorage, QWidget* parent = nullptr);
45 
46 public slots:
54 
55 protected:
57 
58  using MorphFunctionType = void(mitk::Image::Pointer& image, int factor,
60  void Processing(std::function<MorphFunctionType> morphFunction, const std::string& opsName) const;
61 
62 private:
63  mitk::Image::Pointer GetSelectedLabelMask() const;
64  void SaveResultLabelMask(const mitk::Image* resultMask, const std::string& labelName) const;
65 
66  mitk::MorphologicalOperations::StructuralElementType CreateStructerElement_UI() const;
67 
68  Ui::QmitkMorphologicalOperationsWidgetControls* m_Controls;
69 };
70 
71 #endif
#define MITKSEGMENTATIONUI_EXPORT
QList< mitk::DataNode::Pointer > NodeList
GUI class for morphological segmentation tools.
void OnSelectionChanged(QmitkAbstractNodeSelectionWidget::NodeList nodes)
void(mitk::Image::Pointer &image, int factor, mitk::MorphologicalOperations::StructuralElementType structuralElement) MorphFunctionType
QmitkMorphologicalOperationsWidget(mitk::DataStorage *dataStorage, QWidget *parent=nullptr)
void Processing(std::function< MorphFunctionType > morphFunction, const std::string &opsName) const
Data management class that handles 'was created by' relations.
Image class for storing images.
Definition: mitkImage.h:70
Find image slices visible on a given plane.