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
qMRMLScalarsDisplayWidget.h
Go to the documentation of this file.
1
2/*==============================================================================
3
4 Program: 3D Slicer
5
6 Portions (c) Copyright 2020 Brigham and Women's Hospital (BWH) All Rights Reserved.
7
8 See COPYRIGHT.txt
9 or http://www.slicer.org/copyright/copyright.txt for details.
10
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16
17==============================================================================*/
18
19#ifndef __qMRMLScalarsDisplayWidget_h
20#define __qMRMLScalarsDisplayWidget_h
21
22// MRMLWidgets includes
23#include "qMRMLWidget.h"
24
25// MRML includes
26#include "vtkMRMLDisplayNode.h"
27
28// CTK includes
29#include <ctkVTKObject.h>
30
31class qMRMLScalarsDisplayWidgetPrivate;
33class vtkMRMLNode;
34
35class QMRML_WIDGETS_EXPORT qMRMLScalarsDisplayWidget : public qMRMLWidget
36{
37 Q_OBJECT
38 QVTK_OBJECT
39
41
42public:
45 explicit qMRMLScalarsDisplayWidget(QWidget* parentWidget = nullptr);
47
53
54 bool scalarsVisibility()const;
55 QString activeScalarName()const;
57
61
63 double minimumValue()const;
64
66 double maximumValue()const;
67
68signals:
73
74public slots:
84
86 void setActiveScalarName(const QString&);
89 void setScalarsDisplayRange(double min, double max);
90 void setTresholdEnabled(bool b);
91 void setThresholdRange(double min, double max);
92
95
97 void setMinimumValue(double min);
98 void setMaximumValue(double max);
99
100protected slots:
103
106
107protected:
108 QScopedPointer<qMRMLScalarsDisplayWidgetPrivate> d_ptr;
109
110private:
111 Q_DECLARE_PRIVATE(qMRMLScalarsDisplayWidget);
112 Q_DISABLE_COPY(qMRMLScalarsDisplayWidget);
115};
116
117#endif
void setThresholdRange(double min, double max)
void setMRMLDisplayNodes(QList< vtkMRMLDisplayNode * > displayNodes)
qMRMLScalarsDisplayWidget(QWidget *parentWidget=nullptr)
void setMRMLDisplayNode(vtkMRMLNode *node)
Utility function to be connected with generic signals.
void setScalarRangeMode(vtkMRMLDisplayNode::ScalarRangeFlagType mode)
Set scalar range mode.
void displayNodeChanged()
Signal sent if the any property in the display node is changed.
void scalarRangeModeValueChanged(vtkMRMLDisplayNode::ScalarRangeFlagType mode)
Signal sent if the auto/manual value is updated.
QScopedPointer< qMRMLScalarsDisplayWidgetPrivate > d_ptr
void setMinimumValue(double min)
Set min/max of scalar range.
void setMRMLDisplayNode(vtkMRMLDisplayNode *node)
Set the one display node.
QList< vtkMRMLDisplayNode * > mrmlDisplayNodes() const
void setActiveScalarName(const QString &)
void setScalarRangeMode(int scalarRangeMode)
Set Auto/Manual mode.
bool scalarsVisibility() const
void setMaximumValue(double max)
vtkMRMLColorNode * scalarsColorNode() const
QString activeScalarName() const
vtkMRMLDisplayNode * mrmlDisplayNode() const
Get the (first) current display node.
void onCurrentArrayActivated()
Set active scalar when the user changes selection.
void setScalarsDisplayRange(double min, double max)
~qMRMLScalarsDisplayWidget() override
void setTresholdEnabled(bool b)
vtkMRMLDisplayNode::ScalarRangeFlagType scalarRangeMode() const
void setScalarsColorNode(vtkMRMLColorNode *)
double maximumValue() const
Get maximum of the scalar display range.
QVTK_OBJECTvtkMRMLDisplayNode::ScalarRangeFlagType scalarRangeMode
void setScalarsColorNode(vtkMRMLNode *)
double minimumValue() const
Get minimum of the scalar display range.
void updateWidgetFromMRML()
Update the widget from volume display node properties.
qMRMLWidget Superclass
Constructors.
qMRMLWidget(QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags())
Abstract MRML node to represent color information.
Abstract class that contains graphical display properties for displayable nodes.
Abstract Superclass for all specific types of MRML nodes.