Slicer  4.11
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qMRMLModelDisplayNodeWidget.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 this 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 __qMRMLModelDisplayNodeWidget_h
22 #define __qMRMLModelDisplayNodeWidget_h
23 
24 // MRMLWidgets includes
25 #include "qMRMLWidget.h"
27 
28 // CTK includes
29 #include <ctkVTKObject.h>
30 
31 // qMRML includes
32 #include "qSlicerModelsModuleWidgetsExport.h"
33 
34 class qMRMLModelDisplayNodeWidgetPrivate;
35 class vtkMRMLColorNode;
36 class vtkMRMLDisplayNode;
38 class vtkMRMLNode;
39 
40 class Q_SLICER_QTMODULES_MODELS_WIDGETS_EXPORT qMRMLModelDisplayNodeWidget : public qMRMLWidget
41 {
42  Q_OBJECT
43  QVTK_OBJECT
44 
45  Q_PROPERTY(bool clippingConfigurationButtonVisible READ clippingConfigurationButtonVisible WRITE setClippingConfigurationButtonVisible)
46 
47 public:
49  qMRMLModelDisplayNodeWidget(QWidget* parent = nullptr);
50  ~qMRMLModelDisplayNodeWidget() override;
51 
53  vtkMRMLModelDisplayNode* mrmlModelDisplayNode()const;
55  vtkMRMLDisplayNode* mrmlDisplayNode()const;
57  vtkIdType currentSubjectHierarchyItemID()const;
59  QList<vtkIdType> currentSubjectHierarchyItemIDs()const;
60 
61  bool visibility()const;
62  bool clipping()const;
63  bool sliceIntersectionVisible()const;
64  int sliceIntersectionThickness()const;
65  double sliceIntersectionOpacity()const;
66  bool clippingConfigurationButtonVisible()const;
67 
68 signals:
70  void scalarRangeModeValueChanged(vtkMRMLDisplayNode::ScalarRangeFlagType value);
72  void displayNodeChanged();
74  void clippingToggled(bool);
76  void clippingConfigurationButtonClicked();
77 
78 public slots:
80  void setMRMLModelDisplayNode(vtkMRMLModelDisplayNode* node);
82  void setMRMLModelDisplayNode(vtkMRMLNode* node);
84  void setMRMLDisplayNode(vtkMRMLDisplayNode* displayNode);
88  void setCurrentSubjectHierarchyItemID(vtkIdType currentItemID);
94  void setCurrentSubjectHierarchyItemIDs(QList<vtkIdType> currentItemIDs);
95 
96  void setVisibility(bool);
97  void setClipping(bool);
98 
99  void setSliceIntersectionVisible(bool);
100  void setSliceDisplayMode(int);
101  void setSliceIntersectionThickness(int);
102  void setSliceIntersectionOpacity(double);
103  void setDistanceToColorNode(vtkMRMLNode*);
104 
105  void setRepresentation(int);
106  void setPointSize(double);
107  void setLineWidth(double);
108  void setShowFaces(int);
109  void setColor(const QColor&);
110  void setBackfaceHueOffset(double newOffset);
111  void setBackfaceSaturationOffset(double newOffset);
112  void setBackfaceBrightnessOffset(double newOffset);
113 
114  void setOpacity(double);
115  void setEdgeVisibility(bool);
116  void setEdgeColor(const QColor&);
117  void setLighting(bool);
118  void setInterpolation(int);
119 
121  void setClippingConfigurationButtonVisible(bool);
122 
123 protected slots:
124  void updateWidgetFromMRML();
125  void updateDisplayNodesFromProperty();
126 
127 protected:
128  QScopedPointer<qMRMLModelDisplayNodeWidgetPrivate> d_ptr;
129 
130 private:
131  Q_DECLARE_PRIVATE(qMRMLModelDisplayNodeWidget);
132  Q_DISABLE_COPY(qMRMLModelDisplayNodeWidget);
133 };
134 
135 #endif
MRML node to represent a display property of 3D surface model.
Base class for any widget that requires a MRML Scene.
Definition: qMRMLWidget.h:35
Abstract MRML node to represent color information.
Abstract class that contains graphical display properties for displayable nodes.
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
QScopedPointer< qMRMLModelDisplayNodeWidgetPrivate > d_ptr