Slicer  5.0
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qMRMLMarkupsDisplayNodeWidget.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 ==============================================================================*/
17 
18 #ifndef __qMRMLMarkupsDisplayNodeWidget_h
19 #define __qMRMLMarkupsDisplayNodeWidget_h
20 
21 // MRMLWidgets includes
22 #include "qMRMLWidget.h"
24 
25 // CTK includes
26 #include <ctkVTKObject.h>
27 
28 // qMRML includes
29 #include "qSlicerMarkupsModuleWidgetsExport.h"
30 
31 class qMRMLMarkupsDisplayNodeWidgetPrivate;
32 class vtkMRMLScene;
33 class vtkMRMLNode;
35 class vtkMRMLMarkupsNode;
37 
38 class Q_SLICER_MODULE_MARKUPS_WIDGETS_EXPORT qMRMLMarkupsDisplayNodeWidget : public qMRMLWidget
39 {
40  Q_OBJECT
41  QVTK_OBJECT
42 
43 public:
45  qMRMLMarkupsDisplayNodeWidget(QWidget *parent=nullptr);
47 
48  vtkMRMLMarkupsDisplayNode* mrmlMarkupsDisplayNode()const;
49 
50  bool visibility()const;
51 
52  bool glyphSizeIsAbsolute()const;
53  bool curveLineSizeIsAbsolute()const;
54 
55  bool propertiesLabelVisibility()const;
56  bool pointLabelsVisibility()const;
57 
58 signals:
60  void displayNodeChanged();
62  void scalarRangeModeValueChanged(vtkMRMLDisplayNode::ScalarRangeFlagType value);
63 
64 public slots:
66  void setMRMLMarkupsDisplayNode(vtkMRMLMarkupsDisplayNode *node);
68  void setMRMLMarkupsDisplayNode(vtkMRMLNode *node);
69 
72  void setMRMLMarkupsNode(vtkMRMLMarkupsNode* node);
74  void setMRMLMarkupsNode(vtkMRMLNode* node);
75 
76  void setVisibility(bool);
77 
78  void setGlyphSizeIsAbsolute(bool absolute);
79  void setCurveLineSizeIsAbsolute(bool absolute);
80 
81  void setPropertiesLabelVisibility(bool visible);
82  void setPointLabelsVisibility(bool visible);
83 
84  void setMaximumMarkupsScale(double maxScale);
85  void setMaximumMarkupsSize(double maxScale);
86 
87  void setFillVisibility(bool visibility);
88  void setOutlineVisibility(bool visibility);
89  void onFillOpacitySliderWidgetChanged(double opacity);
90  void onOutlineOpacitySliderWidgetChanged(double opacity);
91  void setOccludedVisibility(bool visibility);
92  void setOccludedOpacity(double OccludedOpacity);
93 
94 protected slots:
95  void updateWidgetFromMRML();
96  vtkMRMLSelectionNode* getSelectionNode(vtkMRMLScene *mrmlScene);
97 
98  void onSelectedColorPickerButtonChanged(QColor qcolor);
99  void onUnselectedColorPickerButtonChanged(QColor qcolor);
100  void onActiveColorPickerButtonChanged(QColor qcolor);
101  void onGlyphTypeComboBoxChanged(QString value);
102  void onGlyphScaleSliderWidgetChanged(double value);
103  void onGlyphSizeSliderWidgetChanged(double value);
104  void onCurveLineThicknessSliderWidgetChanged(double percentValue);
105  void onCurveLineDiameterSliderWidgetChanged(double value);
106  void onTextScaleSliderWidgetChanged(double value);
107  void onOpacitySliderWidgetChanged(double value);
108  void onSnapModeWidgetChanged();
109  void onTextPropertyWidgetsChanged();
110 
111  void onInteractionCheckBoxChanged(int state);
112 
113 protected:
114  QScopedPointer<qMRMLMarkupsDisplayNodeWidgetPrivate> d_ptr;
115 
116 private:
117  Q_DECLARE_PRIVATE(qMRMLMarkupsDisplayNodeWidget);
118  Q_DISABLE_COPY(qMRMLMarkupsDisplayNodeWidget);
119 };
120 
121 #endif
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 Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
MRML node for storing information about the active nodes in the scene.
QScopedPointer< qMRMLMarkupsDisplayNodeWidgetPrivate > d_ptr