35 #ifndef __itkAdvancedTranslationTransform_h 36 #define __itkAdvancedTranslationTransform_h 40 #include "itkExceptionObject.h" 41 #include "itkMatrix.h" 54 class TScalarType =
double,
55 unsigned int NDimensions = 3 >
56 class ITK_EXPORT AdvancedTranslationTransform :
57 public AdvancedTransform< TScalarType, NDimensions, NDimensions >
74 itkStaticConstMacro( SpaceDimension,
unsigned int, NDimensions );
75 itkStaticConstMacro( ParametersDimension,
unsigned int, NDimensions );
88 typedef Vector< TScalarType, itkGetStaticConstMacro( SpaceDimension ) >
InputVectorType;
89 typedef Vector< TScalarType, itkGetStaticConstMacro( SpaceDimension ) >
OutputVectorType;
96 typedef vnl_vector_fixed< TScalarType, itkGetStaticConstMacro( SpaceDimension ) >
InputVnlVectorType;
97 typedef vnl_vector_fixed< TScalarType, itkGetStaticConstMacro( SpaceDimension ) >
OutputVnlVectorType;
100 typedef Point< TScalarType, itkGetStaticConstMacro( SpaceDimension ) >
InputPointType;
101 typedef Point< TScalarType, itkGetStaticConstMacro( SpaceDimension ) >
OutputPointType;
104 typedef typename Superclass
107 typedef typename Superclass
110 typedef typename Superclass
122 void SetParameters(
const ParametersType & parameters );
125 virtual const ParametersType & GetParameters(
void )
const;
131 { m_Offset = offset;
return; }
134 void Compose(
const Self * other,
bool pre = 0 );
140 void Translate(
const OutputVectorType & offset,
bool pre = 0 );
146 OutputPointType TransformPoint(
const InputPointType & point )
const;
148 OutputVectorType TransformVector(
const InputVectorType & vector )
const;
150 OutputVnlVectorType TransformVector(
const InputVnlVectorType & vector )
const;
152 OutputCovariantVectorType TransformCovariantVector(
153 const InputCovariantVectorType & vector )
const;
158 inline InputPointType BackTransform(
const OutputPointType & point )
const;
160 inline InputVectorType BackTransform(
const OutputVectorType & vector )
const;
162 inline InputVnlVectorType BackTransform(
const OutputVnlVectorType & vector )
const;
164 inline InputCovariantVectorType BackTransform(
165 const OutputCovariantVectorType & vector )
const;
171 bool GetInverse( Self * inverse )
const;
174 virtual void GetJacobian(
175 const InputPointType &,
177 NonZeroJacobianIndicesType & )
const;
180 virtual void GetSpatialJacobian(
181 const InputPointType &,
182 SpatialJacobianType & )
const;
185 virtual void GetSpatialHessian(
186 const InputPointType &,
187 SpatialHessianType & )
const;
190 virtual void GetJacobianOfSpatialJacobian(
191 const InputPointType &,
192 JacobianOfSpatialJacobianType &,
193 NonZeroJacobianIndicesType & )
const;
196 virtual void GetJacobianOfSpatialJacobian(
197 const InputPointType &,
198 SpatialJacobianType &,
199 JacobianOfSpatialJacobianType &,
200 NonZeroJacobianIndicesType & )
const;
203 virtual void GetJacobianOfSpatialHessian(
204 const InputPointType &,
205 JacobianOfSpatialHessianType &,
206 NonZeroJacobianIndicesType & )
const;
211 virtual void GetJacobianOfSpatialHessian(
212 const InputPointType & ipp,
213 SpatialHessianType & sh,
214 JacobianOfSpatialHessianType & jsh,
215 NonZeroJacobianIndicesType & nonZeroJacobianIndices )
const;
218 void SetIdentity(
void );
222 {
return NDimensions; }
242 this->m_FixedParameters.SetSize( 0 );
243 return this->m_FixedParameters;
252 void PrintSelf( std::ostream & os, Indent indent )
const;
257 void operator=(
const Self & );
259 OutputVectorType m_Offset;
261 JacobianType m_LocalJacobian;
262 SpatialJacobianType m_SpatialJacobian;
263 SpatialHessianType m_SpatialHessian;
264 NonZeroJacobianIndicesType m_NonZeroJacobianIndices;
265 JacobianOfSpatialJacobianType m_JacobianOfSpatialJacobian;
266 JacobianOfSpatialHessianType m_JacobianOfSpatialHessian;
273 template<
class TScalarType,
unsigned int NDimensions >
279 return point - m_Offset;
284 template<
class TScalarType,
unsigned int NDimensions >
295 template<
class TScalarType,
unsigned int NDimensions >
306 template<
class TScalarType,
unsigned int NDimensions >
318 #ifndef ITK_MANUAL_INSTANTIATION 319 #include "itkAdvancedTranslationTransform.txx"