Slicer 5.4
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
qSlicerScalarVolumeDisplayWidget.h
Go to the documentation of this file.
1#ifndef __qSlicerScalarVolumeDisplayWidget_h
2#define __qSlicerScalarVolumeDisplayWidget_h
3
4// Qt includes
5#include <QWidget>
6
7// CTK includes
8#include <ctkVTKObject.h>
9
10// Slicer includes
11#include <qSlicerWidget.h>
12
13#include "qSlicerVolumesModuleWidgetsExport.h"
14
15class vtkMRMLNode;
18class qSlicerScalarVolumeDisplayWidgetPrivate;
19
21class Q_SLICER_QTMODULES_VOLUMES_WIDGETS_EXPORT qSlicerScalarVolumeDisplayWidget
22 : public qSlicerWidget
23{
24 Q_OBJECT
25 QVTK_OBJECT
26 Q_PROPERTY(bool enableColorTableComboBox READ isColorTableComboBoxEnabled WRITE setColorTableComboBoxEnabled )
27 Q_PROPERTY(bool enableMRMLWindowLevelWidget READ isMRMLWindowLevelWidgetEnabled WRITE setMRMLWindowLevelWidgetEnabled )
28public:
31 explicit qSlicerScalarVolumeDisplayWidget(QWidget* parent);
33
34 Q_INVOKABLE vtkMRMLScalarVolumeNode* volumeNode()const;
35 Q_INVOKABLE vtkMRMLScalarVolumeDisplayNode* volumeDisplayNode()const;
36
37 bool isColorTableComboBoxEnabled()const;
38 void setColorTableComboBoxEnabled(bool);
39
40 bool isMRMLWindowLevelWidgetEnabled()const;
41 void setMRMLWindowLevelWidgetEnabled(bool);
42
43public slots:
44
47 void setMRMLVolumeNode(vtkMRMLScalarVolumeNode* volumeNode);
48 void setMRMLVolumeNode(vtkMRMLNode* node);
49
50 void setInterpolate(bool interpolate);
51 void setColorNode(vtkMRMLNode* colorNode);
52 void setPreset(const QString& presetName);
53
54protected slots:
55 void updateWidgetFromMRML();
56 void updateHistogram();
57 void onPresetButtonClicked();
58 void onHistogramSectionExpanded(bool);
59
60protected:
61 void showEvent(QShowEvent * event) override;
62protected:
63 QScopedPointer<qSlicerScalarVolumeDisplayWidgetPrivate> d_ptr;
64
65private:
66 Q_DECLARE_PRIVATE(qSlicerScalarVolumeDisplayWidget);
68};
69
70#endif
Abstract Superclass for all specific types of MRML nodes.
MRML node for representing a volume display attributes.
MRML node for representing a volume (image stack).