NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
niftkBaseApplicationPreferencePage.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef niftkBaseApplicationPreferencePage_h
16 #define niftkBaseApplicationPreferencePage_h
17 
18 #include <uk_ac_ucl_cmic_commonapps_Export.h>
19 #include <berryIQtPreferencePage.h>
20 #include <berryIPreferences.h>
21 
22 class QCheckBox;
23 class QComboBox;
24 class QDoubleSpinBox;
25 class QRadioButton;
26 class QSpinBox;
27 class QWidget;
28 
29 namespace niftk
30 {
31 
38 class COMMONAPPS_EXPORT BaseApplicationPreferencePage : public QObject, public berry::IQtPreferencePage
39 {
40  Q_OBJECT
41  Q_INTERFACES(berry::IPreferencePage)
42 
43 public:
44 
48 
49  static const QString IMAGE_RESLICE_INTERPOLATION;
50  static const QString IMAGE_TEXTURE_INTERPOLATION;
51  static const QString LOWEST_VALUE_OPACITY;
52  static const QString HIGHEST_VALUE_OPACITY;
53  static const QString BINARY_OPACITY_NAME;
54  static const double BINARY_OPACITY_VALUE;
55 
56  void Init(berry::IWorkbench::Pointer workbench) override;
57 
58  void CreateQtControl(QWidget* widget) override;
59 
60  QWidget* GetQtControl() const override;
61 
63  virtual bool PerformOk() override;
64 
66  virtual void PerformCancel() override;
67 
69  virtual void Update() override;
70 
71 private slots:
72 
73  void UpdateSpinBoxes();
74 
75 protected:
76 
77  QWidget* m_MainControl;
78 
79 private:
80 
81  QComboBox* m_ResliceInterpolation;
82  QComboBox* m_TextureInterpolation;
83  QDoubleSpinBox* m_LowestValueOpacity;
84  QDoubleSpinBox* m_HighestValueOpacity;
85  QDoubleSpinBox* m_BinaryOpacity;
86  QRadioButton* m_UseMidasInitialisationRadioButton;
87  QRadioButton* m_UseLevelWindowRadioButton;
88  QRadioButton* m_UseImageDataRadioButton;
89  QDoubleSpinBox* m_PercentageOfDataRangeDoubleSpinBox;
90  QRadioButton* m_UseSetRange;
91  QSpinBox* m_RangeLowerBound;
92  QSpinBox* m_RangeUpperBound;
93  bool m_Initializing;
94 
95  berry::IPreferences::Pointer m_PreferencesNode;
96 
97 };
98 
99 }
100 
101 #endif
Preferences page for this plugin, providing application wide defaults.
Definition: niftkBaseApplicationPreferencePage.h:38
static const QString IMAGE_RESLICE_INTERPOLATION
Definition: niftkBaseApplicationPreferencePage.h:49
QWidget * m_MainControl
Definition: niftkBaseApplicationPreferencePage.h:77
static const QString HIGHEST_VALUE_OPACITY
Definition: niftkBaseApplicationPreferencePage.h:52
static const QString BINARY_OPACITY_NAME
Definition: niftkBaseApplicationPreferencePage.h:53
static const QString LOWEST_VALUE_OPACITY
Definition: niftkBaseApplicationPreferencePage.h:51
static const double BINARY_OPACITY_VALUE
Definition: niftkBaseApplicationPreferencePage.h:54
static const QString IMAGE_TEXTURE_INTERPOLATION
Definition: niftkBaseApplicationPreferencePage.h:50
Definition: niftkExceptionObject.h:21