go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itk::AffineDTI3DTransform< TScalarType > Class Template Reference

#include <itkAffineDTI3DTransform.h>

Detailed Description

template<class TScalarType = double>
class itk::AffineDTI3DTransform< TScalarType >

AffineDTI3DTransform of a vector space (e.g. space coordinates)

This transform applies an affine transformation, but is parameterized by angles, shear factors, scales, and translation, instead of by the affine matrix. It is meant for registration of MR diffusion weighted images, but could be used for other images as well of course.

The affine model is adopted from the following paper: [1] A. Leemans and D.K. Jones. "The B-matrix must be rotated when correcting for subject motion in DTI data". Magnetic Resonance in Medicine, Volume 61, Issue 6, pages 1336 - 1349, 2009.

The model is as follows:
T(x) = R G S (x-c) + t + c
with:

  • R = Rx Ry Rz (rotation matrices)
  • G = Gx Gy Gz (shear matrices)
  • S = diag( [sx sy sz] ) (scaling matrix)
  • c = center of rotation
  • t = translation See [1] for exact expressions for Rx, Gx etc.

Using this model, the rotation components can be easily extracted an applied to the B-matrix.

The parameters are ordered as follows: in 2D: [ Angle ShearX ShearY ScaleX ScaleY TranslationX TranslationY ] in 3D: [ AngleX AngleY AngleZ ShearX ShearY ShearZ ScaleX ScaleY ScaleZ TranslationX TranslationY TranslationZ ]

The serialization of the fixed parameters is an array of 2 elements defining the center of rotation.

This transform applies an affine transformation, but is parameterized by angles, shear factors, scales, and translation, instead of by the affine matrix. It is meant for registration of MR diffusion weighted images, but could be used for other images as well of course.

The affine model is adopted from the following paper: [1] A. Leemans and D.K. Jones. "The B-matrix must be rotated when correcting for subject motion in DTI data". Magnetic Resonance in Medicine, Volume 61, Issue 6, pages 1336 - 1349, 2009.

The model is as follows:
T(x) = R G S (x-c) + t + c
with:

  • R = Rx Ry Rz (rotation matrices)
  • G = Gx Gy Gz (shear matrices)
  • S = diag( [sx sy sz] ) (scaling matrix)
  • c = center of rotation
  • t = translation See [1] for exact expressions for Rx, Gx etc.

Using this model, the rotation components can be easily extracted an applied to the B-matrix.

The parameters are ordered as follows: [ AngleX AngleY AngleZ ShearX ShearY ShearZ ScaleX ScaleY ScaleZ TranslationX TranslationY TranslationZ ]

The serialization of the fixed parameters is an array of 3 elements defining the center of rotation.

Definition at line 78 of file itkAffineDTI3DTransform.h.

Inheritance diagram for itk::AffineDTI3DTransform< TScalarType >:

Public Types

using AngleType = typename Superclass::ScalarType
 
using CenterType
 
using ConstPointer = SmartPointer<const Self>
 
using InverseMatrixType
 
using MatrixType
 
using OffsetType
 
using Pointer = SmartPointer<Self>
 
using ScalarArrayType = FixedArray<ScalarType>
 
using Self = AffineDTI3DTransform
 
using Superclass = AdvancedMatrixOffsetTransformBase<TScalarType, 3, 3>
 
using TranslationType
 
- Public Types inherited from itk::AdvancedMatrixOffsetTransformBase< double, 3, 3 >
using CenterType
 
using ConstPointer
 
using InverseMatrixType
 
using MatrixType
 
using OffsetType
 
using Pointer
 
using Self
 
using Superclass
 
using TranslationType
 
- Public Types inherited from itk::AdvancedTransform< double, NInputDimensions, NOutputDimensions >
using ConstPointer
 
using InternalMatrixType
 
using InverseTransformBaseType
 
using JacobianOfSpatialHessianType
 
using JacobianOfSpatialJacobianType
 
using MovingImageGradientType
 
using MovingImageGradientValueType
 
using NonZeroJacobianIndicesType
 
using Pointer
 
using Self
 
using SpatialHessianType
 
using SpatialJacobianType
 
using Superclass
 
using TransformType
 
using TransformTypeConstPointer
 
using TransformTypePointer
 

Public Member Functions

virtual const char * GetClassName () const
 
void GetJacobian (const InputPointType &, JacobianType &, NonZeroJacobianIndicesType &) const override
 
const ParametersType & GetParameters () const override
 
 ITK_DISALLOW_COPY_AND_MOVE (AffineDTI3DTransform)
 
 itkStaticConstMacro (InputSpaceDimension, unsigned int, 3)
 
 itkStaticConstMacro (OutputSpaceDimension, unsigned int, 3)
 
 itkStaticConstMacro (ParametersDimension, unsigned int, 12)
 
 itkStaticConstMacro (SpaceDimension, unsigned int, 3)
 
void SetIdentity () override
 
void SetParameters (const ParametersType &parameters) override
 
- Public Member Functions inherited from itk::AdvancedMatrixOffsetTransformBase< double, 3, 3 >
const InputPointType & GetCenter () const
 
const FixedParametersType & GetFixedParameters () const override
 
void GetJacobianOfSpatialHessian (const InputPointType &, JacobianOfSpatialHessianType &, NonZeroJacobianIndicesType &) const override
 
void GetJacobianOfSpatialHessian (const InputPointType &inputPoint, SpatialHessianType &sh, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override
 
void GetJacobianOfSpatialJacobian (const InputPointType &, JacobianOfSpatialJacobianType &, NonZeroJacobianIndicesType &) const override
 
void GetJacobianOfSpatialJacobian (const InputPointType &, SpatialJacobianType &, JacobianOfSpatialJacobianType &, NonZeroJacobianIndicesType &) const override
 
const MatrixTypeGetMatrix () const
 
const ParametersType & GetParameters () const override
 
void GetSpatialHessian (const InputPointType &, SpatialHessianType &) const override
 
void GetSpatialJacobian (const InputPointType &, SpatialJacobianType &) const override
 
TransformCategoryEnum GetTransformCategory () const override
 
const OutputVectorType & GetTranslation () const
 
bool IsLinear () const override
 
 itkStaticConstMacro (InputSpaceDimension, unsigned int, NInputDimensions)
 
 itkStaticConstMacro (OutputSpaceDimension, unsigned int, NOutputDimensions)
 
 itkStaticConstMacro (ParametersDimension, unsigned int, NOutputDimensions *(NInputDimensions+1))
 
void SetCenter (const InputPointType &center)
 
void SetFixedParameters (const FixedParametersType &) override
 
virtual void SetMatrix (const MatrixType &matrix)
 
void SetParameters (const ParametersType &parameters) override
 
void SetTranslation (const OutputVectorType &translation)
 
OutputCovariantVectorType TransformCovariantVector (const InputCovariantVectorType &vector) const override
 
OutputPointType TransformPoint (const InputPointType &point) const override
 
OutputVectorType TransformVector (const InputVectorType &vector) const override
 
OutputVnlVectorType TransformVector (const InputVnlVectorType &vector) const override
 
- Public Member Functions inherited from itk::AdvancedTransform< double, NInputDimensions, NOutputDimensions >
void ComputeJacobianWithRespectToParameters (const InputPointType &, JacobianType &) const override
 
virtual void EvaluateJacobianWithImageGradientProduct (const InputPointType &inputPoint, const MovingImageGradientType &movingImageGradient, DerivativeType &imageJacobian, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const
 
virtual bool GetHasNonZeroJacobianOfSpatialHessian () const
 
virtual bool GetHasNonZeroSpatialHessian () const
 
virtual NumberOfParametersType GetNumberOfNonZeroJacobianIndices () const
 
 ITK_DISALLOW_COPY_AND_MOVE (AdvancedTransform)
 
 itkStaticConstMacro (InputSpaceDimension, unsigned int, NInputDimensions)
 
 itkStaticConstMacro (OutputSpaceDimension, unsigned int, NOutputDimensions)
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::AdvancedMatrixOffsetTransformBase< double, 3, 3 >
static Pointer New ()
 

Protected Member Functions

 AffineDTI3DTransform ()
 
 AffineDTI3DTransform (const MatrixType &matrix, const OutputPointType &offset)
 
 AffineDTI3DTransform (unsigned int outputSpaceDims, unsigned int paramsSpaceDims)
 
void ComputeMatrix () override
 
void ComputeMatrixParameters () override
 
virtual void PrecomputeJacobianOfSpatialJacobian ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
void SetVarAngleScaleShear (ScalarArrayType angle, ScalarArrayType shear, ScalarArrayType scale)
 
 ~AffineDTI3DTransform () override=default
 
- Protected Member Functions inherited from itk::AdvancedMatrixOffsetTransformBase< double, 3, 3 >
 AdvancedMatrixOffsetTransformBase (const unsigned int paramDims=ParametersDimension)
 
virtual void ComputeOffset ()
 
void ComputeTranslation ()
 
const OutputVectorType & GetOffset () const
 
void PrintSelf (std::ostream &s, Indent indent) const override
 
void SetVarMatrix (const MatrixType &matrix)
 
void SetVarTranslation (const OutputVectorType &translation)
 
 ~AdvancedMatrixOffsetTransformBase () override=default
 
- Protected Member Functions inherited from itk::AdvancedTransform< double, NInputDimensions, NOutputDimensions >
 AdvancedTransform ()=default
 
 ~AdvancedTransform () override=default
 

Private Attributes

ScalarArrayType m_Angle {}
 
ScalarArrayType m_Scale {}
 
ScalarArrayType m_Shear {}
 

Additional Inherited Members

- Protected Attributes inherited from itk::AdvancedMatrixOffsetTransformBase< double, 3, 3 >
JacobianOfSpatialHessianType m_JacobianOfSpatialHessian
 
JacobianOfSpatialJacobianType m_JacobianOfSpatialJacobian
 
NonZeroJacobianIndicesType m_NonZeroJacobianIndices
 
SpatialHessianType m_SpatialHessian
 
- Protected Attributes inherited from itk::AdvancedTransform< double, NInputDimensions, NOutputDimensions >
bool m_HasNonZeroJacobianOfSpatialHessian
 
bool m_HasNonZeroSpatialHessian
 

Member Typedef Documentation

◆ AngleType

template<class TScalarType = double>
using itk::AffineDTI3DTransform< TScalarType >::AngleType = typename Superclass::ScalarType

Definition at line 118 of file itkAffineDTI3DTransform.h.

◆ CenterType

template<class TScalarType = double>
using itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::CenterType

Typedefs.

Definition at line 147 of file itkAdvancedMatrixOffsetTransformBase.h.

◆ ConstPointer

template<class TScalarType = double>
using itk::AffineDTI3DTransform< TScalarType >::ConstPointer = SmartPointer<const Self>

Definition at line 87 of file itkAffineDTI3DTransform.h.

◆ InverseMatrixType

template<class TScalarType = double>
using itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::InverseMatrixType

Standard inverse matrix type for this class.

Definition at line 144 of file itkAdvancedMatrixOffsetTransformBase.h.

◆ MatrixType

template<class TScalarType = double>
using itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::MatrixType

Standard matrix type for this class.

Definition at line 141 of file itkAdvancedMatrixOffsetTransformBase.h.

◆ OffsetType

template<class TScalarType = double>
using itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::OffsetType

Definition at line 148 of file itkAdvancedMatrixOffsetTransformBase.h.

◆ Pointer

template<class TScalarType = double>
using itk::AffineDTI3DTransform< TScalarType >::Pointer = SmartPointer<Self>

Definition at line 86 of file itkAffineDTI3DTransform.h.

◆ ScalarArrayType

template<class TScalarType = double>
using itk::AffineDTI3DTransform< TScalarType >::ScalarArrayType = FixedArray<ScalarType>

Definition at line 127 of file itkAffineDTI3DTransform.h.

◆ Self

template<class TScalarType = double>
using itk::AffineDTI3DTransform< TScalarType >::Self = AffineDTI3DTransform

Standard class typedefs.

Definition at line 84 of file itkAffineDTI3DTransform.h.

◆ Superclass

template<class TScalarType = double>
using itk::AffineDTI3DTransform< TScalarType >::Superclass = AdvancedMatrixOffsetTransformBase<TScalarType, 3, 3>

Definition at line 85 of file itkAffineDTI3DTransform.h.

◆ TranslationType

template<class TScalarType = double>
using itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::TranslationType

Definition at line 149 of file itkAdvancedMatrixOffsetTransformBase.h.

Constructor & Destructor Documentation

◆ AffineDTI3DTransform() [1/3]

template<class TScalarType = double>
itk::AffineDTI3DTransform< TScalarType >::AffineDTI3DTransform ( )
protected

◆ AffineDTI3DTransform() [2/3]

template<class TScalarType = double>
itk::AffineDTI3DTransform< TScalarType >::AffineDTI3DTransform ( const MatrixType & matrix,
const OutputPointType & offset )
protected

◆ AffineDTI3DTransform() [3/3]

template<class TScalarType = double>
itk::AffineDTI3DTransform< TScalarType >::AffineDTI3DTransform ( unsigned int outputSpaceDims,
unsigned int paramsSpaceDims )
protected

◆ ~AffineDTI3DTransform()

template<class TScalarType = double>
itk::AffineDTI3DTransform< TScalarType >::~AffineDTI3DTransform ( )
overrideprotecteddefault

Member Function Documentation

◆ ComputeMatrix()

template<class TScalarType = double>
void itk::AffineDTI3DTransform< TScalarType >::ComputeMatrix ( )
overrideprotectedvirtual

Compute the components of the rotation matrix in the superclass.

Reimplemented from itk::AdvancedMatrixOffsetTransformBase< double, 3, 3 >.

◆ ComputeMatrixParameters()

template<class TScalarType = double>
void itk::AffineDTI3DTransform< TScalarType >::ComputeMatrixParameters ( )
overrideprotectedvirtual

◆ GetClassName()

template<class TScalarType = double>
virtual const char * itk::AffineDTI3DTransform< TScalarType >::GetClassName ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::AdvancedMatrixOffsetTransformBase< double, 3, 3 >.

◆ GetJacobian()

template<class TScalarType = double>
void itk::AffineDTI3DTransform< TScalarType >::GetJacobian ( const InputPointType & ,
JacobianType & ,
NonZeroJacobianIndicesType &  ) const
overridevirtual

Compute the Jacobian of the transformation.

Reimplemented from itk::AdvancedMatrixOffsetTransformBase< double, 3, 3 >.

◆ GetParameters()

template<class TScalarType = double>
const ParametersType & itk::AffineDTI3DTransform< TScalarType >::GetParameters ( ) const
override

◆ ITK_DISALLOW_COPY_AND_MOVE()

template<class TScalarType = double>
itk::AffineDTI3DTransform< TScalarType >::ITK_DISALLOW_COPY_AND_MOVE ( AffineDTI3DTransform< TScalarType > )

◆ itkStaticConstMacro() [1/4]

template<class TScalarType = double>
itk::AffineDTI3DTransform< TScalarType >::itkStaticConstMacro ( InputSpaceDimension ,
unsigned int ,
3  )

◆ itkStaticConstMacro() [2/4]

template<class TScalarType = double>
itk::AffineDTI3DTransform< TScalarType >::itkStaticConstMacro ( OutputSpaceDimension ,
unsigned int ,
3  )

◆ itkStaticConstMacro() [3/4]

template<class TScalarType = double>
itk::AffineDTI3DTransform< TScalarType >::itkStaticConstMacro ( ParametersDimension ,
unsigned int ,
12  )

◆ itkStaticConstMacro() [4/4]

template<class TScalarType = double>
itk::AffineDTI3DTransform< TScalarType >::itkStaticConstMacro ( SpaceDimension ,
unsigned int ,
3  )

Dimension of the space.

◆ New()

template<class TScalarType = double>
static Pointer itk::AffineDTI3DTransform< TScalarType >::New ( )
static

New macro for creation of through a Smart Pointer.

◆ PrecomputeJacobianOfSpatialJacobian()

template<class TScalarType = double>
virtual void itk::AffineDTI3DTransform< TScalarType >::PrecomputeJacobianOfSpatialJacobian ( )
protectedvirtual

Update the m_JacobianOfSpatialJacobian.

◆ PrintSelf()

template<class TScalarType = double>
void itk::AffineDTI3DTransform< TScalarType >::PrintSelf ( std::ostream & os,
Indent indent ) const
overrideprotected

◆ SetIdentity()

template<class TScalarType = double>
void itk::AffineDTI3DTransform< TScalarType >::SetIdentity ( )
overridevirtual

◆ SetParameters()

template<class TScalarType = double>
void itk::AffineDTI3DTransform< TScalarType >::SetParameters ( const ParametersType & parameters)
override

Set/Get the transformation from a container of parameters This is typically used by optimizers. There are 12 parameters. [ Rx Ry Rz Gx Gy Gz Sx Sy Sz Tx Ty Tz ] ~rotation, scale, skew, translation

◆ SetVarAngleScaleShear()

template<class TScalarType = double>
void itk::AffineDTI3DTransform< TScalarType >::SetVarAngleScaleShear ( ScalarArrayType angle,
ScalarArrayType shear,
ScalarArrayType scale )
protected

Set values of angles etc directly without recomputing other parameters.

Field Documentation

◆ m_Angle

template<class TScalarType = double>
ScalarArrayType itk::AffineDTI3DTransform< TScalarType >::m_Angle {}
private

Definition at line 173 of file itkAffineDTI3DTransform.h.

◆ m_Scale

template<class TScalarType = double>
ScalarArrayType itk::AffineDTI3DTransform< TScalarType >::m_Scale {}
private

Definition at line 175 of file itkAffineDTI3DTransform.h.

◆ m_Shear

template<class TScalarType = double>
ScalarArrayType itk::AffineDTI3DTransform< TScalarType >::m_Shear {}
private

Definition at line 174 of file itkAffineDTI3DTransform.h.



Generated on 2024-07-17 for elastix by doxygen 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) elastix logo