Slicer  5.0
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qMRMLMarkupsROIWidget.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 __qMRMLMarkupsROIWidget_h
23 #define __qMRMLMarkupsROIWidget_h
24 
25 // Markups widgets includes
27 #include "qSlicerMarkupsModuleWidgetsExport.h"
28 
29 // CTK includes
30 #include <ctkPimpl.h>
31 #include <ctkVTKObject.h>
32 
33 // ------------------------------------------------------------------------------
34 class vtkMRMLNode;
36 class qMRMLMarkupsROIWidgetPrivate;
37 
38 // ------------------------------------------------------------------------------
39 class Q_SLICER_MODULE_MARKUPS_WIDGETS_EXPORT qMRMLMarkupsROIWidget
41 {
42  Q_OBJECT
43  QVTK_OBJECT
44 
45 public:
47  qMRMLMarkupsROIWidget(QWidget* parent=nullptr);
48  ~qMRMLMarkupsROIWidget() override;
49 
51  vtkMRMLMarkupsROINode* mrmlROINode()const;
52 
53  void setExtent(double min, double max);
54  void setExtent(double minLR, double maxLR,
55  double minPA, double maxPA,
56  double minIS, double maxIS);
57 
59  const QString className() const override {return "qMRMLMarkupsROIWidget";}
60 
62  bool canManageMRMLMarkupsNode(vtkMRMLMarkupsNode *markupsNode) const override;
63 
65  bool insideOut();
66 
67 public slots:
69  void setDisplayClippingBox(bool visible);
70 
73  void setInteractiveMode(bool interactive);
74 
76  void setInsideOut(bool insideOut);
77 
79  void updateWidgetFromMRML() override;
80 
82  void setMRMLMarkupsNode(vtkMRMLMarkupsNode* node) override;
83 
86  { return new qMRMLMarkupsROIWidget(); }
87 
88 signals:
89  void displayClippingBoxChanged(bool);
90 
91 protected slots:
93  void updateROI();
95  void onMRMLDisplayNodeModified();
97  void onROITypeParameterChanged();
98 
99 protected:
100  void setup();
101 
102 protected:
103  QScopedPointer<qMRMLMarkupsROIWidgetPrivate> d_ptr;
104 
105 private:
106  Q_DECLARE_PRIVATE(qMRMLMarkupsROIWidget);
107  Q_DISABLE_COPY(qMRMLMarkupsROIWidget);
108 };
109 
110 #endif
MRML node to represent an ROI markup.
virtual void updateWidgetFromMRML()=0
Updates the widget based on information from MRML.
virtual bool canManageMRMLMarkupsNode(vtkMRMLMarkupsNode *markupsNode) const =0
qMRMLMarkupsAbstractOptionsWidget * createInstance() const override
Returns an instance of the widget.
qMRMLMarkupsAbstractOptionsWidget Superclass
void setMRMLMarkupsNode(vtkMRMLNode *markupsNode)
Sets the vtkMRMLNode to operate on.
QScopedPointer< qMRMLMarkupsROIWidgetPrivate > d_ptr
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