Slicer  5.0
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qMRMLVolumeWidget.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Program: 3D Slicer
4 
5  Copyright (c) Kitware Inc.
6 
7  See COPYRIGHT.txt
8  or http://www.slicer.org/copyright/copyright.txt for details.
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 
16  This file was originally developed by Julien Finet, Kitware Inc.
17  and was partially funded by NIH grant 3P41RR013218-12S1
18 
19 ==============================================================================*/
20 
21 #ifndef __qMRMLVolumeWidget_h
22 #define __qMRMLVolumeWidget_h
23 
24 // Qt includes
25 #include <QWidget>
26 
27 // CTK includes
28 #include <ctkVTKObject.h>
29 #include "qMRMLWidgetsExport.h"
30 
31 class vtkMRMLNode;
34 class qMRMLVolumeWidgetPrivate;
35 
38 class QMRML_WIDGETS_EXPORT qMRMLVolumeWidget : public QWidget
39 {
40  Q_OBJECT
41  QVTK_OBJECT
42 
43 public:
45  typedef QWidget Superclass;
46  explicit qMRMLVolumeWidget(QWidget* parentWidget = nullptr);
47  ~qMRMLVolumeWidget() override;
48 
51  Q_INVOKABLE vtkMRMLScalarVolumeNode* mrmlVolumeNode()const;
52 
53 public slots:
55  void setMRMLVolumeNode(vtkMRMLScalarVolumeNode* displayNode);
56 
59  void setMRMLVolumeNode(vtkMRMLNode* node);
60 
61 protected slots:
67  virtual void updateWidgetFromMRMLVolumeNode();
68 
73  virtual void updateWidgetFromMRMLDisplayNode();
74 
75 protected:
76  QScopedPointer<qMRMLVolumeWidgetPrivate> d_ptr;
77  qMRMLVolumeWidget(qMRMLVolumeWidgetPrivate* ptr,
78  QWidget* parentWidget = nullptr);
79 
81  vtkMRMLScalarVolumeDisplayNode* mrmlDisplayNode()const;
82 
83 private:
84  Q_DECLARE_PRIVATE(qMRMLVolumeWidget);
85  Q_DISABLE_COPY(qMRMLVolumeWidget);
86 
88  void setMRMLVolumeDisplayNode(vtkMRMLScalarVolumeDisplayNode* displayNode);
89 };
90 
91 #endif
Abstract widget to represent and control the properties of a scalar volume node.
QScopedPointer< qMRMLVolumeWidgetPrivate > d_ptr
QWidget Superclass
Constructors.
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.