ITK  5.4.0
Insight Toolkit
itkEuler3DTransform.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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  * https://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 : public Rigid3DTransform<TParametersValueType>
48 {
49 public:
50  ITK_DISALLOW_COPY_AND_MOVE(Euler3DTransform);
51 
57 
59  itkNewMacro(Self);
60 
62  itkOverrideGetNameOfClassMacro(Euler3DTransform);
63 
65  static constexpr unsigned int SpaceDimension = 3;
66  static constexpr unsigned int InputSpaceDimension = 3;
67  static constexpr unsigned int OutputSpaceDimension = 3;
68  static constexpr unsigned int ParametersDimension = 6;
69 
70  using typename Superclass::ParametersType;
71  using typename Superclass::ParametersValueType;
72  using typename Superclass::FixedParametersType;
73  using typename Superclass::FixedParametersValueType;
74  using typename Superclass::JacobianType;
75  using typename Superclass::JacobianPositionType;
76  using typename Superclass::InverseJacobianPositionType;
77  using typename Superclass::ScalarType;
78  using typename Superclass::InputVectorType;
79  using typename Superclass::OutputVectorType;
80  using typename Superclass::InputCovariantVectorType;
81  using typename Superclass::OutputCovariantVectorType;
82  using typename Superclass::InputVnlVectorType;
83  using typename Superclass::OutputVnlVectorType;
84  using typename Superclass::InputPointType;
85  using typename Superclass::OutputPointType;
86  using typename Superclass::MatrixType;
87  using typename Superclass::InverseMatrixType;
88  using typename Superclass::CenterType;
89  using typename Superclass::TranslationType;
90  using typename Superclass::OffsetType;
91  using AngleType = typename Superclass::ScalarType;
92 
97  void
98  SetParameters(const ParametersType & parameters) override;
99 
100  const ParametersType &
101  GetParameters() const override;
102 
103  const FixedParametersType &
104  GetFixedParameters() const override;
105  void
106  SetFixedParameters(const FixedParametersType & parameters) override;
107 
109  void
110  SetRotation(ScalarType angleX, ScalarType angleY, ScalarType angleZ);
111 
112  itkGetConstMacro(AngleX, ScalarType);
113  itkGetConstMacro(AngleY, ScalarType);
114  itkGetConstMacro(AngleZ, ScalarType);
115 
120  void
121  ComputeJacobianWithRespectToParameters(const InputPointType & p, JacobianType & jacobian) const override;
122  using Superclass::ComputeJacobianWithRespectToPosition;
123 
130  virtual void
131  SetComputeZYX(const bool flag);
132  itkGetConstMacro(ComputeZYX, bool);
139  void
140  SetIdentity() override;
141 
142 protected:
143  Euler3DTransform(const MatrixType & matrix, const OutputPointType & offset);
144  Euler3DTransform(unsigned int parametersDimension);
146 
147  ~Euler3DTransform() override = default;
148 
149  void
150  PrintSelf(std::ostream & os, Indent indent) const override;
151 
153  void
154  SetVarRotation(ScalarType angleX, ScalarType angleY, ScalarType angleZ);
155 
157  void
158  ComputeMatrix() override;
159 
161  void
162  ComputeMatrixParameters() override;
163 
164 private:
165  ScalarType m_AngleX{};
166  ScalarType m_AngleY{};
167  ScalarType m_AngleZ{};
168  bool m_ComputeZYX{};
169 }; // class Euler3DTransform
170 } // namespace itk
171 
172 #ifndef ITK_MANUAL_INSTANTIATION
173 # include "itkEuler3DTransform.hxx"
174 #endif
175 
176 #endif /* itkEuler3DTransform_h */
itk::Euler3DTransform
Euler3DTransform of a vector space (e.g. space coordinates)
Definition: itkEuler3DTransform.h:47
itk::OptimizerParameters
Class to hold and manage different parameter types used during optimization.
Definition: itkOptimizerParameters.h:36
itk::Rigid3DTransform
Rigid3DTransform of a vector space (e.g. space coordinates)
Definition: itkRigid3DTransform.h:57
itk::Euler3DTransform::AngleType
typename Superclass::ScalarType AngleType
Definition: itkEuler3DTransform.h:91
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itkRigid3DTransform.h
itk::Transform::ScalarType
ParametersValueType ScalarType
Definition: itkTransform.h:141
itk::Matrix< TParametersValueType, Self::OutputSpaceDimension, Self::InputSpaceDimension >
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::Point
A templated class holding a geometric point in n-Dimensional space.
Definition: itkPoint.h:53
itk::Array2D
Array2D class representing a 2D array.
Definition: itkArray2D.h:42