18 #ifndef itkTransform_h
19 #define itkTransform_h
26 #include "vnl/vnl_vector_fixed.h"
27 #include "vnl/vnl_matrix_fixed.h"
81 template <
typename TParametersValueType,
unsigned int NInputDimensions = 3,
unsigned int NOutputDimensions = 3>
98 static constexpr
unsigned int InputSpaceDimension = NInputDimensions;
99 static constexpr
unsigned int OutputSpaceDimension = NOutputDimensions;
108 return NInputDimensions;
115 return NOutputDimensions;
187 itkExceptionMacro(
"TransformVector(const InputVectorType &)"
188 "is unimplemented for "
189 << this->GetNameOfClass());
196 virtual OutputVectorType
197 TransformVector(
const InputVectorType & vector,
const InputPointType & point)
const;
200 virtual OutputVnlVectorType
203 itkExceptionMacro(
"TransformVector( const InputVnlVectorType & ) is "
205 << this->GetNameOfClass());
212 virtual OutputVnlVectorType
213 TransformVector(
const InputVnlVectorType & vector,
const InputPointType & point)
const;
216 virtual OutputVectorPixelType
219 itkExceptionMacro(
"TransformVector( const InputVectorPixelType & ) is "
221 << this->GetNameOfClass());
228 virtual OutputVectorPixelType
229 TransformVector(
const InputVectorPixelType & vector,
const InputPointType & point)
const;
232 virtual OutputCovariantVectorType
235 itkExceptionMacro(
"TransformCovariantVector( const InputCovariantVectorType & ) is "
237 << this->GetNameOfClass());
245 virtual OutputCovariantVectorType
246 TransformCovariantVector(
const InputCovariantVectorType & vector,
const InputPointType & point)
const;
250 virtual OutputVectorPixelType
253 itkExceptionMacro(
"TransformCovariantVector(const InputVectorPixelType &)"
254 "is unimplemented for "
255 << this->GetNameOfClass());
263 virtual OutputVectorPixelType
264 TransformCovariantVector(
const InputVectorPixelType & vector,
const InputPointType & point)
const;
267 virtual OutputDiffusionTensor3DType
270 itkExceptionMacro(
"TransformDiffusionTensor3D( const InputDiffusionTensor3DType & ) is "
272 << this->GetNameOfClass());
280 virtual OutputDiffusionTensor3DType
281 TransformDiffusionTensor3D(
const InputDiffusionTensor3DType & inputTensor,
const InputPointType & point)
const;
284 virtual OutputVectorPixelType
287 itkExceptionMacro(
"TransformDiffusionTensor( const InputVectorPixelType & ) is "
289 << this->GetNameOfClass());
292 virtual OutputVectorPixelType
293 TransformDiffusionTensor3D(
const InputVectorPixelType & inputTensor,
const InputPointType & point)
const;
300 virtual OutputSymmetricSecondRankTensorType
301 TransformSymmetricSecondRankTensor(
const InputSymmetricSecondRankTensorType & inputTensor,
302 const InputPointType & point)
const;
305 virtual OutputSymmetricSecondRankTensorType
308 itkExceptionMacro(
"TransformSymmetricSecondRankTensor( const InputSymmetricSecondRankTensorType & ) is "
310 << this->GetNameOfClass());
314 virtual OutputVectorPixelType
317 itkExceptionMacro(
"TransformSymmetricSecondRankTensor( const InputVectorPixelType & ) is "
319 << this->GetNameOfClass());
328 virtual OutputVectorPixelType
329 TransformSymmetricSecondRankTensor(
const InputVectorPixelType & inputTensor,
const InputPointType & point)
const;
339 SetParameters(
const ParametersType &)
override = 0;
351 this->SetParameters(p);
359 CopyInParameters(
const ParametersValueType *
const begin,
const ParametersValueType *
const end)
override;
366 CopyInFixedParameters(
const FixedParametersValueType *
const begin,
367 const FixedParametersValueType *
const end)
override;
370 const ParametersType &
378 SetFixedParameters(
const FixedParametersType &)
override = 0;
381 const FixedParametersType &
384 return m_FixedParameters;
395 UpdateTransformParameters(
const DerivativeType & update, ParametersValueType factor = 1.0);
405 virtual NumberOfParametersType
408 return this->GetNumberOfParameters();
412 NumberOfParametersType
415 return this->m_Parameters.Size();
419 virtual NumberOfParametersType
422 return this->m_FixedParameters.Size();
445 virtual InverseTransformBasePointer
453 GetTransformTypeAsString()
const override;
463 return Superclass::TransformCategoryEnum::UnknownTransformCategory;
469 return (this->GetTransformCategory() == Superclass::TransformCategoryEnum::Linear);
507 ComputeJacobianWithRespectToParameters(
const InputPointType & itkNotUsed(p),
508 JacobianType & itkNotUsed(jacobian))
const = 0;
517 this->ComputeJacobianWithRespectToParameters(p, jacobian);
530 itkExceptionMacro(
"ComputeJacobianWithRespectToPosition( InputPointType, JacobianType )"
531 " is unimplemented for "
532 << this->GetNameOfClass());
534 itkLegacyMacro(
virtual void ComputeJacobianWithRespectToPosition(
const InputPointType & x, JacobianType & jacobian)
545 ComputeInverseJacobianWithRespectToPosition(
const InputPointType & pnt, InverseJacobianPositionType & jacobian)
const;
546 itkLegacyMacro(
virtual void ComputeInverseJacobianWithRespectToPosition(
const InputPointType & x,
547 JacobianType & jacobian)
const);
557 InternalClone()
const override;
560 Transform(NumberOfParametersType numberOfParameters);
561 #if defined(__GNUC__)
569 ~Transform()
override =
default;
581 template <
typename TType>
585 std::string rval(
"other");
593 std::string rval(
"float");
601 std::string rval(
"double");
608 #ifndef ITK_MANUAL_INSTANTIATION
609 # include "itkTransform.hxx"