18 #ifndef itkMatrixOffsetTransformBase_h
19 #define itkMatrixOffsetTransformBase_h
96 template<
typename TParametersValueType=double,
97 unsigned int NInputDimensions = 3,
98 unsigned int NOutputDimensions = 3>
100 public Transform<TParametersValueType, NInputDimensions, NOutputDimensions>
119 itkStaticConstMacro(InputSpaceDimension,
unsigned int, NInputDimensions);
120 itkStaticConstMacro(OutputSpaceDimension,
unsigned int, NOutputDimensions);
121 itkStaticConstMacro( ParametersDimension,
unsigned int,
122 NOutputDimensions * ( NInputDimensions + 1 ) );
141 typedef Vector<TParametersValueType,
143 typedef Vector<TParametersValueType,
150 itkGetStaticConstMacro(InputSpaceDimension)>
153 itkGetStaticConstMacro(OutputSpaceDimension)>
161 typedef typename Superclass::InputDiffusionTensor3DType
163 typedef typename Superclass::OutputDiffusionTensor3DType
167 typedef typename Superclass::InputSymmetricSecondRankTensorType
169 typedef typename Superclass::OutputSymmetricSecondRankTensorType
176 typedef vnl_vector_fixed<TParametersValueType,
177 itkGetStaticConstMacro(InputSpaceDimension)>
179 typedef vnl_vector_fixed<TParametersValueType,
180 itkGetStaticConstMacro(OutputSpaceDimension)>
185 typedef Point<TParametersValueType,
186 itkGetStaticConstMacro(InputSpaceDimension)>
189 typedef Point<TParametersValueType,
190 itkGetStaticConstMacro(OutputSpaceDimension)>
196 typedef Matrix<TParametersValueType, itkGetStaticConstMacro(OutputSpaceDimension),
197 itkGetStaticConstMacro(InputSpaceDimension)>
203 typedef Matrix<TParametersValueType, itkGetStaticConstMacro(InputSpaceDimension),
204 itkGetStaticConstMacro(OutputSpaceDimension)>
224 virtual void SetIdentity();
247 m_Matrix = matrix; this->ComputeOffset();
248 this->ComputeMatrixParameters();
249 m_MatrixMTime.Modified(); this->Modified();
return;
275 m_Offset = offset; this->ComputeTranslation();
276 this->Modified();
return;
314 m_Center = center; this->ComputeOffset();
315 this->Modified();
return;
338 m_Translation = translation; this->ComputeOffset();
339 this->Modified();
return;
351 return m_Translation;
358 void SetParameters(
const ParametersType & parameters) ITK_OVERRIDE;
361 const ParametersType & GetParameters() const ITK_OVERRIDE;
364 virtual
void SetFixedParameters(const FixedParametersType &) ITK_OVERRIDE;
367 virtual const FixedParametersType & GetFixedParameters() const ITK_OVERRIDE;
380 void Compose(const Self *other,
bool pre = 0);
390 OutputPointType TransformPoint(const InputPointType & point) const ITK_OVERRIDE;
392 using Superclass::TransformVector;
394 OutputVectorType TransformVector(const InputVectorType & vector) const ITK_OVERRIDE;
396 OutputVnlVectorType TransformVector(const InputVnlVectorType & vector) const ITK_OVERRIDE;
398 OutputVectorPixelType TransformVector(const InputVectorPixelType & vector) const ITK_OVERRIDE;
400 using Superclass::TransformCovariantVector;
402 OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType & vector) const ITK_OVERRIDE;
404 OutputVectorPixelType TransformCovariantVector(const InputVectorPixelType & vector) const ITK_OVERRIDE;
406 using Superclass::TransformDiffusionTensor3D;
408 OutputDiffusionTensor3DType TransformDiffusionTensor3D(const InputDiffusionTensor3DType & tensor) const ITK_OVERRIDE;
410 OutputVectorPixelType TransformDiffusionTensor3D(const InputVectorPixelType & tensor ) const ITK_OVERRIDE;
412 using Superclass::TransformSymmetricSecondRankTensor;
413 OutputSymmetricSecondRankTensorType TransformSymmetricSecondRankTensor( const InputSymmetricSecondRankTensorType & tensor ) const ITK_OVERRIDE;
415 OutputVectorPixelType TransformSymmetricSecondRankTensor( const InputVectorPixelType & tensor ) const ITK_OVERRIDE;
426 virtual
void ComputeJacobianWithRespectToParameters(const InputPointType & x, JacobianType & j) const ITK_OVERRIDE;
431 virtual
void ComputeJacobianWithRespectToPosition(const InputPointType & x, JacobianType & jac) const ITK_OVERRIDE;
436 virtual
void ComputeInverseJacobianWithRespectToPosition(const InputPointType & x, JacobianType & jac) const ITK_OVERRIDE;
456 bool GetInverse(Self *inverse) const;
460 virtual InverseTransformBasePointer GetInverseTransform() const ITK_OVERRIDE;
467 virtual
bool IsLinear() const ITK_OVERRIDE
472 #if !defined(ITK_LEGACY_REMOVE)
481 const InverseMatrixType & GetInverseMatrix()
const;
500 virtual
void PrintSelf(std::ostream & s,
Indent indent) const ITK_OVERRIDE;
504 return m_InverseMatrix;
508 m_InverseMatrix = matrix; m_InverseMatrixMTime.Modified();
512 if( m_MatrixMTime != m_InverseMatrixMTime )
522 virtual void ComputeMatrixParameters();
524 virtual void ComputeMatrix();
528 m_Matrix = matrix; m_MatrixMTime.Modified();
531 virtual void ComputeTranslation();
535 m_Translation = translation;
538 virtual void ComputeOffset();
550 itkGetConstMacro(Singular,
bool);
554 const Self & operator=(
const Self &);
570 #ifndef ITK_MANUAL_INSTANTIATION
571 #include "itkMatrixOffsetTransformBase.hxx"
A templated class holding a M x N size Matrix.
Light weight base class for most itk classes.
A templated class holding a n-Dimensional vector.
TParametersValueType ValueType
Generate a unique, increasing time value.
Control indentation during Print() invocation.
static ITK_CONSTEXPR_VAR double e
The base of the natural logarithm or Euler's number
A templated class holding a geometric point in n-Dimensional space.
static double GetTolerance()
A templated class holding a n-Dimensional covariant vector.
static float GetTolerance()