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
ctkVTKVolumePropertyWidget.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 __ctkVTKVolumePropertyWidget_h
22#define __ctkVTKVolumePropertyWidget_h
23
24//Qt includes
25#include <QWidget>
26
27// CTK includes
28#include <ctkVTKObject.h>
29#include "ctkVisualizationVTKWidgetsExport.h"
30class ctkVTKVolumePropertyWidgetPrivate;
31
32// VTK includes
33class vtkVolumeProperty;
34
36class CTK_VISUALIZATION_VTK_WIDGETS_EXPORT ctkVTKVolumePropertyWidget
37 : public QWidget
38{
39 Q_OBJECT
44 Q_PROPERTY(bool thresholdEnabled READ isThresholdEnabled WRITE setThresholdEnabled NOTIFY thresholdEnabledChanged)
45
46
49 Q_PROPERTY(bool thresholdToggleVisibility READ isThresholdToggleVisible WRITE setThresholdToggleVisible)
50
51public:
52 ctkVTKVolumePropertyWidget(QWidget* parent = 0);
54
55 vtkVolumeProperty* volumeProperty()const;
56
57 bool isThresholdEnabled()const;
58
60 void setThresholdToggleVisible(bool showToggle);
61
62 void chartsBounds(double bounds[4])const;
63 Q_INVOKABLE QList<double> chartsBounds()const;
64 void chartsExtent(double extent[4])const;
65 Q_INVOKABLE QList<double> chartsExtent()const;
66
67public Q_SLOTS:
68 void setVolumeProperty(vtkVolumeProperty* volumeProperty);
69
73 void moveAllPoints(double xOffset, double yOffset = 0.,
74 bool dontSpreadFirstAndLast = false);
75
81 void spreadAllPoints(double factor = 1.,
82 bool dontSpreadFirstAndLast = false);
83
84 void setThresholdEnabled(bool enable);
85
87 void setChartsExtent(double extent[2]);
88 void setChartsExtent(double min, double max);
89
90Q_SIGNALS:
91 void thresholdEnabledChanged(bool enable);
93
94protected Q_SLOTS:
97
98 void setInterpolationMode(int mode);
99 void setShade(bool);
100 void setAmbient(double value);
101 void setDiffuse(double value);
102 void setSpecular(double value);
103 void setSpecularPower(double value);
104
109
110protected:
111 QScopedPointer<ctkVTKVolumePropertyWidgetPrivate> d_ptr;
112
113private:
114 Q_DECLARE_PRIVATE(ctkVTKVolumePropertyWidget);
115 Q_DISABLE_COPY(ctkVTKVolumePropertyWidget);
116};
117
118#endif
void setAmbient(double value)
void setInterpolationMode(int mode)
void onThresholdOpacityToggled(bool)
QScopedPointer< ctkVTKVolumePropertyWidgetPrivate > d_ptr
void setThresholdEnabled(bool enable)
vtkVolumeProperty * volumeProperty() const
Q_INVOKABLE QList< double > chartsBounds() const
bool isThresholdEnabled() const
void thresholdEnabledChanged(bool enable)
ctkVTKVolumePropertyWidget(QWidget *parent=0)
virtual ~ctkVTKVolumePropertyWidget()
void spreadAllPoints(double factor=1., bool dontSpreadFirstAndLast=false)
void setThresholdToggleVisible(bool showToggle)
void chartsExtent(double extent[4]) const
void setSpecularPower(double value)
void setVolumeProperty(vtkVolumeProperty *volumeProperty)
void setChartsExtent(double extent[2])
Set chart extent.
void chartsBounds(double bounds[4]) const
void setDiffuse(double value)
void setSpecular(double value)
bool isThresholdToggleVisible() const
Q_INVOKABLE QList< double > chartsExtent() const
void setChartsExtent(double min, double max)
void moveAllPoints(double xOffset, double yOffset=0., bool dontSpreadFirstAndLast=false)
#define QVTK_OBJECT
Define VTK/Qt event/slot connection utility methods. It is a convenient macro that declares and defin...