18 #ifndef itkTransform_h
19 #define itkTransform_h
26 #include "vnl/vnl_vector_fixed.h"
79 template<
typename TParametersValueType,
80 unsigned int NInputDimensions = 3,
81 unsigned int NOutputDimensions = 3>
95 itkStaticConstMacro(InputSpaceDimension,
unsigned int, NInputDimensions);
96 itkStaticConstMacro(OutputSpaceDimension,
unsigned int, NOutputDimensions);
105 return NInputDimensions;
111 return NOutputDimensions;
167 typedef Matrix<TParametersValueType,
168 itkGetStaticConstMacro(OutputSpaceDimension),
172 itkGetStaticConstMacro(OutputSpaceDimension),
173 itkGetStaticConstMacro(OutputSpaceDimension)>
176 itkGetStaticConstMacro(InputSpaceDimension),
177 itkGetStaticConstMacro(InputSpaceDimension)>
180 itkGetStaticConstMacro(OutputSpaceDimension),
181 itkGetStaticConstMacro(InputSpaceDimension)>
195 itkExceptionMacro(
"TransformVector(const InputVectorType &)"
196 "is unimplemented for " << this->GetNameOfClass() );
203 virtual OutputVectorType TransformVector(
204 const InputVectorType & vector,
205 const InputPointType & point )
const;
210 itkExceptionMacro(
"TransformVector( const InputVnlVectorType & ) is "
211 "unimplemented for " << this->GetNameOfClass() );
218 virtual OutputVnlVectorType TransformVector(
219 const InputVnlVectorType & vector,
220 const InputPointType & point )
const;
226 itkExceptionMacro(
"TransformVector( const InputVectorPixelType & ) is "
227 "unimplemented for " << this->GetNameOfClass() );
234 virtual OutputVectorPixelType TransformVector(
235 const InputVectorPixelType & vector,
236 const InputPointType & point )
const;
241 itkExceptionMacro(
"TransformCovariantVector( const InputCovariantVectorType & ) is "
242 "unimplemented for " << this->GetNameOfClass() );
250 virtual OutputCovariantVectorType TransformCovariantVector(
251 const InputCovariantVectorType & vector,
252 const InputPointType & point )
const;
259 itkExceptionMacro(
"TransformCovariantVector(const InputVectorPixelType &)"
260 "is unimplemented for " << this->GetNameOfClass() );
268 virtual OutputVectorPixelType TransformCovariantVector(
269 const InputVectorPixelType & vector,
270 const InputPointType & point )
const;
278 "TransformDiffusionTensor3D( const InputDiffusionTensor3DType & ) is "
279 "unimplemented for " << this->GetNameOfClass() );
287 virtual OutputDiffusionTensor3DType TransformDiffusionTensor3D(
288 const InputDiffusionTensor3DType & tensor,
289 const InputPointType & point )
const;
296 "TransformDiffusionTensor( const InputVectorPixelType & ) is "
297 "unimplemented for " << this->GetNameOfClass() );
300 virtual OutputVectorPixelType TransformDiffusionTensor3D(
301 const InputVectorPixelType & tensor,
302 const InputPointType & point )
const;
309 virtual OutputSymmetricSecondRankTensorType TransformSymmetricSecondRankTensor(
310 const InputSymmetricSecondRankTensorType & tensor,
311 const InputPointType & point )
const;
318 "TransformSymmetricSecondRankTensor( const InputSymmetricSecondRankTensorType & ) is "
319 "unimplemented for " << this->GetNameOfClass() );
327 "TransformSymmetricSecondRankTensor( const InputVectorPixelType & ) is "
328 "unimplemented for " << this->GetNameOfClass() );
337 virtual OutputVectorPixelType TransformSymmetricSecondRankTensor(
338 const InputVectorPixelType & tensor,
339 const InputPointType & point )
const;
348 virtual void SetParameters(
const ParametersType &) ITK_OVERRIDE = 0;
359 this->SetParameters(p);
366 virtual void CopyInParameters(
const ParametersValueType *
const begin,
367 const ParametersValueType *
const end) ITK_OVERRIDE;
373 virtual void CopyInFixedParameters(
const FixedParametersValueType *
const begin,
374 const FixedParametersValueType *
const end) ITK_OVERRIDE;
383 virtual void SetFixedParameters(
const FixedParametersType &) ITK_OVERRIDE = 0;
388 return m_FixedParameters;
398 virtual void UpdateTransformParameters(
const DerivativeType & update,
399 ParametersValueType factor = 1.0 );
411 return this->GetNumberOfParameters();
417 return this->m_Parameters.Size();
423 return this->m_FixedParameters.Size();
451 virtual std::string GetTransformTypeAsString() const ITK_OVERRIDE;
458 virtual TransformCategoryType GetTransformCategory() const ITK_OVERRIDE
460 return Superclass::UnknownTransformCategory;
465 return ( this->GetTransformCategory() == Superclass::Linear );
469 #ifdef ITKV3_COMPATIBILITY
481 virtual const JacobianType & GetJacobian(
const InputPointType & x)
const
483 this->ComputeJacobianWithRespectToParameters(x, m_SharedLocalJacobian);
484 return m_SharedLocalJacobian;
524 virtual void ComputeJacobianWithRespectToParameters(
const InputPointType & itkNotUsed(p), JacobianType & itkNotUsed(jacobian) )
const = 0;
529 this->ComputeJacobianWithRespectToParameters(p, jacobian);
541 "ComputeJacobianWithRespectToPosition( InputPointType, JacobianType"
542 " is unimplemented for " << this->GetNameOfClass() );
551 virtual void ComputeInverseJacobianWithRespectToPosition(
const InputPointType & x, JacobianType & jacobian )
const;
562 Transform(NumberOfParametersType NumberOfParameters);
571 #ifdef ITKV3_COMPATIBILITY
583 template <
typename TType>
586 std::string rval(
"other");
593 std::string rval(
"float");
600 std::string rval(
"double");
608 #ifndef ITK_MANUAL_INSTANTIATION
609 #include "itkTransform.hxx"
Array class with size defined at construction time.
A templated class holding a M x N size Matrix.
Light weight base class for most itk classes.
Represent a symmetric tensor of second rank.
Represents an array whose length can be defined at run-time.
Array2D class representing a 2D array with size defined at construction time.
A templated class holding a n-Dimensional vector.
Class to hold and manage different parameter types used during optimization.
A templated class holding a geometric point in n-Dimensional space.
Represent a diffusion tensor as used in DTI images.
A templated class holding a n-Dimensional covariant vector.