ITK  4.0.0
Insight Segmentation and Registration Toolkit
itkEuler2DTransform.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkEuler2DTransform_h
00019 #define __itkEuler2DTransform_h
00020 
00021 #include <iostream>
00022 #include "itkRigid2DTransform.h"
00023 
00024 namespace itk
00025 {
00040 template< class TScalarType = double >
00041 // Data type for scalars
00042 class ITK_EXPORT Euler2DTransform:
00043   public Rigid2DTransform< TScalarType >
00044 {
00045 public:
00047   typedef Euler2DTransform                Self;
00048   typedef Rigid2DTransform< TScalarType > Superclass;
00049   typedef SmartPointer< Self >            Pointer;
00050   typedef SmartPointer< const Self >      ConstPointer;
00051 
00053   itkNewMacro(Self);
00054 
00056   itkTypeMacro(Euler2DTransform, Rigid2DTransform);
00057 
00059   itkStaticConstMacro(SpaceDimension, unsigned int, 2);
00060   itkStaticConstMacro(ParametersDimension, unsigned int, 3);
00062 
00064   typedef typename Superclass::ScalarType ScalarType;
00065 
00067   typedef typename Superclass::ParametersType ParametersType;
00068 
00070   typedef typename Superclass::JacobianType JacobianType;
00071 
00073   typedef typename Superclass::InputPointType  InputPointType;
00074   typedef typename Superclass::OutputPointType OutputPointType;
00075 
00077   typedef typename Superclass::InputVectorType  InputVectorType;
00078   typedef typename Superclass::OutputVectorType OutputVectorType;
00079 
00081   typedef typename Superclass::InputCovariantVectorType  InputCovariantVectorType;
00082   typedef typename Superclass::OutputCovariantVectorType OutputCovariantVectorType;
00083 
00085   typedef typename Superclass::InputVnlVectorType  InputVnlVectorType;
00086   typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
00087   typedef typename Superclass::MatrixType          MatrixType;
00088 
00091   typedef typename Superclass::InverseTransformBaseType InverseTransformBaseType;
00092   typedef typename InverseTransformBaseType::Pointer    InverseTransformBasePointer;
00093 
00098   void CloneInverseTo(Pointer & newinverse) const;
00099 
00101   bool GetInverse(Self *inverse) const;
00102 
00104   virtual InverseTransformBasePointer GetInverseTransform() const;
00105 
00110   void CloneTo(Pointer & clone) const;
00111 
00116   void ComputeAngleFromMatrix()
00117   { this->ComputeMatrixParameters(); }
00118 protected:
00119   Euler2DTransform(unsigned int parametersDimension);
00120   Euler2DTransform();
00121   ~Euler2DTransform(){}
00123 
00124   void PrintSelf(std::ostream & os, Indent indent) const;
00125 
00126 private:
00127   Euler2DTransform(const Self &); //purposely not implemented
00128   void operator=(const Self &);   //purposely not implemented
00129 };                                //class Euler2DTransform
00130 }  // namespace itk
00131 
00132 // Define instantiation macro for this template.
00133 #define ITK_TEMPLATE_Euler2DTransform(_, EXPORT, TypeX, TypeY)     \
00134   namespace itk                                                    \
00135   {                                                                \
00136   _( 1 ( class EXPORT Euler2DTransform< ITK_TEMPLATE_1 TypeX > ) ) \
00137   namespace Templates                                              \
00138   {                                                                \
00139   typedef Euler2DTransform< ITK_TEMPLATE_1 TypeX >                 \
00140   Euler2DTransform##TypeY;                                       \
00141   }                                                                \
00142   }
00143 
00144 #if ITK_TEMPLATE_EXPLICIT
00145 #include "Templates/itkEuler2DTransform+-.h"
00146 #endif
00147 
00148 #if ITK_TEMPLATE_TXX
00149 #include "itkEuler2DTransform.hxx"
00150 #endif
00151 
00152 #endif /* __itkEuler2DTransform_h */
00153