Slicer  5.0
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 setMRMLScene(vtkMRMLScene* newScene) override;
82  void setMRMLModelDisplayNode(vtkMRMLModelDisplayNode* node);
84  void setMRMLModelDisplayNode(vtkMRMLNode* node);
86  void setMRMLDisplayNode(vtkMRMLDisplayNode* displayNode);
90  void setCurrentSubjectHierarchyItemID(vtkIdType currentItemID);
96  void setCurrentSubjectHierarchyItemIDs(QList<vtkIdType> currentItemIDs);
97 
98  void setVisibility(bool);
99  void setClipping(bool);
100 
101  void setSliceIntersectionVisible(bool);
102  void setSliceDisplayMode(int);
103  void setSliceIntersectionThickness(int);
104  void setSliceIntersectionOpacity(double);
105  void setDistanceToColorNode(vtkMRMLNode*);
106 
107  void setRepresentation(int);
108  void setPointSize(double);
109  void setLineWidth(double);
110  void setShowFaces(int);
111  void setColor(const QColor&);
112  void setBackfaceHueOffset(double newOffset);
113  void setBackfaceSaturationOffset(double newOffset);
114  void setBackfaceBrightnessOffset(double newOffset);
115 
116  void setOpacity(double);
117  void setEdgeVisibility(bool);
118  void setEdgeColor(const QColor&);
119  void setLighting(bool);
120  void setInterpolation(int);
121 
123  void setClippingConfigurationButtonVisible(bool);
124 
125 protected slots:
126  void updateWidgetFromMRML();
127  void updateDisplayNodesFromProperty();
128 
129 protected:
130  QScopedPointer<qMRMLModelDisplayNodeWidgetPrivate> d_ptr;
131 
132 private:
133  Q_DECLARE_PRIVATE(qMRMLModelDisplayNodeWidget);
134  Q_DISABLE_COPY(qMRMLModelDisplayNodeWidget);
135 };
136 
137 #endif
MRML node to represent a display property of 3D surface model.
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:57
Base class for any widget that requires a MRML Scene.
Definition: qMRMLWidget.h:35
Abstract MRML node to represent color information.
virtual void setMRMLScene(vtkMRMLScene *newScene)
Set the MRML scene associated with the widget.
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