Slicer  5.2
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qMRMLSegmentationShow3DButton.h
Go to the documentation of this file.
1 /*=auto=========================================================================
2 
3  Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH)
4  All Rights Reserved.
5 
6  See COPYRIGHT.txt
7  or http://www.slicer.org/copyright/copyright.txt for details.
8 
9  Program: 3D Slicer
10 
11 =========================================================================auto=*/
12 
13 #ifndef __qMRMLSegmentationShow3DButton_h
14 #define __qMRMLSegmentationShow3DButton_h
15 
16 // CTK includes
17 #include <ctkMenuButton.h>
18 #include <ctkPimpl.h>
19 #include <ctkVTKObject.h>
20 
21 // Segmentations includes
22 #include "qSlicerSegmentationsModuleWidgetsExport.h"
23 
24 class qMRMLSegmentationShow3DButtonPrivate;
26 
29 class Q_SLICER_MODULE_SEGMENTATIONS_WIDGETS_EXPORT qMRMLSegmentationShow3DButton : public ctkMenuButton
30 {
31  Q_OBJECT
32  QVTK_OBJECT
33 
36  Q_PROPERTY(bool locked READ locked WRITE setLocked)
37 
38 public:
39  explicit qMRMLSegmentationShow3DButton(QWidget* parent=nullptr);
41 
43  Q_INVOKABLE vtkMRMLSegmentationNode* segmentationNode() const;
44 
45  bool locked() const;
46 
47 public slots:
49  Q_INVOKABLE void setSegmentationNode(vtkMRMLSegmentationNode* node);
50 
51  void setLocked(bool);
52 
53 protected slots:
54  void onToggled(bool toggled=true);
55  void onEnableSurfaceSmoothingToggled(bool smoothingEnabled);
56  void onSurfaceSmoothingFactorChanged(double newSmoothingFactor);
57  void updateWidgetFromMRML();
58 
59 protected:
60  QScopedPointer<qMRMLSegmentationShow3DButtonPrivate> d_ptr;
61 private :
62  Q_DECLARE_PRIVATE(qMRMLSegmentationShow3DButton);
63  Q_DISABLE_COPY(qMRMLSegmentationShow3DButton);
64 };
65 
66 #endif
Button that shows/hide segmentation in 3D It creates or removes closed surface representation.
QScopedPointer< qMRMLSegmentationShow3DButtonPrivate > d_ptr
MRML node containing segmentationsSegmentation node stores a set of segments (also known as contours ...