Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qMRMLDisplayNodeWidget.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 __qMRMLDisplayNodeWidget_h
22 #define __qMRMLDisplayNodeWidget_h
23 
24 // Qt includes
25 #include <QWidget>
26 
27 // CTK includes
28 #include <ctkVTKObject.h>
29 
30 // qMRML includes
31 #include "qMRMLWidgetsExport.h"
32 
33 class qMRMLDisplayNodeWidgetPrivate;
34 class vtkMRMLNode;
35 class vtkMRMLDisplayNode;
36 
37 class QMRML_WIDGETS_EXPORT qMRMLDisplayNodeWidget : public QWidget
38 {
39  Q_OBJECT
40  QVTK_OBJECT
41 public:
42  qMRMLDisplayNodeWidget(QWidget *parent=0);
43  virtual ~qMRMLDisplayNodeWidget();
44 
45  vtkMRMLDisplayNode* mrmlDisplayNode()const;
46 
47  bool visibility()const;
48  bool selected()const;
49  bool clipping()const;
50  bool sliceIntersectionVisible()const;
51  int sliceIntersectionThickness()const;
52  double sliceIntersectionOpacity()const;
53 
54 public slots:
56  void setMRMLDisplayNode(vtkMRMLDisplayNode *node);
58  void setMRMLDisplayNode(vtkMRMLNode *node);
61  void setMRMLDisplayableNode(vtkMRMLNode* displayableNode);
62 
63  void setVisibility(bool);
64  void setSelected(bool);
65  void setClipping(bool);
66  void setSliceIntersectionVisible(bool);
67  void setSliceIntersectionThickness(int);
68  void setSliceIntersectionOpacity(double);
69 
73  void setVisibilityVisible(bool);
74  void setSelectedVisible(bool);
75  void setClippingVisible(bool);
76  void setSliceIntersectionVisibleVisible(bool);
77  void setSliceIntersectionThicknessVisible(bool);
78  void setSliceIntersectionOpacityVisible(bool);
79 
80 protected slots:
81  void updateWidgetFromMRML();
82  void updateNodeFromProperty();
83 
84 protected:
85  QScopedPointer<qMRMLDisplayNodeWidgetPrivate> d_ptr;
86 
87 private:
88  Q_DECLARE_PRIVATE(qMRMLDisplayNodeWidget);
89  Q_DISABLE_COPY(qMRMLDisplayNodeWidget);
90 };
91 
92 #endif
QScopedPointer< qMRMLDisplayNodeWidgetPrivate > d_ptr
Abstract class that contains graphical display properties for displayable nodes.
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:135