go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkEulerTransform.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright UMC Utrecht and contributors
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 __itkEulerTransform_H__
19 #define __itkEulerTransform_H__
20 
24 
25 namespace itk
26 {
27 
34 template< unsigned int Dimension >
36 {
37 public:
38 
39  template< class TScalarType >
40  class Dummy
41  {
42 public:
43 
46 
47  };
48 
49 };
50 
57 template< >
58 class EulerGroup< 2 >
59 {
60 public:
61 
62  template< class TScalarType >
63  class Dummy
64  {
65 public:
66 
69 
70  };
71 
72 };
73 
80 template< >
81 class EulerGroup< 3 >
82 {
83 public:
84 
85  template< class TScalarType >
86  class Dummy
87  {
88 public:
89 
92 
93  };
94 
95 };
96 
103 template< class TScalarType, unsigned int Dimension >
105 {
106 public:
107 
109  typedef TScalarType ScalarType;
110  itkStaticConstMacro( SpaceDimension, unsigned int, Dimension );
111 
112  // This declaration of 'Euler' does not work with the GCC compiler
113  // typedef EulerGroup< itkGetStaticConstMacro( SpaceDimension ) > Euler;
114  // The following trick works though:
115  template< unsigned int D >
117  {
118 public:
119 
121  };
122 
125 
126  typedef typename Euler::template Dummy< ScalarType > EulerDummy;
127  typedef typename EulerDummy::EulerTransform_tmp EulerTransform_tmp;
128 
129 };
130 
140 template< class TScalarType, unsigned int Dimension >
142  public EulerGroupTemplate<
143  TScalarType, Dimension >::EulerTransform_tmp
144 {
145 public:
146 
149  typedef typename EulerGroupTemplate<
150  TScalarType, Dimension >
151  ::EulerTransform_tmp Superclass;
153  typedef SmartPointer< const Self > ConstPointer;
154 
156  itkNewMacro( Self );
157 
159  itkTypeMacro( EulerTransform, EulerGroupTemplate );
160 
162  itkStaticConstMacro( SpaceDimension, unsigned int, Dimension );
163 
167  typedef typename Superclass::ScalarType ScalarType;
168  typedef typename Superclass::ParametersType ParametersType;
169  typedef typename Superclass::NumberOfParametersType NumberOfParametersType;
170  typedef typename Superclass::JacobianType JacobianType;
171  typedef typename Superclass::OffsetType OffsetType;
172  typedef typename Superclass::InputPointType InputPointType;
173  typedef typename Superclass::OutputPointType OutputPointType;
174  typedef typename Superclass::InputVectorType InputVectorType;
175  typedef typename Superclass::OutputVectorType OutputVectorType;
176  typedef typename Superclass::InputCovariantVectorType InputCovariantVectorType;
177  typedef typename Superclass::OutputCovariantVectorType OutputCovariantVectorType;
178  typedef typename Superclass::InputVnlVectorType InputVnlVectorType;
179  typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
180 
181  typedef typename Superclass
182  ::NonZeroJacobianIndicesType NonZeroJacobianIndicesType;
183  typedef typename Superclass::SpatialJacobianType SpatialJacobianType;
184  typedef typename Superclass
185  ::JacobianOfSpatialJacobianType JacobianOfSpatialJacobianType;
186  typedef typename Superclass::SpatialHessianType SpatialHessianType;
187  typedef typename Superclass
188  ::JacobianOfSpatialHessianType JacobianOfSpatialHessianType;
189  typedef typename Superclass::InternalMatrixType InternalMatrixType;
190 
194  virtual void SetComputeZYX( const bool arg )
195  {
196  if( SpaceDimension == 3 )
197  {
198  typedef AdvancedEuler3DTransform< ScalarType > Euler3DTransformType;
199  typename Euler3DTransformType::Pointer transform
200  = dynamic_cast< Euler3DTransformType * >( this );
201  if( transform )
202  {
203  transform->Euler3DTransformType::SetComputeZYX( arg );
204  }
205  }
206  }
207 
208 
212  virtual bool GetComputeZYX( void ) const
213  {
214  if( SpaceDimension == 3 )
215  {
216  typedef AdvancedEuler3DTransform< ScalarType > Euler3DTransformType;
217  typename Euler3DTransformType::ConstPointer transform
218  = dynamic_cast< const Euler3DTransformType * >( this );
219  if( transform )
220  {
221  return transform->Euler3DTransformType::GetComputeZYX();
222  }
223  }
224  return false;
225  }
226 
227 
228 protected:
229 
232 
233 private:
234 
235  EulerTransform( const Self & ); // purposely not implemented
236  void operator=( const Self & ); // purposely not implemented
237 
238 };
239 
240 } // end namespace itk
241 
242 #endif // end #ifndef __itkEulerTransform_H__
Superclass::InputPointType InputPointType
Superclass::JacobianType JacobianType
Superclass::NumberOfParametersType NumberOfParametersType
Superclass::JacobianOfSpatialJacobianType JacobianOfSpatialJacobianType
Superclass::OffsetType OffsetType
Superclass::InputVnlVectorType InputVnlVectorType
Superclass::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
This class combines the Euler2DTransform with the Euler3DTransform.
This class only contains a dummy class.
itkStaticConstMacro(SpaceDimension, unsigned int, Dimension)
Superclass::InternalMatrixType InternalMatrixType
Superclass::OutputCovariantVectorType OutputCovariantVectorType
AdvancedMatrixOffsetTransformBase< TScalarType, Dimension, Dimension > EulerTransform_tmp
virtual void SetComputeZYX(const bool arg)
EulerDummy::EulerTransform_tmp EulerTransform_tmp
SmartPointer< const Self > ConstPointer
EulerGroupTemplate Self
void operator=(const Self &)
AdvancedRigid2DTransform< TScalarType > EulerTransform_tmp
Superclass::OutputVnlVectorType OutputVnlVectorType
itkStaticConstMacro(SpaceDimension, unsigned int, Dimension)
Superclass::InputVectorType InputVectorType
AdvancedEuler3DTransform< TScalarType > EulerTransform_tmp
AdvancedEuler3DTransform of a vector space (e.g. space coordinates)
EulerGroupTemplate< TScalarType, Dimension >::EulerTransform_tmp Superclass
Euler::template Dummy< ScalarType > EulerDummy
Superclass::OutputVectorType OutputVectorType
Superclass::InputCovariantVectorType InputCovariantVectorType
virtual bool GetComputeZYX(void) const
AdvancedRigid2DTransform of a vector space (e.g. space coordinates)
EulerGroupWrap< Dimension > EulerGroupWrapInstance
Superclass::ScalarType ScalarType
Superclass::SpatialHessianType SpatialHessianType
SmartPointer< Self > Pointer
Superclass::OutputPointType OutputPointType
Superclass::SpatialJacobianType SpatialJacobianType
EulerGroupWrapInstance::Euler Euler
This class templates the EulerGroup over its dimension.
Superclass::JacobianOfSpatialHessianType JacobianOfSpatialHessianType
Superclass::ParametersType ParametersType


Generated on 04-09-2015 for elastix by doxygen 1.8.9.1 elastix logo