Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
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:
47  void OnClosingButtonClicked();
48  void OnOpeningButtonClicked();
49  void OnDilatationButtonClicked();
50  void OnErosionButtonClicked();
51  void OnFillHolesButtonClicked();
52  void OnSelectionChanged(QmitkAbstractNodeSelectionWidget::NodeList nodes);
53  void OnRadioButtonsClicked();
54 
55 protected:
56  void ConfigureButtons();
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
MITKSEGMENTATIONUI_EXPORT
#define MITKSEGMENTATIONUI_EXPORT
Definition: MitkSegmentationUIExports.h:15
mitk::MorphologicalOperations::StructuralElementType
StructuralElementType
Definition: mitkMorphologicalOperations.h:26
mitk::Image
Image class for storing images.
Definition: mitkImage.h:69
itk::SmartPointer< Self >
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitkMorphologicalOperations.h
Ui
Definition: BlueBerryExampleLauncherDialog.h:21
QmitkAbstractNodeSelectionWidget.h
mitk::DataStorage
Data management class that handles 'was created by' relations.
Definition: mitkDataStorage.h:43
QmitkAbstractNodeSelectionWidget::NodeList
QList< mitk::DataNode::Pointer > NodeList
Definition: QmitkAbstractNodeSelectionWidget.h:65
MitkSegmentationUIExports.h
QmitkMorphologicalOperationsWidget
GUI class for morphological segmentation tools.
Definition: QmitkMorphologicalOperationsWidget.h:38
mitkRenderingManager.h
QmitkMorphologicalOperationsWidget::MorphFunctionType
void(mitk::Image::Pointer &image, int factor, mitk::MorphologicalOperations::StructuralElementType structuralElement) MorphFunctionType
Definition: QmitkMorphologicalOperationsWidget.h:59