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
qMRMLClipNodeWidget.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 Julien Finet, Kitware Inc.
17 and was partially funded by NIH grant 3P41RR013218-12S1
18
19==============================================================================*/
20
21#ifndef __qMRMLClipNodeWidget_h
22#define __qMRMLClipNodeWidget_h
23
24// Qt includes
25#include <qMRMLWidget.h>
26
27// CTK includes
28#include <ctkVTKObject.h>
29
30// qMRML includes
31#include "qMRMLWidgetsExport.h"
32#include "vtkMRMLClipNode.h"
33
34class qMRMLClipNodeWidgetPrivate;
35class vtkMRMLNode;
36
37class QMRML_WIDGETS_EXPORT qMRMLClipNodeWidget : public qMRMLWidget
38{
39 Q_OBJECT
40 QVTK_OBJECT
41public:
42 qMRMLClipNodeWidget(QWidget* parent = nullptr);
44
46
47 int clipType()const;
48 void setClipType(int);
49
50 int clipState(vtkMRMLNode* node) const;
51 int clipState(const char* nodeID) const;
52 void setClipState(vtkMRMLNode* node, int state);
53 void setClipState(const char* nodeID, int state);
54
55public slots:
60
61protected slots:
64
65 // Update clipping node widget frame from node references.
67 // Update clipping node references from widget.
69
71
72protected:
73
74 // Returns true if the frame widget needs to be updated to reflect the node references.
76
77protected:
78 QScopedPointer<qMRMLClipNodeWidgetPrivate> d_ptr;
79
80private:
81 Q_DECLARE_PRIVATE(qMRMLClipNodeWidget);
82 Q_DISABLE_COPY(qMRMLClipNodeWidget);
83};
84
85#endif
int clipState(vtkMRMLNode *node) const
QScopedPointer< qMRMLClipNodeWidgetPrivate > d_ptr
void setMRMLClipNode(vtkMRMLNode *node)
Utility function to be connected to signals/slots.
int clipState(const char *nodeID) const
void setMRMLClipNode(vtkMRMLClipNode *node)
Set the clip node to represent.
qMRMLClipNodeWidget(QWidget *parent=nullptr)
bool needToUpdateClippingNodeFrame() const
void setClipState(const char *nodeID, int state)
void updateClippingNodeFromWidget()
~qMRMLClipNodeWidget() override
void setClipState(vtkMRMLNode *node, int state)
void updateClippingNodeFrame()
vtkMRMLClipNode * mrmlClipNode() const
int clipType() const
qMRMLWidget(QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags())
MRML node to represent three clipping planes.
Abstract Superclass for all specific types of MRML nodes.