Slicer  5.1
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qMRMLMarkupsPlaneWidget.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 the License.
15 
16  This file was originally developed by Kyle Sunderland, PerkLab, Queen's University
17  and was supported through CANARIE's Research Software Program, Cancer
18  Care Ontario, OpenAnatomy, and Brigham and Women's Hospital through NIH grant R01MH112748.
19 
20 ==============================================================================*/
21 
22 #ifndef __qMRMLMarkupsPlaneWidget_h
23 #define __qMRMLMarkupsPlaneWidget_h
24 
25 // Qt includes
26 #include <QWidget>
27 
28 // Markups widgets includes
30 #include "qSlicerMarkupsModuleWidgetsExport.h"
31 
32 // CTK includes
33 #include <ctkPimpl.h>
34 #include <ctkVTKObject.h>
35 
36 class vtkMRMLAnnotationPlaneNode;
37 class vtkMRMLNode;
39 class qMRMLMarkupsPlaneWidgetPrivate;
40 
41 class Q_SLICER_MODULE_MARKUPS_WIDGETS_EXPORT qMRMLMarkupsPlaneWidget : public qMRMLMarkupsAbstractOptionsWidget
42 {
43  Q_OBJECT
44  QVTK_OBJECT
45 
46 public:
48  qMRMLMarkupsPlaneWidget(QWidget* parent=nullptr);
49  ~qMRMLMarkupsPlaneWidget() override;
50 
52  vtkMRMLMarkupsPlaneNode* mrmlPlaneNode()const;
53 
55  const QString className() const override { return "qMRMLMarkupsPlaneWidget"; }
56 
58  bool canManageMRMLMarkupsNode(vtkMRMLMarkupsNode *markupsNode) const override;
59 
60 public slots:
62  void updateWidgetFromMRML() override;
63 
65  void setMRMLMarkupsNode(vtkMRMLMarkupsNode* node) override;
66 
69  {
70  return new qMRMLMarkupsPlaneWidget();
71  }
72 
73 protected slots:
75  void onPlaneTypeIndexChanged();
76  void onPlaneSizeModeIndexChanged();
77  void onPlaneSizeSpinBoxChanged();
78  void onPlaneBoundsSpinBoxChanged();
79  void onNormalVisibilityCheckBoxChanged();
80  void onNormalOpacitySliderChanged();
81 
82 protected:
83  void setup();
84 
85 protected:
86  QScopedPointer<qMRMLMarkupsPlaneWidgetPrivate> d_ptr;
87 
88 private:
89  Q_DECLARE_PRIVATE(qMRMLMarkupsPlaneWidget);
90  Q_DISABLE_COPY(qMRMLMarkupsPlaneWidget);
91 
92 };
93 
94 #endif
virtual void updateWidgetFromMRML()=0
Updates the widget based on information from MRML.
virtual bool canManageMRMLMarkupsNode(vtkMRMLMarkupsNode *markupsNode) const =0
QScopedPointer< qMRMLMarkupsPlaneWidgetPrivate > d_ptr
qMRMLMarkupsAbstractOptionsWidget * createInstance() const override
Returns an instance of the widget.
void setMRMLMarkupsNode(vtkMRMLNode *markupsNode)
Sets the vtkMRMLNode to operate on.
MRML node to represent a plane markup Plane Markups nodes contain three control points. Visualization parameters are set in the vtkMRMLMarkupsDisplayNode class.
const QString className() const override
Gets the name of the additional options widget type.
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
qMRMLMarkupsAbstractOptionsWidget Superclass