18 #ifndef __itkAdvancedTranslationTransform_h
19 #define __itkAdvancedTranslationTransform_h
23 #include "itkExceptionObject.h"
24 #include "itkMatrix.h"
41 unsigned int NDimensions=3>
59 itkStaticConstMacro(SpaceDimension,
unsigned int, NDimensions);
60 itkStaticConstMacro(ParametersDimension,
unsigned int, NDimensions);
73 typedef Vector<TScalarType, itkGetStaticConstMacro(SpaceDimension)>
InputVectorType;
81 typedef vnl_vector_fixed<TScalarType, itkGetStaticConstMacro(SpaceDimension)>
InputVnlVectorType;
85 typedef Point<TScalarType, itkGetStaticConstMacro(SpaceDimension)>
InputPointType;
86 typedef Point<TScalarType, itkGetStaticConstMacro(SpaceDimension)>
OutputPointType;
89 typedef typename Superclass
92 typedef typename Superclass
95 typedef typename Superclass
107 void SetParameters(
const ParametersType & parameters);
110 virtual const ParametersType& GetParameters(
void)
const;
116 { m_Offset = offset;
return; }
119 void Compose(
const Self * other,
bool pre=0);
125 void Translate(
const OutputVectorType &offset,
bool pre=0);
131 OutputPointType TransformPoint(
const InputPointType &point )
const;
132 OutputVectorType TransformVector(
const InputVectorType &vector)
const;
133 OutputVnlVectorType TransformVector(
const InputVnlVectorType &vector)
const;
134 OutputCovariantVectorType TransformCovariantVector(
135 const InputCovariantVectorType &vector)
const;
140 inline InputPointType BackTransform(
const OutputPointType &point )
const;
141 inline InputVectorType BackTransform(
const OutputVectorType &vector)
const;
142 inline InputVnlVectorType BackTransform(
const OutputVnlVectorType &vector)
const;
143 inline InputCovariantVectorType BackTransform(
144 const OutputCovariantVectorType &vector)
const;
150 bool GetInverse(Self* inverse)
const;
153 virtual void GetJacobian(
154 const InputPointType &,
156 NonZeroJacobianIndicesType & )
const;
159 virtual void GetSpatialJacobian(
160 const InputPointType &,
161 SpatialJacobianType & )
const;
164 virtual void GetSpatialHessian(
165 const InputPointType &,
166 SpatialHessianType & )
const;
169 virtual void GetJacobianOfSpatialJacobian(
170 const InputPointType &,
171 JacobianOfSpatialJacobianType &,
172 NonZeroJacobianIndicesType & )
const;
175 virtual void GetJacobianOfSpatialJacobian(
176 const InputPointType &,
177 SpatialJacobianType &,
178 JacobianOfSpatialJacobianType &,
179 NonZeroJacobianIndicesType & )
const;
182 virtual void GetJacobianOfSpatialHessian(
183 const InputPointType &,
184 JacobianOfSpatialHessianType &,
185 NonZeroJacobianIndicesType & )
const;
190 virtual void GetJacobianOfSpatialHessian(
191 const InputPointType & ipp,
192 SpatialHessianType & sh,
193 JacobianOfSpatialHessianType & jsh,
194 NonZeroJacobianIndicesType & nonZeroJacobianIndices )
const;
197 void SetIdentity(
void);
201 {
return NDimensions; }
221 this->m_FixedParameters.SetSize(0);
222 return this->m_FixedParameters;
229 void PrintSelf(std::ostream &os, Indent indent)
const;
233 void operator=(
const Self&);
248 template<
class TScalarType,
unsigned int NDimensions>
253 return point - m_Offset;
260 template<
class TScalarType,
unsigned int NDimensions>
273 template<
class TScalarType,
unsigned int NDimensions>
284 template<
class TScalarType,
unsigned int NDimensions>
296 #define ITK_TEMPLATE_AdvancedTranslationTransform(_, EXPORT, x, y) namespace itk { \
297 _(2(class EXPORT AdvancedTranslationTransform< ITK_TEMPLATE_2 x >)) \
298 namespace Templates { typedef AdvancedTranslationTransform< ITK_TEMPLATE_2 x > AdvancedTranslationTransform##y; } \
301 #if ITK_TEMPLATE_EXPLICIT
302 # include "Templates/itkAdvancedTranslationTransform+-.h"
306 # include "itkAdvancedTranslationTransform.txx"