Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
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 : public QWidget
43{
44 Q_OBJECT
45 QVTK_OBJECT
46 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., bool dontMoveFirstAndLast = false);
74 void spreadAllPoints(double factor, bool dontSpreadFirstAndLast = false);
75
77 void setChartsExtent(double extent[2]);
78 void setChartsExtent(double min, double max);
79
81 int componentCount() const;
83 void setComponentCount(int component);
86
87signals:
88 void thresholdChanged(bool enabled);
91 void componentChanged(int component);
92
93protected slots:
95
96protected:
97 QScopedPointer<qMRMLVolumePropertyNodeWidgetPrivate> d_ptr;
98
99private:
100 Q_DECLARE_PRIVATE(qMRMLVolumePropertyNodeWidget);
101 Q_DISABLE_COPY(qMRMLVolumePropertyNodeWidget);
102};
103
104#endif
void setThreshold(bool enable)
void setComponentCount(int component)
Set the number of components that can be edited in the widget.
void thresholdChanged(bool enabled)
qMRMLVolumePropertyNodeWidget(QWidget *parent=nullptr)
vtkVolumeProperty * volumeProperty() const
void chartsExtent(double extent[4]) const
void updateIndependentComponents()
Set if independent components are enabled.
void moveAllPoints(double x, double y=0., bool dontMoveFirstAndLast=false)
void spreadAllPoints(double factor, bool dontSpreadFirstAndLast=false)
void setChartsExtent(double extent[2])
Set chart extent.
QScopedPointer< qMRMLVolumePropertyNodeWidgetPrivate > d_ptr
void componentChanged(int component)
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...