| 1 |
|
/*========================================================================= |
| 2 |
|
|
| 3 |
|
Program: Insight Segmentation & Registration Toolkit |
| 4 |
|
Module: $RCSfile: itkCenteredEuler3DTransform.h.html,v $ |
| 5 |
|
Language: C++ |
| 6 |
|
Date: $Date: 2006/01/17 19:15:33 $ |
| 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 |
|
#ifndef __itkCenteredEuler3DTransform_h |
| 18 |
|
#define __itkCenteredEuler3DTransform_h |
| 19 |
|
|
| 20 |
|
#include <iostream> |
| 21 |
|
#include "itkEuler3DTransform.h" |
| 22 |
|
#include "itkExceptionObject.h" |
| 23 |
|
#include "itkMatrix.h" |
| 24 |
|
#include "itkVersor.h" |
| 25 |
|
|
| 26 |
|
namespace itk |
| 27 |
|
{ |
| 28 |
|
|
| 29 |
|
/** \brief CenteredEuler3DTransform of a vector space (e.g. space coordinates) |
| 30 |
|
* |
| 31 |
|
* This transform applies a rotation about a specific coordinate or |
| 32 |
|
* centre of rotation followed by a translation. |
| 33 |
|
* |
| 34 |
|
* \ingroup Transforms |
| 35 |
|
*/ |
| 36 |
|
template < class TScalarType=double > // Data type for scalars |
| 37 |
MCM |
class ITK_EXPORT CenteredEuler3DTransform : |
| 38 |
IND |
********public Euler3DTransform< TScalarType > |
| 39 |
|
{ |
| 40 |
|
public: |
| 41 |
|
/** Standard class typedefs. */ |
| 42 |
|
typedef CenteredEuler3DTransform Self; |
| 43 |
TDA |
typedef Euler3DTransform< TScalarType > Superclass; |
| 44 |
TDA |
typedef SmartPointer<Self> Pointer; |
| 45 |
TDA |
typedef SmartPointer<const Self> ConstPointer; |
| 46 |
|
|
| 47 |
|
/** Run-time type information (and related methods). */ |
| 48 |
|
itkTypeMacro( CenteredEuler3DTransform, Euler3DTransform ); |
| 49 |
|
|
| 50 |
|
/** New macro for creation of through a Smart Pointer */ |
| 51 |
|
itkNewMacro( Self ); |
| 52 |
|
|
| 53 |
|
/** Dimension of the space. */ |
| 54 |
|
itkStaticConstMacro(SpaceDimension, unsigned int, 3); |
| 55 |
|
itkStaticConstMacro(InputSpaceDimension, unsigned int, 3); |
| 56 |
|
itkStaticConstMacro(OutputSpaceDimension, unsigned int, 3); |
| 57 |
|
itkStaticConstMacro(ParametersDimension, unsigned int, 9); |
| 58 |
|
|
| 59 |
|
typedef typename Superclass::ParametersType ParametersType; |
| 60 |
|
typedef typename Superclass::JacobianType JacobianType; |
| 61 |
|
typedef typename Superclass::ScalarType ScalarType; |
| 62 |
|
typedef typename Superclass::InputVectorType InputVectorType; |
| 63 |
|
typedef typename Superclass::OutputVectorType OutputVectorType; |
| 64 |
|
typedef typename Superclass::InputCovariantVectorType |
| 65 |
TDA,IND |
*****************************************************InputCovariantVectorType; |
| 66 |
|
typedef typename Superclass::OutputCovariantVectorType |
| 67 |
TDA,IND |
*****************************************************OutputCovariantVectorType; |
| 68 |
|
typedef typename Superclass::InputVnlVectorType InputVnlVectorType; |
| 69 |
|
typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType; |
| 70 |
|
typedef typename Superclass::InputPointType InputPointType; |
| 71 |
|
typedef typename Superclass::OutputPointType OutputPointType; |
| 72 |
|
typedef typename Superclass::MatrixType MatrixType; |
| 73 |
|
typedef typename Superclass::InverseMatrixType InverseMatrixType; |
| 74 |
|
typedef typename Superclass::CenterType CenterType; |
| 75 |
|
typedef typename Superclass::TranslationType TranslationType; |
| 76 |
|
typedef typename Superclass::OffsetType OffsetType; |
| 77 |
|
|
| 78 |
|
/** Set the transformation from a container of parameters |
| 79 |
|
* This is typically used by optimizers. |
| 80 |
|
* There are six parameters. The first three represent the |
| 81 |
|
* rotation and the last three represent the translation. */ |
| 82 |
|
void SetParameters( const ParametersType & parameters ); |
| 83 |
|
|
| 84 |
|
/** Get the parameters that uniquely define the transform |
| 85 |
|
* This is typically used by optimizers. |
| 86 |
|
* There are six parameters. The first three represent the |
| 87 |
|
* rotation and the last three represent the translation. */ |
| 88 |
|
const ParametersType & GetParameters( void ) const; |
| 89 |
|
|
| 90 |
|
/** This method computes the Jacobian matrix of the transformation. |
| 91 |
|
* given point or vector, returning the transformed point or |
| 92 |
|
* vector. The rank of the Jacobian will also indicate if the |
| 93 |
|
* transform is invertible at this point. */ |
| 94 |
|
const JacobianType & GetJacobian(const InputPointType &point ) const; |
| 95 |
|
|
| 96 |
|
protected: |
| 97 |
|
CenteredEuler3DTransform(); |
| 98 |
|
CenteredEuler3DTransform(unsigned int SpaceDimension, |
| 99 |
|
unsigned int ParametersDimension); |
| 100 |
|
CenteredEuler3DTransform(const MatrixType & matrix, |
| 101 |
|
const OutputVectorType & offset); |
| 102 |
|
~CenteredEuler3DTransform(); |
| 103 |
|
|
| 104 |
|
/** |
| 105 |
|
* Print contents of an CenteredEuler3DTransform |
| 106 |
|
**/ |
| 107 |
|
void PrintSelf(std::ostream &os, Indent indent) const; |
| 108 |
|
|
| 109 |
|
private: |
| 110 |
|
CenteredEuler3DTransform(const Self&); //purposely not implemented |
| 111 |
|
void operator=(const Self&); //purposely not implemented |
| 112 |
|
|
| 113 |
|
}; //class CenteredEuler3DTransform |
| 114 |
|
|
| 115 |
|
|
| 116 |
|
} // namespace itk |
| 117 |
|
|
| 118 |
|
|
| 119 |
|
#ifndef ITK_MANUAL_INSTANTIATION |
| 120 |
|
#include "itkCenteredEuler3DTransform.txx" |
| 121 |
|
#endif |
| 122 |
|
|
| 123 |
|
#endif /* __itkCenteredEuler3DTransform_h */ |
| 124 |
|
|