Slicer  4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerVolumeRenderingSettingsPanel.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Program: 3D Slicer
4 
5  Copyright (c) Kitware Inc.
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  This file was originally developed by Julien Finet, Kitware Inc.
17  and was partially funded by NIH grant 3P41RR013218-12S1
18 
19 ==============================================================================*/
20 
21 #ifndef __qSlicerVolumeRenderingSettingsPanel_h
22 #define __qSlicerVolumeRenderingSettingsPanel_h
23 
24 // CTK includes
25 #include <ctkVTKObject.h>
26 #include <ctkSettingsPanel.h>
27 
28 // VolumeRendering includes
29 #include "qSlicerVolumeRenderingModuleExport.h"
30 class qSlicerVolumeRenderingSettingsPanelPrivate;
32 
33 class Q_SLICER_QTMODULES_VOLUMERENDERING_EXPORT qSlicerVolumeRenderingSettingsPanel
34  : public ctkSettingsPanel
35 {
36  Q_OBJECT
37  QVTK_OBJECT
38  Q_PROPERTY(QString defaultRenderingMethod READ defaultRenderingMethod WRITE setDefaultRenderingMethod NOTIFY defaultRenderingMethodChanged)
39  Q_PROPERTY(QString defaultQuality READ defaultQuality WRITE setDefaultQuality NOTIFY defaultQualityChanged)
40  Q_PROPERTY(int defaultInteractiveSpeed READ defaultInteractiveSpeed WRITE setDefaultInteractiveSpeed NOTIFY defaultInteractiveSpeedChanged)
41  Q_PROPERTY(bool defaultSurfaceSmoothing READ defaultSurfaceSmoothing WRITE setDefaultSurfaceSmoothing NOTIFY defaultSurfaceSmoothingChanged)
42  Q_PROPERTY(QString gpuMemory READ gpuMemory WRITE setGPUMemory NOTIFY gpuMemoryChanged)
43 
44 public:
46  typedef ctkSettingsPanel Superclass;
47 
49  explicit qSlicerVolumeRenderingSettingsPanel(QWidget* parent = 0);
50 
53 
56  void setVolumeRenderingLogic(vtkSlicerVolumeRenderingLogic* logic);
57  vtkSlicerVolumeRenderingLogic* volumeRenderingLogic()const;
58 
59  QString defaultRenderingMethod()const;
60  QString defaultQuality()const;
61  int defaultInteractiveSpeed()const;
62  bool defaultSurfaceSmoothing()const;
63  QString gpuMemory()const;
64 
65 public slots:
66  void setDefaultRenderingMethod(const QString& method);
67  void setDefaultQuality(const QString& quality);
68  void setDefaultInteractiveSpeed(int interactiveSpeed);
69  void setDefaultSurfaceSmoothing(bool surfaceSmoothing);
70  void setGPUMemory(const QString& gpuMemory);
71 
72 signals:
73  void defaultRenderingMethodChanged(const QString&);
74  void defaultQualityChanged(const QString&);
75  void defaultInteractiveSpeedChanged(int);
76  void defaultSurfaceSmoothingChanged(bool);
77  void gpuMemoryChanged(QString);
78 
79 protected slots:
80  void onVolumeRenderingLogicModified();
81  void onDefaultRenderingMethodChanged(int);
82  void updateVolumeRenderingLogicDefaultRenderingMethod();
83  void onDefaultQualityChanged(int);
84  void onDefaultInteractiveSpeedChanged(double);
85  void onDefaultSurfaceSmoothingChanged(bool);
86  void onGPUMemoryChanged();
87  void updateDefaultViewNodeFromWidget();
88 
89 protected:
90  QScopedPointer<qSlicerVolumeRenderingSettingsPanelPrivate> d_ptr;
91 
92 private:
93  Q_DECLARE_PRIVATE(qSlicerVolumeRenderingSettingsPanel);
95 };
96 
97 #endif
ctkSettingsPanel Superclass
Superclass typedef.