Slicer 5.6
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
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
35class qMRMLSegmentationDisplayNodeWidgetPrivate;
36
39class QItemSelection;
40
43class Q_SLICER_MODULE_SEGMENTATIONS_WIDGETS_EXPORT qMRMLSegmentationDisplayNodeWidget : public qMRMLWidget
44{
45 Q_OBJECT
46 QVTK_OBJECT
47
48public:
50 explicit qMRMLSegmentationDisplayNodeWidget(QWidget* parent = nullptr);
53
57 Q_INVOKABLE QString segmentationDisplayNodeID();
58
60 Q_INVOKABLE QString currentSegmentID();
61
62public slots:
67
69 Q_INVOKABLE void setCurrentSegmentID(QString segmentID);
70
73
78
80 void onOpacityChanged(double);
86 void onOpacity3DChanged(double);
96
98 void onSegmentSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
99
100protected:
103
104protected:
105 QScopedPointer<qMRMLSegmentationDisplayNodeWidgetPrivate> d_ptr;
106
107private:
108 Q_DECLARE_PRIVATE(qMRMLSegmentationDisplayNodeWidget);
110};
111
112#endif
Qt widget for selecting a single segment from a segmentation. If multiple segments are needed,...
void onSegmentSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
Handles segment selection changes when connecting directly to a.
void onSegmentOpacitySliceOutlineChanged(double)
Q_INVOKABLE void setSegmentationNode(vtkMRMLSegmentationNode *node)
Utility function to set segmentation display node by segmentation node.
void populate3DRepresentationsCombobox()
Populate combobox that contain possible 3D representation names.
void populate2DRepresentationsCombobox()
Populate combobox that contain possible 2D representation names.
QScopedPointer< qMRMLSegmentationDisplayNodeWidgetPrivate > d_ptr
Q_INVOKABLE vtkMRMLSegmentationDisplayNode * segmentationDisplayNode() const
Get current segmentation display node.
qMRMLSegmentationDisplayNodeWidget(QWidget *parent=nullptr)
Constructor.
Q_INVOKABLE void setCurrentSegmentID(QString segmentID)
Get segment ID of selected segment.
Q_INVOKABLE void setSegmentationDisplayNode(vtkMRMLSegmentationDisplayNode *node)
Set segmentation display MRML node.
Q_INVOKABLE QString currentSegmentID()
Get segment ID of selected segment.
void updateSelectedSegmentSection()
Update visibility and opacity section for selected segment.
~qMRMLSegmentationDisplayNodeWidget() override
Destructor.
Q_INVOKABLE QString segmentationDisplayNodeID()
Get current segmentation display node's ID.
void updateWidgetFromMRML()
Update widget from MRML.
Base class for any widget that requires a MRML Scene.
Definition qMRMLWidget.h:36
MRML node for representing segmentation display attributes.
MRML node containing segmentations.