18 #ifndef __itkTranslationTransform_h
19 #define __itkTranslationTransform_h
44 class TScalarType = double,
46 unsigned int NDimensions = 3>
49 public Transform<TScalarType, NDimensions, NDimensions>
65 itkStaticConstMacro(SpaceDimension,
unsigned int, NDimensions);
66 itkStaticConstMacro(ParametersDimension,
unsigned int, NDimensions);
111 void SetParameters(
const ParametersType & parameters);
114 virtual const ParametersType & GetParameters(
void)
const;
121 m_Offset = offset;
return;
125 void Compose(
const Self *other,
bool pre = 0);
131 void Translate(
const OutputVectorType & offset,
bool pre = 0);
137 OutputPointType TransformPoint(
const InputPointType & point)
const;
139 using Superclass::TransformVector;
140 OutputVectorType TransformVector(
const InputVectorType & vector)
const;
142 OutputVnlVectorType TransformVector(
const InputVnlVectorType & vector)
const;
144 using Superclass::TransformCovariantVector;
145 OutputCovariantVectorType TransformCovariantVector(
const InputCovariantVectorType & vector)
const;
150 inline InputPointType BackTransform(
const OutputPointType & point)
const;
152 inline InputVectorType BackTransform(
const OutputVectorType & vector)
const;
154 inline InputVnlVectorType BackTransform(
const OutputVnlVectorType & vector)
const;
156 inline InputCovariantVectorType BackTransform(
const OutputCovariantVectorType & vector)
const;
162 bool GetInverse(Self *inverse)
const;
165 virtual InverseTransformBasePointer GetInverseTransform()
const;
168 virtual void ComputeJacobianWithRespectToParameters(
const InputPointType & point, JacobianType & j)
const;
174 virtual void ComputeJacobianWithRespectToPosition(
const InputPointType & x, JacobianType & jac)
const;
177 void SetIdentity(
void);
190 virtual bool IsLinear()
const
207 this->m_FixedParameters.
SetSize(0);
208 return this->m_FixedParameters;
216 void PrintSelf(std::ostream & os,
Indent indent)
const;
220 void operator=(
const Self &);
227 template <
class TScalarType,
unsigned int NDimensions>
232 return point - m_Offset;
236 template <
class TScalarType,
unsigned int NDimensions>
245 template <
class TScalarType,
unsigned int NDimensions>
254 template <
class TScalarType,
unsigned int NDimensions>
265 #define ITK_TEMPLATE_TranslationTransform(_, EXPORT, TypeX, TypeY) \
268 _( 2 ( class EXPORT TranslationTransform<ITK_TEMPLATE_2 TypeX> ) ) \
269 namespace Templates \
271 typedef TranslationTransform<ITK_TEMPLATE_2 TypeX> TranslationTransform##TypeY; \
275 #if ITK_TEMPLATE_EXPLICIT
276 #include "Templates/itkTranslationTransform+-.h"
280 #include "itkTranslationTransform.hxx"