Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
qMRMLVolumeThresholdWidget.h
Go to the documentation of this file.
1/*==============================================================================
2
3 Program: 3D Slicer
4
5 Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH) All Rights Reserved.
6
7 See COPYRIGHT.txt
8 or http://www.slicer.org/copyright/copyright.txt for details.
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15
16==============================================================================*/
17
18#ifndef __qMRMLVolumeThresholdWidget_h
19#define __qMRMLVolumeThresholdWidget_h
20
22#include "qMRMLVolumeWidget.h"
23class qMRMLVolumeThresholdWidgetPrivate;
24
25class QMRML_WIDGETS_EXPORT qMRMLVolumeThresholdWidget
26 : public qMRMLVolumeWidget
27{
28 Q_OBJECT
29 Q_PROPERTY(int autoThreshold READ autoThreshold WRITE setAutoThreshold)
30 Q_PROPERTY(double lowerThreshold READ lowerThreshold WRITE setLowerThreshold)
31 Q_PROPERTY(double upperThreshold READ upperThreshold WRITE setUpperThreshold)
34 Q_ENUMS(ControlMode)
35
36public:
39 explicit qMRMLVolumeThresholdWidget(QWidget* parent=nullptr);
41
43 {
44 Auto = 0,
45 Manual = 1,
46 Off =2
47 };
48
50 void setAutoThreshold(ControlMode autoWindowLevel);
51
53 bool isOff()const;
54
57 double lowerThreshold()const;
58
61 double upperThreshold()const;
62
65 double lowerThresholdBound()const;
66
69 double upperThresholdBound()const;
70
71signals:
78
79public slots:
82
86
90
94
98
102
105 void setThresholdBounds(double min, double max);
106
107protected:
110
113 void setMinimum(double min);
114 void setMaximum(double max);
115
116private:
117 Q_DECLARE_PRIVATE(qMRMLVolumeThresholdWidget);
118 Q_DISABLE_COPY(qMRMLVolumeThresholdWidget);
119};
120
121#endif
qMRMLVolumeWidget Superclass
Constructors.
void setUpperThresholdBound(double upperThresholdBound)
Set upperThreshold.
void setAutoThreshold(ControlMode autoWindowLevel)
void setUpperThreshold(double upperThreshold)
Set upperThreshold.
void setLowerThresholdBound(double lowerThresholdBound)
Set lowerThreshold.
qMRMLVolumeThresholdWidget(QWidget *parent=nullptr)
double upperThreshold() const
Get upperThreshold.
double upperThresholdBound() const
Get upper threshold bound.
void setThresholdBounds(double min, double max)
Set sliders bounds.
double lowerThreshold() const
Get lowerThreshold.
bool isOff() const
Is the thresholding activated.
void thresholdValuesChanged(double lowerThreshold, double upperThreshold)
Signal sent if the lowerThreshold/upperThreshold value is updated.
void updateWidgetFromMRMLDisplayNode() override
Update the widget from volume display node properties.
void setAutoThreshold(int autoThreshold)
Set Auto/Manual mode.
void setMinimum(double min)
Set sliders range.
void setLowerThreshold(double lowerThreshold)
Set lowerThreshold.
void setMaximum(double max)
double lowerThresholdBound() const
Get lower threshold bound.
ControlMode autoThreshold() const
void setThreshold(double lowerThreshold, double upperThreshold)
Set lowerThreshold/upperThreshold in once.
void autoThresholdValueChanged(int value)
Signal sent if the auto/manual value is updated.
qMRMLVolumeWidget(QWidget *parentWidget=nullptr)