Slicer 5.8
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
20class Q_SLICER_QTMODULES_VOLUMES_WIDGETS_EXPORT qSlicerScalarVolumeDisplayWidget
21 : public qSlicerWidget
22{
23 Q_OBJECT
24 QVTK_OBJECT
25 Q_PROPERTY(bool enableColorTableComboBox READ isColorTableComboBoxEnabled WRITE setColorTableComboBoxEnabled )
26 Q_PROPERTY(bool enableMRMLWindowLevelWidget READ isMRMLWindowLevelWidgetEnabled WRITE setMRMLWindowLevelWidgetEnabled )
27public:
30 explicit qSlicerScalarVolumeDisplayWidget(QWidget* parent);
32
33 Q_INVOKABLE vtkMRMLScalarVolumeNode* volumeNode()const;
34 Q_INVOKABLE vtkMRMLScalarVolumeDisplayNode* volumeDisplayNode()const;
35
36 bool isColorTableComboBoxEnabled()const;
37 void setColorTableComboBoxEnabled(bool);
38
39 bool isMRMLWindowLevelWidgetEnabled()const;
40 void setMRMLWindowLevelWidgetEnabled(bool);
41
42public slots:
43
46 void setMRMLVolumeNode(vtkMRMLScalarVolumeNode* volumeNode);
47 void setMRMLVolumeNode(vtkMRMLNode* node);
48
49 void setInterpolate(bool interpolate);
50 void setColorNode(vtkMRMLNode* colorNode);
51 void setPreset(const QString& presetName);
52
53protected slots:
54 void updateWidgetFromMRML();
55 void updateHistogram();
56 void onPresetButtonClicked();
57 void onHistogramSectionExpanded(bool);
58
59protected:
60 void showEvent(QShowEvent * event) override;
61protected:
62 QScopedPointer<qSlicerScalarVolumeDisplayWidgetPrivate> d_ptr;
63
64private:
65 Q_DECLARE_PRIVATE(qSlicerScalarVolumeDisplayWidget);
67};
68
69#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).