Slicer  4.11
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
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 
15 class vtkMRMLNode;
18 class qSlicerScalarVolumeDisplayWidgetPrivate;
19 
21 class 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 )
28 public:
31  explicit qSlicerScalarVolumeDisplayWidget(QWidget* parent);
33 
34  vtkMRMLScalarVolumeNode* volumeNode()const;
35  vtkMRMLScalarVolumeDisplayNode* volumeDisplayNode()const;
36 
37  bool isColorTableComboBoxEnabled()const;
38  void setColorTableComboBoxEnabled(bool);
39 
40  bool isMRMLWindowLevelWidgetEnabled()const;
41  void setMRMLWindowLevelWidgetEnabled(bool);
42 
43 public 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 
54 protected slots:
55  void updateWidgetFromMRML();
56  void updateHistogram();
57  void onPresetButtonClicked();
58  void onLockWindowLevelButtonClicked();
59  void onHistogramSectionExpanded(bool);
60 
61 protected:
62  void showEvent(QShowEvent * event) override;
63 protected:
64  QScopedPointer<qSlicerScalarVolumeDisplayWidgetPrivate> d_ptr;
65 
66 private:
67  Q_DECLARE_PRIVATE(qSlicerScalarVolumeDisplayWidget);
68  Q_DISABLE_COPY(qSlicerScalarVolumeDisplayWidget);
69 };
70 
71 #endif
MRML node for representing a volume (image stack).
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
MRML node for representing a volume display attributes.