qSlicerScalarVolumeDisplayWidget.h 1.45 KB
Newer Older
alexy's avatar
alexy committed
1
2
3
#ifndef __qSlicerScalarVolumeDisplayWidget_h
#define __qSlicerScalarVolumeDisplayWidget_h

4
// Qt includes
alexy's avatar
alexy committed
5
6
#include <QWidget>

7
8
9
10
11
// CTK includes
#include <ctkPimpl.h>
#include <ctkVTKObject.h>

// SlicerQt includes
alexy's avatar
alexy committed
12
13
14
15
16
#include <qSlicerWidget.h>

#include "qSlicerVolumesModuleExport.h"

class vtkMRMLNode;
17
class vtkMRMLScalarVolumeDisplayNode;
alexy's avatar
alexy committed
18
19
20
21
22
23
class vtkMRMLScalarVolumeNode;
class qSlicerScalarVolumeDisplayWidgetPrivate;

class Q_SLICER_QTMODULES_VOLUMES_EXPORT qSlicerScalarVolumeDisplayWidget : public qSlicerWidget
{
  Q_OBJECT
finetjul's avatar
BUG:    
finetjul committed
24
  QVTK_OBJECT
alexy's avatar
alexy committed
25
26
27
28
public:
  /// Constructors
  typedef qSlicerWidget Superclass;
  explicit qSlicerScalarVolumeDisplayWidget(QWidget* parent);
29
  virtual ~qSlicerScalarVolumeDisplayWidget();
alexy's avatar
alexy committed
30

31
32
  vtkMRMLScalarVolumeNode* volumeNode()const;
  vtkMRMLScalarVolumeDisplayNode* volumeDisplayNode()const;
alexy's avatar
alexy committed
33
34
35
36
37
38
39
public slots:

  /// 
  /// Set the MRML node of interest
  void setMRMLVolumeNode(vtkMRMLScalarVolumeNode* volumeNode);
  void setMRMLVolumeNode(vtkMRMLNode* node);

40
41
  void setInterpolate(bool interpolate);
  void setColorNode(vtkMRMLNode* colorNode);
42
  void setPreset(const QString& presetName);
alexy's avatar
alexy committed
43
44

protected slots:
45
46
  void updateWidgetFromMRML();
  void updateTransferFunction();
47
  void onPresetButtonClicked();
alexy's avatar
alexy committed
48
49

protected:
50
  void showEvent(QShowEvent * event);
51
52
53
protected:
  QScopedPointer<qSlicerScalarVolumeDisplayWidgetPrivate> d_ptr;

alexy's avatar
alexy committed
54
private:
55
56
  Q_DECLARE_PRIVATE(qSlicerScalarVolumeDisplayWidget);
  Q_DISABLE_COPY(qSlicerScalarVolumeDisplayWidget);
alexy's avatar
alexy committed
57
58
59
};

#endif