CTK 0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
Loading...
Searching...
No Matches
ctkVTKThresholdWidget.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Library: CTK
4
5 Copyright (c) Kitware Inc.
6
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
10
11 http://www.apache.org/licenses/LICENSE-2.0.txt
12
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18
19=========================================================================*/
20
21#ifndef __ctkVTKThresholdWidget_h
22#define __ctkVTKThresholdWidget_h
23
24//Qt includes
25#include <QWidget>
26
27// CTK includes
28#include <ctkVTKObject.h>
29#include "ctkVisualizationVTKWidgetsExport.h"
30class ctkVTKThresholdWidgetPrivate;
31
32// VTK includes
33class vtkPiecewiseFunction;
34
36class CTK_VISUALIZATION_VTK_WIDGETS_EXPORT ctkVTKThresholdWidget
37 : public QWidget
38{
39 Q_OBJECT
43 Q_PROPERTY(double opacity READ opacity WRITE setOpacity DESIGNABLE false)
46 Q_PROPERTY(bool useSharpness READ useSharpness WRITE setUseSharpness)
47public:
48 ctkVTKThresholdWidget(QWidget* parent = 0);
50
51 vtkPiecewiseFunction* piecewiseFunction()const;
52
53 void range(double* range)const;
54 void thresholdValues(double* values)const;
55 double opacity()const;
56
57 bool useSharpness()const;
58 void setUseSharpness(bool use);
59
60public Q_SLOTS:
61 void setPiecewiseFunction(vtkPiecewiseFunction* function);
62 void setRange(double min, double max);
63 void setThresholdValues(double min, double max);
64 void setOpacity(double opacity);
65
66protected Q_SLOTS:
68
69protected:
70 QScopedPointer<ctkVTKThresholdWidgetPrivate> d_ptr;
71
72private:
73 Q_DECLARE_PRIVATE(ctkVTKThresholdWidget);
74 Q_DISABLE_COPY(ctkVTKThresholdWidget);
75};
76
77#endif
void updateFromPiecewiseFunction()
void range(double *range) const
bool useSharpness() const
void setPiecewiseFunction(vtkPiecewiseFunction *function)
double opacity() const
void setOpacity(double opacity)
void setThresholdValues(double min, double max)
virtual ~ctkVTKThresholdWidget()
void setRange(double min, double max)
void thresholdValues(double *values) const
vtkPiecewiseFunction * piecewiseFunction() const
QScopedPointer< ctkVTKThresholdWidgetPrivate > d_ptr
ctkVTKThresholdWidget(QWidget *parent=0)
void setUseSharpness(bool use)
#define QVTK_OBJECT
Define VTK/Qt event/slot connection utility methods. It is a convenient macro that declares and defin...
Definition: ctkVTKObject.h:222