Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
qSlicerVolumeRenderingPresetComboBox.h
Go to the documentation of this file.
1/*==============================================================================
2
3 Copyright (c) Laboratory for Percutaneous Surgery (PerkLab)
4 Queen's University, Kingston, ON, Canada. All Rights Reserved.
5
6 See COPYRIGHT.txt
7 or http://www.slicer.org/copyright/copyright.txt for details.
8
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14
15 This file was originally developed by Csaba Pinter, PerkLab, Queen's University
16 and was supported through CANARIE's Research Software Program, and Cancer
17 Care Ontario.
18
19==============================================================================*/
20
21#ifndef __qSlicerVolumeRenderingPresetComboBox_h
22#define __qSlicerVolumeRenderingPresetComboBox_h
23
24// Slicer includes
25#include "qSlicerWidget.h"
26#include "qSlicerVolumeRenderingModuleWidgetsExport.h"
27
28// qSlicerVolumeRendering includes
30
31class vtkMRMLNode;
33class qSlicerVolumeRenderingPresetComboBoxPrivate;
34
35class Q_SLICER_MODULE_VOLUMERENDERING_WIDGETS_EXPORT qSlicerVolumeRenderingPresetComboBox
36 : public qSlicerWidget
37{
38 Q_OBJECT
39 Q_PROPERTY(bool showIcons READ showIcons WRITE setShowIcons)
40
41public:
44 explicit qSlicerVolumeRenderingPresetComboBox(QWidget* parent=nullptr);
46
49 Q_INVOKABLE vtkMRMLNode* currentNode()const;
52 Q_INVOKABLE QString currentNodeID()const;
53
57
58 bool showIcons()const;
59 void setShowIcons(bool show);
60
61public slots:
66 void setCurrentNodeID(const QString& nodeID);
67
71
73 void applyPreset(vtkMRMLNode* volumePropertyNode);
74
75signals:
77 void currentNodeIDChanged(const QString& id);
78
81 void presetOffsetChanged(double xOffset, double yOffset, bool dontMoveFirstAndLast);
82
83protected slots:
87
88 void offsetPreset(double newPosition);
90
91protected:
92 QScopedPointer<qSlicerVolumeRenderingPresetComboBoxPrivate> d_ptr;
93
94private:
95 Q_DECLARE_PRIVATE(qSlicerVolumeRenderingPresetComboBox);
97};
98
99#endif
Q_INVOKABLE vtkMRMLNode * currentNode() const
void offsetPreset(double newPosition)
void currentNodeChanged(vtkMRMLNode *node)
Q_INVOKABLE QString currentNodeID() const
Q_INVOKABLE vtkMRMLVolumePropertyNode * mrmlVolumePropertyNode() const
void setCurrentNode(vtkMRMLNode *node)
Set selected preset node in the combobox. Triggers update of the volume property node.
void currentNodeIDChanged(const QString &id)
void setCurrentNodeID(const QString &nodeID)
void applyPreset(vtkMRMLNode *volumePropertyNode)
QScopedPointer< qSlicerVolumeRenderingPresetComboBoxPrivate > d_ptr
void setMRMLVolumePropertyNode(vtkMRMLNode *node)
qSlicerVolumeRenderingPresetComboBox(QWidget *parent=nullptr)
void presetOffsetChanged(double xOffset, double yOffset, bool dontMoveFirstAndLast)
qSlicerWidget(QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags())
Abstract Superclass for all specific types of MRML nodes.
MRML node for representing a volume (image stack).
vtkMRMLVolumePropertyNode contains the transfer functions (scalar opacity, color and gradient opacity...