Slicer  4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qMRMLSegmentationDisplayNodeWidget.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Program: 3D Slicer
4 
5  Copyright (c) Laboratory for Percutaneous Surgery (PerkLab)
6  Queen's University, Kingston, ON, Canada. All Rights Reserved.
7 
8  See COPYRIGHT.txt
9  or http://www.slicer.org/copyright/copyright.txt for details.
10 
11  Unless required by applicable law or agreed to in writing, software
12  distributed under the License is distributed on an "AS IS" BASIS,
13  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  See the License for the specific language governing permissions and
15  limitations under the License.
16 
17  This file was originally developed by Csaba Pinter, PerkLab, Queen's University
18  and was supported through the Applied Cancer Research Unit program of Cancer Care
19  Ontario with funds provided by the Ontario Ministry of Health and Long-Term Care
20 
21 ==============================================================================*/
22 
23 #ifndef __qMRMLSegmentationDisplayNodeWidget_h
24 #define __qMRMLSegmentationDisplayNodeWidget_h
25 
26 // MRMLWidgets includes
27 #include "qMRMLWidget.h"
28 
29 #include "qSlicerSegmentationsModuleWidgetsExport.h"
30 
31 // CTK includes
32 #include <ctkPimpl.h>
33 #include <ctkVTKObject.h>
34 
35 class qMRMLSegmentationDisplayNodeWidgetPrivate;
36 
39 class QItemSelection;
40 
44 class Q_SLICER_MODULE_SEGMENTATIONS_WIDGETS_EXPORT qMRMLSegmentationDisplayNodeWidget : public qMRMLWidget
45 {
46  Q_OBJECT
47  QVTK_OBJECT
48 
49 public:
51  explicit qMRMLSegmentationDisplayNodeWidget(QWidget* parent = 0);
54 
56  Q_INVOKABLE vtkMRMLSegmentationDisplayNode* segmentationDisplayNode() const;
58  Q_INVOKABLE QString segmentationDisplayNodeID();
59 
61  Q_INVOKABLE QString currentSegmentID();
62 
63 public slots:
65  Q_INVOKABLE void setSegmentationDisplayNode(vtkMRMLSegmentationDisplayNode* node);
67  Q_INVOKABLE void setSegmentationNode(vtkMRMLSegmentationNode* node);
68 
70  Q_INVOKABLE void setCurrentSegmentID(QString segmentID);
71 
73  void updateWidgetFromMRML();
74 
76  void populate3DRepresentationsCombobox();
78  void populate2DRepresentationsCombobox();
79 
80  void onVisibilityChanged(int);
81  void onVisibilitySliceFillChanged(int);
82  void onVisibilitySliceOutlineChanged(int);
83  void onVisibility3DChanged(int);
84  void onOpacitySliceFillChanged(double);
85  void onOpacitySliceOutlineChanged(double);
86  void onOpacity3DChanged(double);
87  void onSliceIntersectionThicknessChanged(int);
88  void onRepresentation3DChanged(int);
89  void onRepresentation2DChanged(int);
90  void onSegmentVisibilitySliceFillChanged(int);
91  void onSegmentVisibilitySliceOutlineChanged(int);
92  void onSegmentVisibility3DChanged(int);
93  void onSegmentOpacitySliceFillChanged(double);
94  void onSegmentOpacitySliceOutlineChanged(double);
95  void onSegmentOpacity3DChanged(double);
96 
98  void onSegmentSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
99 
100 protected:
102  void updateSelectedSegmentSection();
103 
104 protected:
105  QScopedPointer<qMRMLSegmentationDisplayNodeWidgetPrivate> d_ptr;
106 
107 private:
108  Q_DECLARE_PRIVATE(qMRMLSegmentationDisplayNodeWidget);
109  Q_DISABLE_COPY(qMRMLSegmentationDisplayNodeWidget);
110 };
111 
112 #endif
QScopedPointer< qMRMLSegmentationDisplayNodeWidgetPrivate > d_ptr
MRML node for representing segmentation display attributes.
Base class for any widget that requires a MRML Scene.
Definition: qMRMLWidget.h:35
Qt widget for selecting a single segment from a segmentation. If multiple segments are needed...
MRML node containing segmentationsSegmentation node stores a set of segments (also known as contours ...