Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkToFCompositeFilterWidget.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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef _QMITKTOFCOMPOSITEFILTERWIDGET_H_INCLUDED
18 #define _QMITKTOFCOMPOSITEFILTERWIDGET_H_INCLUDED
19 
20 #include <MitkToFUIExports.h>
21 #include "ui_QmitkToFCompositeFilterWidgetControls.h"
22 
23 //mitk headers
24 #include <mitkToFCompositeFilter.h>
25 
34 class MITKTOFUI_EXPORT QmitkToFCompositeFilterWidget :public QWidget
35 {
36  //this is needed for all Qt objects that should have a MOC object (everything that derives from QObject)
37  Q_OBJECT
38 
39  public:
40 
41  static const std::string VIEW_ID;
42 
43  QmitkToFCompositeFilterWidget(QWidget* p = 0, Qt::WindowFlags f1 = 0);
45 
46  /* @brief This method is part of the widget an needs not to be called seperately. */
47  virtual void CreateQtPartControl(QWidget *parent);
48  /* @brief This method is part of the widget an needs not to be called seperately. (Creation of the connections of main and control widget.)*/
49  virtual void CreateConnections();
50 
55  void SetToFCompositeFilter(mitk::ToFCompositeFilter* toFCompositeFilter);
60  mitk::ToFCompositeFilter* GetToFCompositeFilter();
64  void UpdateFilterParameter();
68  void SetWidgetConfiguration(bool threshold, bool mask, bool tempMedian, bool tempAverage, bool median, bool bilateral );
75  void SetStandardParametersBilateralFilter(double domainSigma, double rangeSigma, int kernelRadius=0);
81  void SetStandardParametersThresholdFilter(int min, int max);
85  void SetStandardParameterTemporalAveraging(int nImages);
86 
87  void SetDataStorage(mitk::DataStorage::Pointer dataStorage);
88 
89 signals:
90 
91  protected slots:
96  void OnShowAdvancedOptionsCheckboxChecked(bool checked);
100  void OnTemporalMedianFilterCheckBoxChecked(bool checked);
104  void OnAverageFilterCheckBoxChecked(bool checked);
108  void OnThresholdFilterCheckBoxChecked(bool checked);
112  void OnMaskSegmentationCheckBoxChecked(bool checked);
116  void OnMedianFilterCheckBoxChecked(bool checked);
120  void OnBilateralFilterCheckBoxChecked(bool checked);
121 
125  void OnSpanChanged(int lower, int upper);
129  void OnResetThresholdFilterRangeSlider();
133  void OnTemporalMedianFilterNumOfFramesSpinBoxValueChanged(int value);
137  void OnBilateralFilterDomainSigmaSpinBoxValueChanged(double value);
141  void OnBilateralFilterRangeSigmaSpinBoxValueChanged(double value);
145  void OnBilateralFilterKernelRadiusSpinBoxValueChanged(int value);
149  void OnThresholdFilterMinValueChanged(int value);
153  void OnThresholdFilterMaxValueChanged(int value);
154 
155  protected:
156 
157  Ui::QmitkToFCompositeFilterWidgetControls* m_Controls;
158 
160 
161  private:
162 
166  void SetBilateralFilterParameter();
170  void SetThresholdFilterParameter();
171 
173 };
174 
175 #endif // _QMITKTOFCOMPOSITEFILTERWIDGET_H_INCLUDED
Widget for controlling the ToFCompositeFilter (located in module ToFProcessing)
Ui::QmitkToFCompositeFilterWidgetControls * m_Controls
member holding the UI elements of this widget
mitk::ToFCompositeFilter::Pointer m_ToFCompositeFilter
member holding the internally used ToFCompositeFilter
mitk::DataStorage::Pointer m_DataStorage
static T max(T x, T y)
Definition: svm.cpp:70
static T min(T x, T y)
Definition: svm.cpp:67
Applies a common filter-pipeline to the first input of this filter.