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);
72 typedef Vector<TScalarType, itkGetStaticConstMacro(SpaceDimension)>
InputVectorType;
80 typedef vnl_vector_fixed<TScalarType, itkGetStaticConstMacro(SpaceDimension)>
InputVnlVectorType;
84 typedef Point<TScalarType, itkGetStaticConstMacro(SpaceDimension)>
InputPointType;
85 typedef Point<TScalarType, itkGetStaticConstMacro(SpaceDimension)>
OutputPointType;
88 typedef typename Superclass
91 typedef typename Superclass
94 typedef typename Superclass
106 void SetParameters(
const ParametersType & parameters);
109 virtual const ParametersType& GetParameters(
void)
const;
115 { m_Offset = offset;
return; }
118 void Compose(
const Self * other,
bool pre=0);
124 void Translate(
const OutputVectorType &offset,
bool pre=0);
130 OutputPointType TransformPoint(
const InputPointType &point )
const;
131 OutputVectorType TransformVector(
const InputVectorType &vector)
const;
132 OutputVnlVectorType TransformVector(
const InputVnlVectorType &vector)
const;
133 OutputCovariantVectorType TransformCovariantVector(
134 const InputCovariantVectorType &vector)
const;
139 inline InputPointType BackTransform(
const OutputPointType &point )
const;
140 inline InputVectorType BackTransform(
const OutputVectorType &vector)
const;
141 inline InputVnlVectorType BackTransform(
const OutputVnlVectorType &vector)
const;
142 inline InputCovariantVectorType BackTransform(
143 const OutputCovariantVectorType &vector)
const;
149 bool GetInverse(Self* inverse)
const;
152 virtual const JacobianType & GetJacobian(
const InputPointType &point )
const;
155 virtual void GetJacobian(
156 const InputPointType &,
158 NonZeroJacobianIndicesType & )
const;
161 virtual void GetSpatialJacobian(
162 const InputPointType &,
163 SpatialJacobianType & )
const;
166 virtual void GetSpatialHessian(
167 const InputPointType &,
168 SpatialHessianType & )
const;
171 virtual void GetJacobianOfSpatialJacobian(
172 const InputPointType &,
173 JacobianOfSpatialJacobianType &,
174 NonZeroJacobianIndicesType & )
const;
177 virtual void GetJacobianOfSpatialJacobian(
178 const InputPointType &,
179 SpatialJacobianType &,
180 JacobianOfSpatialJacobianType &,
181 NonZeroJacobianIndicesType & )
const;
184 virtual void GetJacobianOfSpatialHessian(
185 const InputPointType &,
186 JacobianOfSpatialHessianType &,
187 NonZeroJacobianIndicesType & )
const;
192 virtual void GetJacobianOfSpatialHessian(
193 const InputPointType & ipp,
194 SpatialHessianType & sh,
195 JacobianOfSpatialHessianType & jsh,
196 NonZeroJacobianIndicesType & nonZeroJacobianIndices )
const;
199 void SetIdentity(
void);
203 {
return NDimensions; }
223 this->m_FixedParameters.SetSize(0);
224 return this->m_FixedParameters;
231 void PrintSelf(std::ostream &os, Indent indent)
const;
235 void operator=(
const Self&);
249 template<
class TScalarType,
unsigned int NDimensions>
254 return point - m_Offset;
261 template<
class TScalarType,
unsigned int NDimensions>
274 template<
class TScalarType,
unsigned int NDimensions>
285 template<
class TScalarType,
unsigned int NDimensions>
297 #define ITK_TEMPLATE_AdvancedTranslationTransform(_, EXPORT, x, y) namespace itk { \
298 _(2(class EXPORT AdvancedTranslationTransform< ITK_TEMPLATE_2 x >)) \
299 namespace Templates { typedef AdvancedTranslationTransform< ITK_TEMPLATE_2 x > AdvancedTranslationTransform##y; } \
302 #if ITK_TEMPLATE_EXPLICIT
303 # include "Templates/itkAdvancedTranslationTransform+-.h"
307 # include "itkAdvancedTranslationTransform.txx"