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
qMRMLLinearTransformSlider.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 __qMRMLLinearTransformSlider_h
22#define __qMRMLLinearTransformSlider_h
23
24// CTK includes
25#include <ctkVTKObject.h>
26
27// MRML includes
28#include "qMRMLSliderWidget.h"
29
31class vtkMatrix4x4;
32class qMRMLLinearTransformSliderPrivate;
33
34class QMRML_WIDGETS_EXPORT qMRMLLinearTransformSlider : public qMRMLSliderWidget
35{
36 Q_OBJECT
37 QVTK_OBJECT
39 Q_ENUMS(TransformType)
42
43public:
46 explicit qMRMLLinearTransformSlider(QWidget* parent);
48
60
63 bool isRotation()const;
64 bool isTranslation()const;
65
72
76
77public slots:
82
85 void applyTransformation(double sliderPosition);
86
87protected slots:
90 void onMRMLTransformNodeModified(vtkObject* caller);
91
92protected:
93 QScopedPointer<qMRMLLinearTransformSliderPrivate> d_ptr;
94
95private:
96 Q_DECLARE_PRIVATE(qMRMLLinearTransformSlider);
97 Q_DISABLE_COPY(qMRMLLinearTransformSlider);
98
99};
100
101#endif
vtkMRMLTransformNode * mrmlTransformNode() const
Return the current transform node.
void setCoordinateReference(CoordinateReferenceType coordinateReference)
CoordinateReferenceType CoordinateReference
bool isRotation() const
Convenience method allowing to get which family of transform is set.
qMRMLLinearTransformSlider(QWidget *parent)
void setMRMLTransformNode(vtkMRMLTransformNode *transformNode)
void setTypeOfTransform(TransformType typeOfTransform)
QVTK_OBJECTTransformType TypeOfTransform
void onMRMLTransformNodeModified(vtkObject *caller)
Triggered upon MRML scene updates.
TransformType typeOfTransform() const
void applyTransformation(double sliderPosition)
Apply the appropriate rotation/translation according to the typeOfTransform of the slider.
CoordinateReferenceType coordinateReference() const
qMRMLSliderWidget Superclass
Constructors.
QScopedPointer< qMRMLLinearTransformSliderPrivate > d_ptr
qMRMLSliderWidget(QWidget *parent=nullptr)
Construct an empty qMRMLSliderWidget with a null scene.
MRML node for representing a transformation between this node space and a parent node space.