Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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
37class vtkMRMLNode;
40class QItemSelection;
41
44class Q_SLICER_MODULE_SEGMENTATIONS_WIDGETS_EXPORT qMRMLSegmentationDisplayNodeWidget : public qMRMLWidget
45{
46 Q_OBJECT
47 QVTK_OBJECT
48
49public:
51 explicit qMRMLSegmentationDisplayNodeWidget(QWidget* parent = nullptr);
54
58 Q_INVOKABLE QString segmentationDisplayNodeID();
59
61 Q_INVOKABLE QString currentSegmentID();
62
63public slots:
68
70 Q_INVOKABLE void setCurrentSegmentID(QString segmentID);
71
74
79
81 void onOpacityChanged(double);
87 void onOpacity3DChanged(double);
101
103 void onSegmentSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
104
105protected:
108
109protected:
110 QScopedPointer<qMRMLSegmentationDisplayNodeWidgetPrivate> d_ptr;
111
112private:
113 Q_DECLARE_PRIVATE(qMRMLSegmentationDisplayNodeWidget);
115};
116
117#endif
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.
void onClipNodeChanged(vtkMRMLNode *)
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.
qMRMLWidget(QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags())
Abstract Superclass for all specific types of MRML nodes.
MRML node for representing segmentation display attributes.
MRML node containing segmentations.