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
qMRMLWindowLevelWidget.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 __qMRMLWindowLevelWidget_h
19#define __qMRMLWindowLevelWidget_h
20
21// Qt includes
22
23// CTK includes
24#include "qMRMLVolumeWidget.h"
25class qMRMLWindowLevelWidgetPrivate;
26
27class QMRML_WIDGETS_EXPORT qMRMLWindowLevelWidget
28 : public qMRMLVolumeWidget
29{
30 Q_OBJECT
31
33 Q_PROPERTY(double window READ window WRITE setWindow)
34 Q_PROPERTY(double level READ level WRITE setLevel)
35 Q_PROPERTY(double minimumValue READ minimumValue WRITE setMinimumValue)
36 Q_PROPERTY(double maximumValue READ maximumValue WRITE setMaximumValue)
37 Q_PROPERTY(double minimumBound READ minimumBound WRITE setMinimumBound)
38 Q_PROPERTY(double maximumBound READ maximumBound WRITE setMaximumBound)
39 Q_ENUMS(ControlMode)
40
41public:
44 explicit qMRMLWindowLevelWidget(QWidget* parentWidget = nullptr);
46
48 {
49 Auto = 0,
50 Manual = 1,
52 };
53
57
60 double window()const;
61
64 double level()const;
65
68 double minimumValue()const;
69
72 double maximumValue()const;
73
76 double minimumBound()const;
77
80 double maximumBound()const;
81
82signals:
89
90public slots:
93
96 void setWindow(double window);
97
100 void setLevel(double level);
101
104 void setWindowLevel(double window, double level);
105
108 void setMinMaxRangeValue(double min, double max);
109 void setMinimumValue(double min);
110 void setMaximumValue(double max);
111
112 void setMinimumBound(double min);
113 void setMaximumBound(double max);
114 void setMinMaxBounds(double min, double max);
115
116protected:
119
122
123private:
124 Q_DECLARE_PRIVATE(qMRMLWindowLevelWidget);
125 Q_DISABLE_COPY(qMRMLWindowLevelWidget);
126};
127
128#endif
qMRMLVolumeWidget(QWidget *parentWidget=nullptr)
void updateWidgetFromMRMLDisplayNode() override
Update the widget from volume display node properties.
double minimumValue() const
Get minimum of the range.
void setMinimumBound(double min)
void setWindowLevel(double window, double level)
Set window/level in once.
double level() const
Get level.
void setMaximumValue(double max)
qMRMLVolumeWidget Superclass
Constructors.
void setMinMaxRangeValue(double min, double max)
Set min/max range.
void setMaximumBound(double max)
void autoWindowLevelValueChanged(ControlMode value)
Signal sent if the auto/manual value is updated.
double minimumBound() const
Get minimum of the range.
void updateWidgetFromMRMLVolumeNode() override
Special initial updates that are done only when switching between volumes.
void setAutoWindowLevel(int autoWindowLevel)
Set Auto/Manual mode.
double maximumBound() const
Get maximum of the range.
void setLevel(double level)
Set level.
void windowLevelValuesChanged(double window, double level)
Signal sent if the window/level value is updated.
void setWindow(double window)
Set window.
ControlMode autoWindowLevel() const
void setMinimumValue(double min)
void setAutoWindowLevel(ControlMode autoWindowLevel)
Set Auto/Manual mode.
void setMinMaxBounds(double min, double max)
double maximumValue() const
Get maximum of the range.
qMRMLWindowLevelWidget(QWidget *parentWidget=nullptr)
double window() const
Get window.