Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
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 : public qMRMLVolumeWidget
28{
29 Q_OBJECT
30
32 Q_PROPERTY(double window READ window WRITE setWindow)
33 Q_PROPERTY(double level READ level WRITE setLevel)
34 Q_PROPERTY(double minimumValue READ minimumValue WRITE setMinimumValue)
35 Q_PROPERTY(double maximumValue READ maximumValue WRITE setMaximumValue)
36 Q_PROPERTY(double minimumBound READ minimumBound WRITE setMinimumBound)
37 Q_PROPERTY(double maximumBound READ maximumBound WRITE setMaximumBound)
38 Q_ENUMS(ControlMode)
39
40public:
43 explicit qMRMLWindowLevelWidget(QWidget* parentWidget = nullptr);
45
47 {
48 Auto = 0,
49 Manual = 1,
51 };
52
56
59 double window() const;
60
63 double level() const;
64
67 double minimumValue() const;
68
71 double maximumValue() const;
72
75 double minimumBound() const;
76
79 double maximumBound() const;
80
81signals:
88
89public slots:
92
95 void setWindow(double window);
96
99 void setLevel(double level);
100
103 void setWindowLevel(double window, double level);
104
107 void setMinMaxRangeValue(double min, double max);
108 void setMinimumValue(double min);
109 void setMaximumValue(double max);
110
111 void setMinimumBound(double min);
112 void setMaximumBound(double max);
113 void setMinMaxBounds(double min, double max);
114
115protected:
118
121
122private:
123 Q_DECLARE_PRIVATE(qMRMLWindowLevelWidget);
124 Q_DISABLE_COPY(qMRMLWindowLevelWidget);
125};
126
127#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.