18 #ifndef itkMatrixOffsetTransformBase_h
19 #define itkMatrixOffsetTransformBase_h
105 template <
typename TParametersValueType =
double,
unsigned int VInputDimension = 3,
unsigned int VOutputDimension = 3>
107 :
public Transform<TParametersValueType, VInputDimension, VOutputDimension>
126 static constexpr
unsigned int InputSpaceDimension = VInputDimension;
127 static constexpr
unsigned int OutputSpaceDimension = VOutputDimension;
128 static constexpr
unsigned int ParametersDimension = VOutputDimension * (VInputDimension + 1);
131 using typename Superclass::FixedParametersType;
132 using typename Superclass::FixedParametersValueType;
133 using typename Superclass::ParametersType;
134 using typename Superclass::ParametersValueType;
137 using typename Superclass::JacobianType;
138 using typename Superclass::JacobianPositionType;
139 using typename Superclass::InverseJacobianPositionType;
142 using typename Superclass::TransformCategoryEnum;
145 using typename Superclass::ScalarType;
156 using typename Superclass::InputVectorPixelType;
157 using typename Superclass::OutputVectorPixelType;
160 using typename Superclass::InputDiffusionTensor3DType;
161 using typename Superclass::OutputDiffusionTensor3DType;
164 using typename Superclass::InputSymmetricSecondRankTensorType;
165 using typename Superclass::OutputSymmetricSecondRankTensorType;
214 TransformCategoryEnum
217 return Self::TransformCategoryEnum::Linear;
235 this->ComputeOffset();
236 this->ComputeMatrixParameters();
237 m_MatrixMTime.Modified();
250 virtual const MatrixType &
268 this->ComputeTranslation();
279 const OutputVectorType &
311 this->ComputeOffset();
323 const InputPointType &
338 m_Translation = translation;
339 this->ComputeOffset();
351 const OutputVectorType &
354 return m_Translation;
362 SetParameters(
const ParametersType & parameters)
override;
365 const ParametersType &
366 GetParameters()
const override;
370 SetFixedParameters(
const FixedParametersType &)
override;
373 const FixedParametersType &
374 GetFixedParameters()
const override;
388 Compose(
const Self * other,
bool pre =
false);
399 TransformPoint(
const InputPointType &
point)
const override;
401 using Superclass::TransformVector;
404 TransformVector(
const InputVectorType & vect)
const override;
407 TransformVector(
const InputVnlVectorType & vect)
const override;
409 OutputVectorPixelType
410 TransformVector(
const InputVectorPixelType & vect)
const override;
412 using Superclass::TransformCovariantVector;
414 OutputCovariantVectorType
415 TransformCovariantVector(
const InputCovariantVectorType & vec)
const override;
417 OutputVectorPixelType
418 TransformCovariantVector(
const InputVectorPixelType & vect)
const override;
420 using Superclass::TransformDiffusionTensor3D;
422 OutputDiffusionTensor3DType
423 TransformDiffusionTensor3D(
const InputDiffusionTensor3DType & tensor)
const override;
425 OutputVectorPixelType
426 TransformDiffusionTensor3D(
const InputVectorPixelType & tensor)
const override;
428 using Superclass::TransformSymmetricSecondRankTensor;
429 OutputSymmetricSecondRankTensorType
430 TransformSymmetricSecondRankTensor(
const InputSymmetricSecondRankTensorType & inputTensor)
const override;
432 OutputVectorPixelType
433 TransformSymmetricSecondRankTensor(
const InputVectorPixelType & inputTensor)
const override;
446 ComputeJacobianWithRespectToParameters(
const InputPointType & p, JacobianType & jacobian)
const override;
453 ComputeJacobianWithRespectToPosition(
const InputPointType & x, JacobianPositionType & jac)
const override;
454 using Superclass::ComputeJacobianWithRespectToPosition;
460 ComputeInverseJacobianWithRespectToPosition(
const InputPointType & x,
461 InverseJacobianPositionType & jac)
const override;
462 using Superclass::ComputeInverseJacobianWithRespectToPosition;
483 GetInverse(InverseTransformType * inverse)
const;
487 InverseTransformBasePointer
488 GetInverseTransform()
const override;
504 const InverseMatrixType &
505 GetInverseMatrix()
const;
515 #if !defined(ITK_LEGACY_REMOVE)
517 const OutputVectorType & offset);
527 PrintSelf(std::ostream & os,
Indent indent)
const override;
529 const InverseMatrixType &
532 return m_InverseMatrix;
537 m_InverseMatrix = matrix;
538 m_InverseMatrixMTime.Modified();
543 if (m_MatrixMTime != m_InverseMatrixMTime)
554 ComputeMatrixParameters();
563 m_MatrixMTime.Modified();
567 ComputeTranslation();
572 m_Translation = translation;
590 itkGetConstMacro(Singular,
bool);
596 mutable bool m_Singular{
false };
607 #ifndef ITK_MANUAL_INSTANTIATION
608 # include "itkMatrixOffsetTransformBase.hxx"