| 1 |
|
/*========================================================================= |
| 2 |
|
|
| 3 |
|
Program: Insight Segmentation & Registration Toolkit |
| 4 |
|
Module: $RCSfile: itkEuler2DTransform.h.html,v $ |
| 5 |
|
Language: C++ |
| 6 |
|
Date: $Date: 2006/01/17 19:15:35 $ |
| 7 |
|
Version: $Revision: 1.4 $ |
| 8 |
|
|
| 9 |
|
Copyright (c) Insight Software Consortium. All rights reserved. |
| 10 |
|
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. |
| 11 |
|
|
| 12 |
|
This software is distributed WITHOUT ANY WARRANTY; without even |
| 13 |
|
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
| 14 |
|
PURPOSE. See the above copyright notices for more information. |
| 15 |
|
|
| 16 |
|
=========================================================================*/ |
| 17 |
|
|
| 18 |
|
#ifndef __itkEuler2DTransform_h |
| 19 |
|
#define __itkEuler2DTransform_h |
| 20 |
|
|
| 21 |
|
#include <iostream> |
| 22 |
|
#include "itkRigid2DTransform.h" |
| 23 |
|
|
| 24 |
|
namespace itk |
| 25 |
|
{ |
| 26 |
|
|
| 27 |
|
/** \brief Euler2DTransform of a vector space (e.g. space coordinates) |
| 28 |
|
* |
| 29 |
|
* This transform applies a rigid transformation is 2D space. |
| 30 |
|
* The transform is specified as a rotation around arbitrary center |
| 31 |
|
* and is followed by a translation. |
| 32 |
|
* |
| 33 |
|
* This transform is basically is a synonym for Rigid2DTransform. |
| 34 |
|
* |
| 35 |
|
* \sa Rigid2DTransform |
| 36 |
|
* |
| 37 |
|
* \ingroup Transforms |
| 38 |
|
*/ |
| 39 |
|
template < class TScalarType=double > // Data type for scalars |
| 40 |
MCM |
class ITK_EXPORT Euler2DTransform : |
| 41 |
IND |
************public Rigid2DTransform< TScalarType > |
| 42 |
|
{ |
| 43 |
|
public: |
| 44 |
|
/** Standard class typedefs. */ |
| 45 |
|
typedef Euler2DTransform Self; |
| 46 |
TDA |
typedef Rigid2DTransform< TScalarType > Superclass; |
| 47 |
TDA |
typedef SmartPointer<Self> Pointer; |
| 48 |
TDA |
typedef SmartPointer<const Self> ConstPointer; |
| 49 |
|
|
| 50 |
|
/** New macro for creation of through a Smart Pointer. */ |
| 51 |
|
itkNewMacro( Self ); |
| 52 |
|
|
| 53 |
|
/** Run-time type information (and related methods). */ |
| 54 |
|
itkTypeMacro( Euler2DTransform, Rigid2DTransform ); |
| 55 |
|
|
| 56 |
|
/** Dimension of parameters. */ |
| 57 |
|
itkStaticConstMacro(SpaceDimension, unsigned int, 2); |
| 58 |
|
itkStaticConstMacro(ParametersDimension, unsigned int, 3); |
| 59 |
|
|
| 60 |
|
/** Scalar type. */ |
| 61 |
|
typedef typename Superclass::ScalarType ScalarType; |
| 62 |
|
|
| 63 |
|
/** Parameters type. */ |
| 64 |
|
typedef typename Superclass::ParametersType ParametersType; |
| 65 |
|
|
| 66 |
|
/** Jacobian type. */ |
| 67 |
|
typedef typename Superclass::JacobianType JacobianType; |
| 68 |
|
|
| 69 |
|
/** Point type. */ |
| 70 |
|
typedef typename Superclass::InputPointType InputPointType; |
| 71 |
|
typedef typename Superclass::OutputPointType OutputPointType; |
| 72 |
|
|
| 73 |
|
/** Vector type. */ |
| 74 |
|
typedef typename Superclass::InputVectorType InputVectorType; |
| 75 |
|
typedef typename Superclass::OutputVectorType OutputVectorType; |
| 76 |
|
|
| 77 |
|
/** CovariantVector type. */ |
| 78 |
LEN |
typedef typename Superclass::InputCovariantVectorType InputCovariantVectorType; |
| 79 |
LEN |
typedef typename Superclass::OutputCovariantVectorType OutputCovariantVectorType; |
| 80 |
|
|
| 81 |
|
/** VnlVector type. */ |
| 82 |
|
typedef typename Superclass::InputVnlVectorType InputVnlVectorType; |
| 83 |
|
typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType; |
| 84 |
|
typedef typename Superclass::MatrixType MatrixType; |
| 85 |
|
|
| 86 |
|
/** |
| 87 |
|
* This method creates and returns a new Euler2DTransform object |
| 88 |
|
* which is the inverse of self. |
| 89 |
|
**/ |
| 90 |
|
void CloneInverseTo( Pointer & newinverse ) const; |
| 91 |
|
|
| 92 |
|
/** |
| 93 |
|
* This method creates and returns a new Euler2DTransform object |
| 94 |
|
* which has the same parameters as self. |
| 95 |
|
**/ |
| 96 |
|
void CloneTo( Pointer & clone ) const; |
| 97 |
|
|
| 98 |
|
/** |
| 99 |
|
* Update the angle from the underlying matrix. This method |
| 100 |
|
* is old and is retained for backward compatibility. |
| 101 |
|
*/ |
| 102 |
|
void ComputeAngleFromMatrix() |
| 103 |
|
{ this->ComputeMatrixParameters(); } |
| 104 |
|
|
| 105 |
|
protected: |
| 106 |
|
Euler2DTransform(); |
| 107 |
|
~Euler2DTransform(){}; |
| 108 |
|
|
| 109 |
LEN |
Euler2DTransform(unsigned int outputSpaceDimension, unsigned int parametersDimension); |
| 110 |
|
|
| 111 |
|
void PrintSelf(std::ostream &os, Indent indent) const; |
| 112 |
|
|
| 113 |
|
private: |
| 114 |
|
Euler2DTransform(const Self&); //purposely not implemented |
| 115 |
|
void operator=(const Self&); //purposely not implemented |
| 116 |
|
|
| 117 |
|
|
| 118 |
|
}; //class Euler2DTransform |
| 119 |
|
|
| 120 |
|
|
| 121 |
|
} // namespace itk |
| 122 |
|
|
| 123 |
|
|
| 124 |
|
#ifndef ITK_MANUAL_INSTANTIATION |
| 125 |
|
#include "itkEuler2DTransform.txx" |
| 126 |
|
#endif |
| 127 |
|
|
| 128 |
|
#endif /* __itkEuler2DTransform_h */ |
| 129 |
|
|