Slicer
5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
Libs
MRML
Widgets
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
"
23
class
qMRMLVolumeThresholdWidgetPrivate;
24
25
class
QMRML_WIDGETS_EXPORT
qMRMLVolumeThresholdWidget
:
public
qMRMLVolumeWidget
26
{
27
Q_OBJECT
28
Q_PROPERTY(
int
autoThreshold
READ
autoThreshold
WRITE
setAutoThreshold
)
29
Q_PROPERTY(
double
lowerThreshold
READ
lowerThreshold
WRITE
setLowerThreshold
)
30
Q_PROPERTY(
double
upperThreshold
READ
upperThreshold
WRITE
setUpperThreshold
)
31
Q_PROPERTY(
double
lowerThresholdBound
READ
lowerThresholdBound
WRITE
setLowerThresholdBound
)
32
Q_PROPERTY(
double
upperThresholdBound
READ
upperThresholdBound
WRITE
setUpperThresholdBound
)
33
Q_ENUMS(
ControlMode
)
34
35
public:
37
typedef
qMRMLVolumeWidget
Superclass
;
38
explicit
qMRMLVolumeThresholdWidget
(QWidget* parent =
nullptr
);
39
~
qMRMLVolumeThresholdWidget
() override;
40
41
enum
ControlMode
42
{
43
Auto
= 0,
44
Manual
= 1,
45
Off
= 2
46
};
47
48
ControlMode
autoThreshold
()
const
;
49
void
setAutoThreshold
(
ControlMode
autoWindowLevel);
50
52
bool
isOff
()
const
;
53
56
double
lowerThreshold
()
const
;
57
60
double
upperThreshold
()
const
;
61
64
double
lowerThresholdBound
()
const
;
65
68
double
upperThresholdBound
()
const
;
69
70
signals:
73
void
thresholdValuesChanged
(
double
lowerThreshold
,
double
upperThreshold
);
76
void
autoThresholdValueChanged
(
int
value);
77
78
public
slots:
80
void
setAutoThreshold
(
int
autoThreshold
);
81
84
void
setLowerThreshold
(
double
lowerThreshold
);
85
88
void
setUpperThreshold
(
double
upperThreshold
);
89
92
void
setLowerThresholdBound
(
double
lowerThresholdBound
);
93
96
void
setUpperThresholdBound
(
double
upperThresholdBound
);
97
100
void
setThreshold
(
double
lowerThreshold
,
double
upperThreshold
);
101
104
void
setThresholdBounds
(
double
min,
double
max);
105
106
protected
:
108
void
updateWidgetFromMRMLDisplayNode
()
override
;
109
112
void
setMinimum
(
double
min);
113
void
setMaximum
(
double
max);
114
115
private
:
116
Q_DECLARE_PRIVATE(
qMRMLVolumeThresholdWidget
);
117
Q_DISABLE_COPY(
qMRMLVolumeThresholdWidget
);
118
};
119
120
#endif
qMRMLVolumeThresholdWidget::Superclass
qMRMLVolumeWidget Superclass
Constructors.
Definition
qMRMLVolumeThresholdWidget.h:37
qMRMLVolumeThresholdWidget::setUpperThresholdBound
void setUpperThresholdBound(double upperThresholdBound)
Set upperThreshold.
qMRMLVolumeThresholdWidget::setAutoThreshold
void setAutoThreshold(ControlMode autoWindowLevel)
qMRMLVolumeThresholdWidget::setUpperThreshold
void setUpperThreshold(double upperThreshold)
Set upperThreshold.
qMRMLVolumeThresholdWidget::setLowerThresholdBound
void setLowerThresholdBound(double lowerThresholdBound)
Set lowerThreshold.
qMRMLVolumeThresholdWidget::upperThreshold
double upperThreshold
Definition
qMRMLVolumeThresholdWidget.h:30
qMRMLVolumeThresholdWidget::qMRMLVolumeThresholdWidget
qMRMLVolumeThresholdWidget(QWidget *parent=nullptr)
qMRMLVolumeThresholdWidget::lowerThreshold
double lowerThreshold
Definition
qMRMLVolumeThresholdWidget.h:29
qMRMLVolumeThresholdWidget::upperThreshold
double upperThreshold() const
Get upperThreshold.
qMRMLVolumeThresholdWidget::upperThresholdBound
double upperThresholdBound() const
Get upper threshold bound.
qMRMLVolumeThresholdWidget::setThresholdBounds
void setThresholdBounds(double min, double max)
Set sliders bounds.
qMRMLVolumeThresholdWidget::upperThresholdBound
double upperThresholdBound
Definition
qMRMLVolumeThresholdWidget.h:32
qMRMLVolumeThresholdWidget::autoThreshold
int autoThreshold
Definition
qMRMLVolumeThresholdWidget.h:28
qMRMLVolumeThresholdWidget::lowerThreshold
double lowerThreshold() const
Get lowerThreshold.
qMRMLVolumeThresholdWidget::isOff
bool isOff() const
Is the thresholding activated.
qMRMLVolumeThresholdWidget::thresholdValuesChanged
void thresholdValuesChanged(double lowerThreshold, double upperThreshold)
Signal sent if the lowerThreshold/upperThreshold value is updated.
qMRMLVolumeThresholdWidget::updateWidgetFromMRMLDisplayNode
void updateWidgetFromMRMLDisplayNode() override
Update the widget from volume display node properties.
qMRMLVolumeThresholdWidget::setAutoThreshold
void setAutoThreshold(int autoThreshold)
Set Auto/Manual mode.
qMRMLVolumeThresholdWidget::setMinimum
void setMinimum(double min)
Set sliders range.
qMRMLVolumeThresholdWidget::setLowerThreshold
void setLowerThreshold(double lowerThreshold)
Set lowerThreshold.
qMRMLVolumeThresholdWidget::setMaximum
void setMaximum(double max)
qMRMLVolumeThresholdWidget::lowerThresholdBound
double lowerThresholdBound() const
Get lower threshold bound.
qMRMLVolumeThresholdWidget::autoThreshold
ControlMode autoThreshold() const
qMRMLVolumeThresholdWidget::setThreshold
void setThreshold(double lowerThreshold, double upperThreshold)
Set lowerThreshold/upperThreshold in once.
qMRMLVolumeThresholdWidget::lowerThresholdBound
double lowerThresholdBound
Definition
qMRMLVolumeThresholdWidget.h:31
qMRMLVolumeThresholdWidget::autoThresholdValueChanged
void autoThresholdValueChanged(int value)
Signal sent if the auto/manual value is updated.
qMRMLVolumeThresholdWidget::ControlMode
ControlMode
Definition
qMRMLVolumeThresholdWidget.h:42
qMRMLVolumeThresholdWidget::Off
@ Off
Definition
qMRMLVolumeThresholdWidget.h:45
qMRMLVolumeThresholdWidget::Auto
@ Auto
Definition
qMRMLVolumeThresholdWidget.h:43
qMRMLVolumeThresholdWidget::Manual
@ Manual
Definition
qMRMLVolumeThresholdWidget.h:44
qMRMLVolumeWidget::qMRMLVolumeWidget
qMRMLVolumeWidget(QWidget *parentWidget=nullptr)
qMRMLVolumeWidget.h
Generated on Fri Aug 29 2025 19:01:40 for Slicer by
1.13.0