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
qMRMLVolumePropertyNodeWidget.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 __qMRMLVolumePropertyNodeWidget_h
22#define __qMRMLVolumePropertyNodeWidget_h
23
24// Qt includes
25#include <QWidget>
26
27// CTK includes
28#include <ctkVTKObject.h>
29
30// VolumeRendering includes
31#include "qSlicerVolumeRenderingModuleWidgetsExport.h"
32class qMRMLVolumePropertyNodeWidgetPrivate;
33
34// MRML includes
35class vtkMRMLNode;
37
38// VTK includes
39class vtkControlPointsItem;
40class vtkVolumeProperty;
41
42class Q_SLICER_MODULE_VOLUMERENDERING_WIDGETS_EXPORT qMRMLVolumePropertyNodeWidget
43 : public QWidget
44{
45 Q_OBJECT
46 QVTK_OBJECT
47 Q_PROPERTY(bool threshold READ hasThreshold WRITE setThreshold)
48
49public:
51 typedef QWidget Superclass;
52 explicit qMRMLVolumePropertyNodeWidget(QWidget* parent=nullptr);
54
57 vtkVolumeProperty* volumeProperty()const;
58
62 void chartsBounds(double bounds[4])const;
63 void chartsExtent(double extent[4])const;
64
65 void setThreshold(bool enable);
66 bool hasThreshold()const;
67
68public slots:
72
73 void moveAllPoints(double x, double y = 0.,
74 bool dontMoveFirstAndLast = false);
75 void spreadAllPoints(double factor,
76 bool dontSpreadFirstAndLast = false);
77
79 void setChartsExtent(double extent[2]);
80 void setChartsExtent(double min, double max);
81
82signals:
83 void thresholdChanged(bool enabled);
86
87protected slots:
89
90protected:
91 QScopedPointer<qMRMLVolumePropertyNodeWidgetPrivate> d_ptr;
92
93private:
94 Q_DECLARE_PRIVATE(qMRMLVolumePropertyNodeWidget);
95 Q_DISABLE_COPY(qMRMLVolumePropertyNodeWidget);
96};
97
98#endif
void setThreshold(bool enable)
void setChartsExtent(double min, double max)
void thresholdChanged(bool enabled)
qMRMLVolumePropertyNodeWidget(QWidget *parent=nullptr)
vtkVolumeProperty * volumeProperty() const
void chartsExtent(double extent[4]) const
void moveAllPoints(double x, double y=0., bool dontMoveFirstAndLast=false)
~qMRMLVolumePropertyNodeWidget() override
void spreadAllPoints(double factor, bool dontSpreadFirstAndLast=false)
void setMRMLVolumePropertyNode(vtkMRMLVolumePropertyNode *volumePropertyNode)
void setChartsExtent(double extent[2])
Set chart extent.
QScopedPointer< qMRMLVolumePropertyNodeWidgetPrivate > d_ptr
void setMRMLVolumePropertyNode(vtkMRMLNode *node)
Convenient function to connect with signal/slots.
void chartsBounds(double bounds[4]) const
Abstract Superclass for all specific types of MRML nodes.
vtkMRMLVolumePropertyNode contains the transfer functions (scalar opacity, color and gradient opacity...