ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkEuler3DTransform.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkEuler3DTransform_h
19 #define itkEuler3DTransform_h
20 
21 #include <iostream>
22 #include "itkRigid3DTransform.h"
23 
24 namespace itk
25 {
46 template<typename TParametersValueType=double >
47 class ITK_TEMPLATE_EXPORT Euler3DTransform :
48  public Rigid3DTransform<TParametersValueType>
49 {
50 public:
56 
58  itkNewMacro(Self);
59 
61  itkTypeMacro(Euler3DTransform, Rigid3DTransform);
62 
64  itkStaticConstMacro(SpaceDimension, unsigned int, 3);
65  itkStaticConstMacro(InputSpaceDimension, unsigned int, 3);
66  itkStaticConstMacro(OutputSpaceDimension, unsigned int, 3);
67  itkStaticConstMacro(ParametersDimension, unsigned int, 6);
69 
70  typedef typename Superclass::ParametersType ParametersType;
71  typedef typename Superclass::ParametersValueType ParametersValueType;
72  typedef typename Superclass::FixedParametersType FixedParametersType;
73  typedef typename Superclass::FixedParametersValueType FixedParametersValueType;
74  typedef typename Superclass::JacobianType JacobianType;
76  typedef typename Superclass::InputVectorType InputVectorType;
77  typedef typename Superclass::OutputVectorType OutputVectorType;
78  typedef typename Superclass::InputCovariantVectorType InputCovariantVectorType;
79  typedef typename Superclass::OutputCovariantVectorType OutputCovariantVectorType;
80  typedef typename Superclass::InputVnlVectorType InputVnlVectorType;
81  typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
82  typedef typename Superclass::InputPointType InputPointType;
83  typedef typename Superclass::OutputPointType OutputPointType;
84  typedef typename Superclass::MatrixType MatrixType;
85  typedef typename Superclass::InverseMatrixType InverseMatrixType;
86  typedef typename Superclass::CenterType CenterType;
87  typedef typename Superclass::TranslationType TranslationType;
88  typedef typename Superclass::OffsetType OffsetType;
90 
95  void SetParameters(const ParametersType & parameters) ITK_OVERRIDE;
96 
97  const ParametersType & GetParameters(void) const ITK_OVERRIDE;
98 
99  const FixedParametersType & GetFixedParameters() const ITK_OVERRIDE;
100  virtual void SetFixedParameters(const FixedParametersType & parameters) ITK_OVERRIDE;
101 
103  void SetRotation(ScalarType angleX, ScalarType angleY, ScalarType angleZ);
104 
105  itkGetConstMacro(AngleX, ScalarType);
106  itkGetConstMacro(AngleY, ScalarType);
107  itkGetConstMacro(AngleZ, ScalarType);
108 
113  virtual void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const ITK_OVERRIDE;
114 
121  virtual void SetComputeZYX (const bool flag);
122  itkGetConstMacro(ComputeZYX, bool);
124 
125  virtual void SetIdentity(void) ITK_OVERRIDE;
126 
127 protected:
128  Euler3DTransform(const MatrixType & matrix, const OutputPointType & offset);
129  Euler3DTransform(unsigned int paramsSpaceDims);
131 
132  ~Euler3DTransform() ITK_OVERRIDE {}
133 
134  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
135 
137  void SetVarRotation(ScalarType angleX, ScalarType angleY, ScalarType angleZ);
138 
140  void ComputeMatrix(void) ITK_OVERRIDE;
141 
142  void ComputeMatrixParameters(void) ITK_OVERRIDE;
143 
144 private:
145  ITK_DISALLOW_COPY_AND_ASSIGN(Euler3DTransform);
146 
147  ScalarType m_AngleX;
148  ScalarType m_AngleY;
149  ScalarType m_AngleZ;
150  bool m_ComputeZYX;
151 }; // class Euler3DTransform
152 } // namespace itk
153 
154 #ifndef ITK_MANUAL_INSTANTIATION
155 #include "itkEuler3DTransform.hxx"
156 #endif
157 
158 #endif /* itkEuler3DTransform_h */
Rigid3DTransform< TParametersValueType > Superclass
Light weight base class for most itk classes.
Superclass::OutputCovariantVectorType OutputCovariantVectorType
Rigid3DTransform of a vector space (e.g. space coordinates)
Superclass::OutputVnlVectorType OutputVnlVectorType
SmartPointer< Self > Pointer
Superclass::ScalarType AngleType
Superclass::CenterType CenterType
Superclass::ScalarType ScalarType
Superclass::OutputPointType OutputPointType
Superclass::FixedParametersValueType FixedParametersValueType
Superclass::ParametersValueType ParametersValueType
Superclass::InputVnlVectorType InputVnlVectorType
Superclass::ParametersType ParametersType
Superclass::OffsetType OffsetType
Superclass::OutputVectorType OutputVectorType
Euler3DTransform of a vector space (e.g. space coordinates)
Superclass::InverseMatrixType InverseMatrixType
Superclass::InputVectorType InputVectorType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
SmartPointer< const Self > ConstPointer
Superclass::JacobianType JacobianType
Superclass::FixedParametersType FixedParametersType
Superclass::ScalarType ScalarType
Superclass::TranslationType TranslationType
Superclass::MatrixType MatrixType
Superclass::InputCovariantVectorType InputCovariantVectorType
Superclass::InputPointType InputPointType