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
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// ------------------------------------------------------------------------------
34class vtkMRMLNode;
36class qMRMLMarkupsROIWidgetPrivate;
37
38// ------------------------------------------------------------------------------
39class Q_SLICER_MODULE_MARKUPS_WIDGETS_EXPORT qMRMLMarkupsROIWidget
41{
42 Q_OBJECT
43 QVTK_OBJECT
44
45public:
47 qMRMLMarkupsROIWidget(QWidget* parent=nullptr);
49
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
67public slots:
69 void setDisplayClippingBox(bool visible);
70
73 void setInteractiveMode(bool interactive);
74
77
79 void updateWidgetFromMRML() override;
80
83
87
88signals:
90
91protected slots:
93 void updateROI();
98
99protected:
100 void setup();
101
102protected:
103 QScopedPointer<qMRMLMarkupsROIWidgetPrivate> d_ptr;
104
105private:
106 Q_DECLARE_PRIVATE(qMRMLMarkupsROIWidget);
107 Q_DISABLE_COPY(qMRMLMarkupsROIWidget);
108};
109
110#endif
qMRMLMarkupsAbstractOptionsWidget(QWidget *parent=nullptr)
void displayClippingBoxChanged(bool)
QScopedPointer< qMRMLMarkupsROIWidgetPrivate > d_ptr
void setMRMLMarkupsNode(vtkMRMLMarkupsNode *node) override
Set the MRML node of interest.
const QString className() const override
Gets the name of the additional options widget type.
void onROITypeParameterChanged()
Internal function to update type of ROI.
void updateWidgetFromMRML() override
Updates the widget on MRML changes.
void setExtent(double min, double max)
vtkMRMLMarkupsROINode * mrmlROINode() const
Returns the current MRML ROI node.
void setDisplayClippingBox(bool visible)
Turn on/off the visibility of the ROI node.
void onMRMLDisplayNodeModified()
Internal function to update the ROIDisplay node.
qMRMLMarkupsAbstractOptionsWidget * createInstance() const override
Returns an instance of the widget.
void updateROI()
Internal function to update the ROI node based on the sliders.
bool insideOut()
Get the inside out state.
void setInteractiveMode(bool interactive)
bool canManageMRMLMarkupsNode(vtkMRMLMarkupsNode *markupsNode) const override
Checks whether a given node can be handled by the widget.
void setInsideOut(bool insideOut)
Turn on/off inside out state.
void setExtent(double minLR, double maxLR, double minPA, double maxPA, double minIS, double maxIS)
qMRMLMarkupsROIWidget(QWidget *parent=nullptr)
~qMRMLMarkupsROIWidget() override
qMRMLMarkupsAbstractOptionsWidget Superclass
MRML node to represent an ROI markup.
Abstract Superclass for all specific types of MRML nodes.