ITK  4.2.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 <class TScalarType = double>
47 // Data type for scalars (float or double)
48 class ITK_EXPORT Euler3DTransform :
49  public Rigid3DTransform<TScalarType>
50 {
51 public:
57 
59  itkNewMacro(Self);
60 
62  itkTypeMacro(Euler3DTransform, Rigid3DTransform);
63 
65  itkStaticConstMacro(SpaceDimension, unsigned int, 3);
66  itkStaticConstMacro(InputSpaceDimension, unsigned int, 3);
67  itkStaticConstMacro(OutputSpaceDimension, unsigned int, 3);
68  itkStaticConstMacro(ParametersDimension, unsigned int, 6);
70 
71  typedef typename Superclass::ParametersType ParametersType;
72  typedef typename Superclass::ParametersValueType ParametersValueType;
73  typedef typename Superclass::JacobianType JacobianType;
75  typedef typename Superclass::InputVectorType InputVectorType;
76  typedef typename Superclass::OutputVectorType OutputVectorType;
77  typedef typename Superclass::InputCovariantVectorType InputCovariantVectorType;
78  typedef typename Superclass::OutputCovariantVectorType OutputCovariantVectorType;
79  typedef typename Superclass::InputVnlVectorType InputVnlVectorType;
80  typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
81  typedef typename Superclass::InputPointType InputPointType;
82  typedef typename Superclass::OutputPointType OutputPointType;
83  typedef typename Superclass::MatrixType MatrixType;
84  typedef typename Superclass::InverseMatrixType InverseMatrixType;
85  typedef typename Superclass::CenterType CenterType;
86  typedef typename Superclass::TranslationType TranslationType;
87  typedef typename Superclass::OffsetType OffsetType;
89 
94  void SetParameters(const ParametersType & parameters);
95 
96  const ParametersType & GetParameters(void) const;
97 
99  void SetRotation(ScalarType angleX, ScalarType angleY, ScalarType angleZ);
100 
101  itkGetConstMacro(AngleX, ScalarType);
102  itkGetConstMacro(AngleY, ScalarType);
103  itkGetConstMacro(AngleZ, ScalarType);
104 
109  virtual void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const;
110 
112  itkSetMacro(ComputeZYX, bool);
113  itkGetConstMacro(ComputeZYX, bool);
115 
116  virtual void SetIdentity(void);
117 
118 protected:
119  Euler3DTransform(const MatrixType & matrix, const OutputPointType & offset);
120  Euler3DTransform(unsigned int paramsSpaceDims);
122 
124  {
125  }
126 
127  void PrintSelf(std::ostream & os, Indent indent) const;
128 
130  void SetVarRotation(ScalarType angleX, ScalarType angleY, ScalarType angleZ);
131 
133  void ComputeMatrix(void);
134 
135  void ComputeMatrixParameters(void);
136 
137 private:
138  Euler3DTransform(const Self &); // purposely not implemented
139  void operator=(const Self &); // purposely not implemented
140 
145 }; // class Euler3DTransform
146 } // namespace itk
147 
148 // Define instantiation macro for this template.
149 #define ITK_TEMPLATE_Euler3DTransform(_, EXPORT, TypeX, TypeY) \
150  namespace itk \
151  { \
152  _( 1 ( class EXPORT Euler3DTransform<ITK_TEMPLATE_1 TypeX> ) ) \
153  namespace Templates \
154  { \
155  typedef Euler3DTransform<ITK_TEMPLATE_1 TypeX> \
156  Euler3DTransform##TypeY; \
157  } \
158  }
159 
160 #if ITK_TEMPLATE_EXPLICIT
161 #include "Templates/itkEuler3DTransform+-.h"
162 #endif
163 
164 #if ITK_TEMPLATE_TXX
165 #include "itkEuler3DTransform.hxx"
166 #endif
167 
168 #endif /* __itkEuler3DTransform_h */
169