ITK  4.2.0
Insight Segmentation and Registration Toolkit
itkEuler2DTransform.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 __itkEuler2DTransform_h
19 #define __itkEuler2DTransform_h
20 
21 #include <iostream>
22 #include "itkRigid2DTransform.h"
23 
24 namespace itk
25 {
40 template< class TScalarType = double >
41 // Data type for scalars
42 class ITK_EXPORT Euler2DTransform:
43  public Rigid2DTransform< TScalarType >
44 {
45 public:
51 
53  itkNewMacro(Self);
54 
56  itkTypeMacro(Euler2DTransform, Rigid2DTransform);
57 
59  itkStaticConstMacro(SpaceDimension, unsigned int, 2);
60  itkStaticConstMacro(ParametersDimension, unsigned int, 3);
62 
64  typedef typename Superclass::ScalarType ScalarType;
65 
67  typedef typename Superclass::ParametersType ParametersType;
68 
70  typedef typename Superclass::JacobianType JacobianType;
71 
73  typedef typename Superclass::InputPointType InputPointType;
74  typedef typename Superclass::OutputPointType OutputPointType;
75 
77  typedef typename Superclass::InputVectorType InputVectorType;
78  typedef typename Superclass::OutputVectorType OutputVectorType;
79 
81  typedef typename Superclass::InputCovariantVectorType InputCovariantVectorType;
82  typedef typename Superclass::OutputCovariantVectorType OutputCovariantVectorType;
83 
85  typedef typename Superclass::InputVnlVectorType InputVnlVectorType;
86  typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
87  typedef typename Superclass::MatrixType MatrixType;
88 
91  typedef typename Superclass::InverseTransformBaseType InverseTransformBaseType;
92  typedef typename InverseTransformBaseType::Pointer InverseTransformBasePointer;
93 
98  void CloneInverseTo(Pointer & newinverse) const;
99 
101  bool GetInverse(Self *inverse) const;
102 
104  virtual InverseTransformBasePointer GetInverseTransform() const;
105 
110  void CloneTo(Pointer & clone) const;
111 
116  void ComputeAngleFromMatrix()
117  { this->ComputeMatrixParameters(); }
118 protected:
119  Euler2DTransform(unsigned int parametersDimension);
123 
124  void PrintSelf(std::ostream & os, Indent indent) const;
125 
126 private:
127  Euler2DTransform(const Self &); //purposely not implemented
128  void operator=(const Self &); //purposely not implemented
129 }; //class Euler2DTransform
130 } // namespace itk
131 
132 // Define instantiation macro for this template.
133 #define ITK_TEMPLATE_Euler2DTransform(_, EXPORT, TypeX, TypeY) \
134  namespace itk \
135  { \
136  _( 1 ( class EXPORT Euler2DTransform< ITK_TEMPLATE_1 TypeX > ) ) \
137  namespace Templates \
138  { \
139  typedef Euler2DTransform< ITK_TEMPLATE_1 TypeX > \
140  Euler2DTransform##TypeY; \
141  } \
142  }
143 
144 #if ITK_TEMPLATE_EXPLICIT
145 #include "Templates/itkEuler2DTransform+-.h"
146 #endif
147 
148 #if ITK_TEMPLATE_TXX
149 #include "itkEuler2DTransform.hxx"
150 #endif
151 
152 #endif /* __itkEuler2DTransform_h */
153