Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
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"
25 class qMRMLWindowLevelWidgetPrivate;
26 
27 class QMRML_WIDGETS_EXPORT qMRMLWindowLevelWidget
28  : public qMRMLVolumeWidget
29 {
30  Q_OBJECT
31 
32  Q_PROPERTY(ControlMode autoWindowLevel READ autoWindowLevel WRITE setAutoWindowLevel)
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_ENUMS(ControlMode)
38 
39 public:
42  explicit qMRMLWindowLevelWidget(QWidget* parentWidget = 0);
43  virtual ~qMRMLWindowLevelWidget();
44 
46  {
47  Auto = 0,
48  Manual = 1,
49  ManualMinMax =2
50  };
51 
53  void setAutoWindowLevel(ControlMode autoWindowLevel);
54  ControlMode autoWindowLevel() const;
55 
58  double window()const;
59 
62  double level()const;
63 
66  double minimumValue()const;
67 
70  double maximumValue()const;
71 
72 signals:
75  void windowLevelValuesChanged(double window, double level);
78  void autoWindowLevelValueChanged(ControlMode value);
79 
80 public slots:
82  void setAutoWindowLevel(int autoWindowLevel);
83 
86  void setWindow(double window);
87 
90  void setLevel(double level);
91 
94  void setWindowLevel(double window, double level);
95 
98  void setMinMaxRangeValue(double min, double max);
99  void setMinimumValue(double min);
100  void setMaximumValue(double max);
101 
102 protected:
104  virtual void updateWidgetFromMRMLDisplayNode();
105 
106 private:
107  Q_DECLARE_PRIVATE(qMRMLWindowLevelWidget);
108  Q_DISABLE_COPY(qMRMLWindowLevelWidget);
109 };
110 
111 #endif
Abstract widget to represent and control the properties of a scalar volume node.
QWidget Superclass
Constructors.
virtual void updateWidgetFromMRMLDisplayNode()