Slicer  5.3
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
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 <QWidget>
26 
27 // CTK includes
28 #include <ctkVTKObject.h>
29 
30 // qMRML includes
31 #include "qMRMLWidgetsExport.h"
32 #include "vtkMRMLClipModelsNode.h"
33 
34 class qMRMLClipNodeWidgetPrivate;
35 class vtkMRMLNode;
37 
38 class QMRML_WIDGETS_EXPORT qMRMLClipNodeWidget : public QWidget
39 {
40  Q_OBJECT
41  QVTK_OBJECT
42 public:
43  qMRMLClipNodeWidget(QWidget *parent=nullptr);
44  ~qMRMLClipNodeWidget() override;
45 
46  vtkMRMLClipModelsNode* mrmlClipNode()const;
47 
48  int clipType()const;
49  int redSliceClipState()const;
50  int yellowSliceClipState()const;
51  int greenSliceClipState()const;
52  vtkMRMLClipModelsNode::ClippingMethodType clippingMethod()const;
53 
54  void setClipType(int);
55  void setRedSliceClipState(int);
56  void setYellowSliceClipState(int);
57  void setGreenSliceClipState(int);
58  void setClippingMethod(vtkMRMLClipModelsNode::ClippingMethodType);
59 
60 public slots:
62  void setMRMLClipNode(vtkMRMLClipModelsNode *node);
64  void setMRMLClipNode(vtkMRMLNode *node);
65 
66 protected slots:
67  void updateWidgetFromMRML();
68 
69  void updateNodeClipType();
70  void updateNodeRedClipState();
71  void updateNodeYellowClipState();
72  void updateNodeGreenClipState();
73  void updateNodeClippingMethod();
74 
75 protected:
76  QScopedPointer<qMRMLClipNodeWidgetPrivate> d_ptr;
77 
78 private:
79  Q_DECLARE_PRIVATE(qMRMLClipNodeWidget);
80  Q_DISABLE_COPY(qMRMLClipNodeWidget);
81 };
82 
83 #endif
MRML node to represent three clipping planes.
QScopedPointer< qMRMLClipNodeWidgetPrivate > d_ptr
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167