Slicer  5.1
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=nullptr);
43  ~qMRMLDisplayNodeWidget() override;
44 
45  vtkMRMLDisplayNode* mrmlDisplayNode()const;
46 
47  bool visibility()const;
48  bool selected()const;
49  bool clipping()const;
50  bool threeDVisible()const;
51  bool sliceIntersectionVisible()const;
52  int sliceIntersectionThickness()const;
53  double sliceIntersectionOpacity()const;
54 
55 public slots:
57  void setMRMLDisplayNode(vtkMRMLDisplayNode *node);
59  void setMRMLDisplayNode(vtkMRMLNode *node);
62  void setMRMLDisplayableNode(vtkMRMLNode* displayableNode);
63 
64  void setVisibility(bool);
65  void setSelected(bool);
66  void setClipping(bool);
67  void setThreeDVisible(bool);
68  void setSliceIntersectionVisible(bool);
69  void setSliceIntersectionThickness(int);
70  void setSliceIntersectionOpacity(double);
71 
75  void setVisibilityVisible(bool);
76  void setSelectedVisible(bool);
77  void setClippingVisible(bool);
78  void setThreeDVisibleVisible(bool);
79  void setSliceIntersectionVisibleVisible(bool);
80  void setSliceIntersectionThicknessVisible(bool);
81  void setSliceIntersectionOpacityVisible(bool);
82 
83 protected slots:
84  void updateWidgetFromMRML();
85  void updateNodeFromProperty();
86 
87 protected:
88  QScopedPointer<qMRMLDisplayNodeWidgetPrivate> d_ptr;
89 
90 private:
91  Q_DECLARE_PRIVATE(qMRMLDisplayNodeWidget);
92  Q_DISABLE_COPY(qMRMLDisplayNodeWidget);
93 };
94 
95 #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:167