Slicer  5.3
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerTransformsModuleWidget.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 Jean-Christophe Fillion-Robin, Kitware Inc.
17  and was partially funded by NIH grant 3P41RR013218-12S1
18 
19 ==============================================================================*/
20 
21 #ifndef __qSlicerTransformsModuleWidget_h
22 #define __qSlicerTransformsModuleWidget_h
23 
24 // Slicer includes
26 
27 // Transforms includes
28 #include "qSlicerTransformsModuleExport.h"
29 
30 class vtkMatrix4x4;
31 class vtkMRMLNode;
32 class qSlicerTransformsModuleWidgetPrivate;
33 
34 class Q_SLICER_QTMODULES_TRANSFORMS_EXPORT qSlicerTransformsModuleWidget :
36 {
37  Q_OBJECT
38 
39 public:
40 
42  qSlicerTransformsModuleWidget(QWidget *parent=nullptr);
44 
46  void setMRMLScene(vtkMRMLScene* scene) override;
47 
48  bool setEditedNode(vtkMRMLNode* node, QString role = QString(), QString context = QString()) override;
49 
50 public slots:
51 
54  void identity();
55 
57  void invert();
58 
60  void split();
61 
62 protected:
63 
64  void setup() override;
65 
66 protected slots:
67 
68  void onTranslateFirstButtonPressed(bool checked);
69  void onNodeSelected(vtkMRMLNode* node);
70  void onMRMLTransformNodeModified(vtkObject* caller);
71 
72  void copyTransform();
73  void pasteTransform();
74 
75  void transformSelectedNodes();
76  void untransformSelectedNodes();
77  void hardenSelectedNodes();
78 
79  void onDisplaySectionClicked(bool);
80  void onTransformableSectionClicked(bool);
81 
82  void updateConvertButtonState();
83  void convert();
84 
85 protected:
88  int coordinateReference()const;
89 
90 protected:
91  QScopedPointer<qSlicerTransformsModuleWidgetPrivate> d_ptr;
92 
93 private:
94  Q_DECLARE_PRIVATE(qSlicerTransformsModuleWidget);
95  Q_DISABLE_COPY(qSlicerTransformsModuleWidget);
96 };
97 
98 #endif
QScopedPointer< qSlicerTransformsModuleWidgetPrivate > d_ptr
Q_INVOKABLE bool setEditedNode(vtkMRMLNode *node, QString role=QString(), QString context=QString()) override
Node editing.
qSlicerAbstractModuleWidget Superclass
void setMRMLScene(vtkMRMLScene *scene) override
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:57
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167