| 1 |
|
/*========================================================================= |
| 2 |
|
|
| 3 |
|
Program: Insight Segmentation & Registration Toolkit |
| 4 |
|
Module: $RCSfile: itkFixedCenterOfRotationAffineTransform.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 __itkFixedCenterOfRotationAffineTransform_h |
| 19 |
|
#define __itkFixedCenterOfRotationAffineTransform_h |
| 20 |
|
|
| 21 |
|
#include "itkScalableAffineTransform.h" |
| 22 |
|
|
| 23 |
|
namespace itk |
| 24 |
|
{ |
| 25 |
|
|
| 26 |
|
|
| 27 |
|
/** |
| 28 |
|
* \brief Affine transformation with a specified center of rotation. |
| 29 |
|
* |
| 30 |
LEN |
* This class implements an Affine transform in which the rotation center can be explicitly selected. |
| 31 |
|
* |
| 32 |
|
* |
| 33 |
|
* \ingroup Transforms |
| 34 |
|
* |
| 35 |
|
* |
| 36 |
|
*/ |
| 37 |
|
|
| 38 |
|
template < |
| 39 |
|
class TScalarType=double, // Data type for scalars (e.g. float or double) |
| 40 |
|
unsigned int NDimensions=3> // Number of dimensions in the input space |
| 41 |
|
class ITK_EXPORT FixedCenterOfRotationAffineTransform : |
| 42 |
IND |
**public ScalableAffineTransform< TScalarType, NDimensions > |
| 43 |
|
{ |
| 44 |
|
public: |
| 45 |
|
/** Standard typedefs */ |
| 46 |
|
typedef FixedCenterOfRotationAffineTransform Self; |
| 47 |
|
typedef ScalableAffineTransform< TScalarType, NDimensions > Superclass; |
| 48 |
|
typedef SmartPointer<Self> Pointer; |
| 49 |
|
typedef SmartPointer<const Self> ConstPointer; |
| 50 |
|
|
| 51 |
|
/** Run-time type information (and related methods). */ |
| 52 |
|
itkTypeMacro( FixedCenterOfRotationAffineTransform, ScalableAffineTransform ); |
| 53 |
|
|
| 54 |
|
/** New macro for creation of through a Smart Pointer */ |
| 55 |
|
itkNewMacro( Self ); |
| 56 |
|
|
| 57 |
|
/** Dimension of the domain space. */ |
| 58 |
|
itkStaticConstMacro(InputSpaceDimension, unsigned int, NDimensions); |
| 59 |
|
itkStaticConstMacro(OutputSpaceDimension, unsigned int, NDimensions); |
| 60 |
|
itkStaticConstMacro(SpaceDimension, unsigned int, NDimensions); |
| 61 |
|
itkStaticConstMacro(ParametersDimension, unsigned int, |
| 62 |
|
NDimensions*(NDimensions+2)); |
| 63 |
|
|
| 64 |
|
/** Types taken from the Superclass */ |
| 65 |
|
typedef typename Superclass::ParametersType ParametersType; |
| 66 |
|
typedef typename Superclass::JacobianType JacobianType; |
| 67 |
|
typedef typename Superclass::ScalarType ScalarType; |
| 68 |
|
typedef typename Superclass::InputVectorType InputVectorType; |
| 69 |
|
typedef typename Superclass::OutputVectorType OutputVectorType; |
| 70 |
|
typedef typename Superclass::InputCovariantVectorType |
| 71 |
TDA,IND |
********************************************InputCovariantVectorType; |
| 72 |
|
typedef typename Superclass::OutputCovariantVectorType |
| 73 |
TDA,IND |
********************************************OutputCovariantVectorType; |
| 74 |
|
typedef typename Superclass::InputVnlVectorType InputVnlVectorType; |
| 75 |
|
typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType; |
| 76 |
|
typedef typename Superclass::InputPointType InputPointType; |
| 77 |
|
typedef typename Superclass::OutputPointType OutputPointType; |
| 78 |
|
typedef typename Superclass::MatrixType MatrixType; |
| 79 |
|
typedef typename Superclass::InverseMatrixType InverseMatrixType; |
| 80 |
|
typedef typename Superclass::CenterType CenterType; |
| 81 |
|
typedef typename Superclass::TranslationType TranslationType; |
| 82 |
|
typedef typename Superclass::OffsetType OffsetType; |
| 83 |
|
|
| 84 |
|
/** Set and Get the center of rotation */ |
| 85 |
|
void SetCenterOfRotationComponent(const InputPointType &cor) |
| 86 |
|
{ this->SetCenter( cor ); }; |
| 87 |
|
InputPointType GetCenterOfRotationComponent(void) const |
| 88 |
|
{ return this->GetCenter(); }; |
| 89 |
|
|
| 90 |
|
/** Set the matrix of the transform. The matrix should not include |
| 91 |
|
* scale */ |
| 92 |
|
void SetMatrixComponent(const MatrixType &matrix) |
| 93 |
|
{ this->SetMatrix( matrix ); }; |
| 94 |
|
/** Get matrix of the transform */ |
| 95 |
|
const MatrixType & GetMatrixComponent() const |
| 96 |
|
{ return this->GetMatrix(); } |
| 97 |
|
|
| 98 |
|
/** Set offset (origin) of the Transform.*/ |
| 99 |
|
void SetOffsetComponent(const OffsetType &offset) |
| 100 |
|
{ this->SetTranslation( offset ); }; |
| 101 |
|
|
| 102 |
|
/** Get offset of the transform*/ |
| 103 |
|
const OffsetType & GetOffsetComponent(void) const |
| 104 |
|
{ return this->GetTranslation(); } |
| 105 |
|
|
| 106 |
|
protected: |
| 107 |
|
/** Construct an FixedCenterOfRotationAffineTransform object */ |
| 108 |
|
FixedCenterOfRotationAffineTransform(const MatrixType &matrix, |
| 109 |
|
const OutputVectorType &offset); |
| 110 |
|
FixedCenterOfRotationAffineTransform(unsigned int outputSpaceDimension, |
| 111 |
|
unsigned int parametersDimension); |
| 112 |
|
FixedCenterOfRotationAffineTransform(); |
| 113 |
|
|
| 114 |
|
/** Destroy an FixedCenterOfRotationAffineTransform object */ |
| 115 |
|
virtual ~FixedCenterOfRotationAffineTransform(); |
| 116 |
|
|
| 117 |
|
private: |
| 118 |
|
FixedCenterOfRotationAffineTransform(const Self & other); |
| 119 |
|
const Self & operator=( const Self & ); |
| 120 |
|
|
| 121 |
|
}; //class FixedCenterOfRotationAffineTransform |
| 122 |
|
|
| 123 |
|
} // namespace itk |
| 124 |
|
|
| 125 |
|
|
| 126 |
|
#ifndef ITK_MANUAL_INSTANTIATION |
| 127 |
|
#include "itkFixedCenterOfRotationAffineTransform.txx" |
| 128 |
|
#endif |
| 129 |
|
|
| 130 |
|
#endif /* __itkFixedCenterOfRotationAffineTransform_h */ |
| 131 |
|
|
| 132 |
EOF |
|
| 133 |
EOF,EML |
|
| 134 |
EOF,EML |
|
| 135 |
EOF,EML |
|
| 136 |
EOF,EML |
|