Slicer  5.1
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(bool defaultAutoReleaseGraphicsResources READ defaultAutoReleaseGraphicsResources \
43  WRITE setDefaultAutoReleaseGraphicsResources NOTIFY defaultAutoReleaseGraphicsResourcesChanged)
44  Q_PROPERTY(QString gpuMemory READ gpuMemory WRITE setGPUMemory NOTIFY gpuMemoryChanged)
45 
46 public:
48  typedef ctkSettingsPanel Superclass;
49 
51  explicit qSlicerVolumeRenderingSettingsPanel(QWidget* parent = nullptr);
52 
55 
58  void setVolumeRenderingLogic(vtkSlicerVolumeRenderingLogic* logic);
59  vtkSlicerVolumeRenderingLogic* volumeRenderingLogic()const;
60 
61  QString defaultRenderingMethod()const;
62  QString defaultQuality()const;
63  int defaultInteractiveSpeed()const;
64  bool defaultSurfaceSmoothing()const;
65  bool defaultAutoReleaseGraphicsResources()const;
66  QString gpuMemory()const;
67 
68 public slots:
69  void setDefaultRenderingMethod(const QString& method);
70  void setDefaultQuality(const QString& quality);
71  void setDefaultInteractiveSpeed(int interactiveSpeed);
72  void setDefaultSurfaceSmoothing(bool surfaceSmoothing);
73  void setDefaultAutoReleaseGraphicsResources(bool autoRelease);
74  void setGPUMemory(const QString& gpuMemory);
75 
76 signals:
77  void defaultRenderingMethodChanged(const QString&);
78  void defaultQualityChanged(const QString&);
79  void defaultInteractiveSpeedChanged(int);
80  void defaultSurfaceSmoothingChanged(bool);
81  void defaultAutoReleaseGraphicsResourcesChanged(bool);
82  void gpuMemoryChanged(QString);
83 
84 protected slots:
85  void onVolumeRenderingLogicModified();
86  void onDefaultRenderingMethodChanged(int);
87  void updateVolumeRenderingLogicDefaultRenderingMethod();
88  void onDefaultQualityChanged(int);
89  void onDefaultInteractiveSpeedChanged(double);
90  void onDefaultSurfaceSmoothingChanged(bool);
91  void onDefaultAutoReleaseGraphicsResourcesChanged(bool);
92  void onGPUMemoryChanged();
93  void updateDefaultViewNodeFromWidget();
94 
95 protected:
96  QScopedPointer<qSlicerVolumeRenderingSettingsPanelPrivate> d_ptr;
97 
98 private:
99  Q_DECLARE_PRIVATE(qSlicerVolumeRenderingSettingsPanel);
100  Q_DISABLE_COPY(qSlicerVolumeRenderingSettingsPanel);
101 };
102 
103 #endif
ctkSettingsPanel Superclass
Superclass typedef.