ITK  6.0.0
Insight Toolkit
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
itk::AffineTransform< TParametersValueType, VDimension > Class Template Reference

#include <itkAffineTransform.h>

Detailed Description

template<typename TParametersValueType = double, unsigned int VDimension = 3>
class itk::AffineTransform< TParametersValueType, VDimension >

Affine transformation of a vector space (e.g. space coordinates)

This class allows the definition and manipulation of affine transformations of an n-dimensional affine space (and its associated vector space) onto itself. One common use is to define and manipulate Euclidean coordinate transformations in two and three dimensions, but other uses are possible as well.

An affine transformation is defined mathematically as a linear transformation plus a constant offset. If A is a constant n x n matrix and b is a constant n-vector, then y = Ax+b defines an affine transformation from the n-vector x to the n-vector y.

The difference between two points is a vector and transforms linearly, using the matrix only. That is, (y1-y2) = A*(x1-x2).

The AffineTransform class determines whether to transform an object as a point or a vector by examining its type. An object of type Point transforms as a point; an object of type Vector transforms as a vector.

One common use of affine transformations is to define coordinate conversions in two- and three-dimensional space. In this application, x is a two- or three-dimensional vector containing the "source" coordinates of a point, y is a vector containing the "target" coordinates, the matrix A defines the scaling and rotation of the coordinate systems from the source to the target, and b defines the translation of the origin from the source to the target. More generally, A can also define anisotropic scaling and shearing transformations. Any good textbook on computer graphics will discuss coordinate transformations in more detail. Several of the methods in this class are designed for this purpose and use the language appropriate to coordinate conversions.

Any two affine transformations may be composed and the result is another affine transformation. However, the order is important. Given two affine transformations T1 and T2, we will say that "precomposing T1 with T2" yields the transformation which applies T1 to the source, and then applies T2 to that result to obtain the target. Conversely, we will say that "postcomposing T1 with T2" yields the transformation which applies T2 to the source, and then applies T1 to that result to obtain the target. (Whether T1 or T2 comes first lexicographically depends on whether you choose to write mappings from right-to-left or vice versa; we avoid the whole problem by referring to the order of application rather than the textual order.)

There are two template parameters for this class:

TParametersValueType The type to be used for scalar numeric values. Either float or double.

VDimension The number of dimensions of the vector space.

This class provides several methods for setting the matrix and vector defining the transform. To support the registration framework, the transform parameters can also be set as an Array<double> of size (VDimension + 1) * VDimension using method SetParameters(). The first (VDimension x VDimension) parameters defines the matrix in row-major order (where the column index varies the fastest). The last VDimension parameters defines the translation in each dimensions.

This class also supports the specification of a center of rotation (center) and a translation that is applied with respect to that centered rotation. By default the center of rotation is set to the origin.

Definition at line 101 of file itkAffineTransform.h.

+ Inheritance diagram for itk::AffineTransform< TParametersValueType, VDimension >:
+ Collaboration diagram for itk::AffineTransform< TParametersValueType, VDimension >:

Public Types

using CenterType = InputPointType
 
using ConstPointer = SmartPointer< const Self >
 
using InputCovariantVectorType = CovariantVector< TParametersValueType, Self::InputSpaceDimension >
 
using InputPointType = Point< TParametersValueType, Self::InputSpaceDimension >
 
using InputVectorType = Vector< TParametersValueType, Self::InputSpaceDimension >
 
using InputVnlVectorType = vnl_vector_fixed< TParametersValueType, Self::InputSpaceDimension >
 
using InverseMatrixType = Matrix< TParametersValueType, Self::InputSpaceDimension, Self::OutputSpaceDimension >
 
using InverseTransformBasePointer = typename InverseTransformBaseType::Pointer
 
using InverseTransformBaseType = typename Superclass::InverseTransformBaseType
 
using MatrixType = Matrix< TParametersValueType, Self::OutputSpaceDimension, Self::InputSpaceDimension >
 
using OffsetType = OutputVectorType
 
using OutputCovariantVectorType = CovariantVector< TParametersValueType, Self::OutputSpaceDimension >
 
using OutputPointType = Point< TParametersValueType, Self::OutputSpaceDimension >
 
using OutputVectorType = Vector< TParametersValueType, Self::OutputSpaceDimension >
 
using OutputVnlVectorType = vnl_vector_fixed< TParametersValueType, Self::OutputSpaceDimension >
 
using Pointer = SmartPointer< Self >
 
using Self = AffineTransform
 
using Superclass = MatrixOffsetTransformBase< TParametersValueType, VDimension, VDimension >
 
using TranslationType = OutputVectorType
 
- Public Types inherited from itk::MatrixOffsetTransformBase< double, 3, 3 >
using CenterType = InputPointType
 
using ConstPointer = SmartPointer< const Self >
 
using InputCovariantVectorType = CovariantVector< double, Self::InputSpaceDimension >
 
using InputDiffusionTensor3DType = DiffusionTensor3D< double >
 
using InputPointType = Point< double, Self::InputSpaceDimension >
 
using InputPointValueType = typename InputPointType::ValueType
 
using InputSymmetricSecondRankTensorType = SymmetricSecondRankTensor< double, VInputDimension >
 
using InputTensorEigenVectorType = CovariantVector< double, InputDiffusionTensor3DType::Dimension >
 
using InputVectorPixelType = VariableLengthVector< double >
 
using InputVectorType = Vector< double, Self::InputSpaceDimension >
 
using InputVnlVectorType = vnl_vector_fixed< double, Self::InputSpaceDimension >
 
using InverseJacobianPositionType = vnl_matrix_fixed< ParametersValueType, VInputDimension, VOutputDimension >
 
using InverseMatrixType = Matrix< double, Self::InputSpaceDimension, Self::OutputSpaceDimension >
 
using InverseTransformBasePointer = typename InverseTransformBaseType::Pointer
 
using InverseTransformBaseType = typename Superclass::InverseTransformBaseType
 
using InverseTransformType = MatrixOffsetTransformBase< double, VOutputDimension, VInputDimension >
 
using JacobianPositionType = vnl_matrix_fixed< ParametersValueType, VOutputDimension, VInputDimension >
 
using JacobianType = Array2D< ParametersValueType >
 
using MatrixType = Matrix< double, Self::OutputSpaceDimension, Self::InputSpaceDimension >
 
using MatrixValueType = typename MatrixType::ValueType
 
using OffsetType = OutputVectorType
 
using OffsetValueType = typename OffsetType::ValueType
 
using OutputCovariantVectorType = CovariantVector< double, Self::OutputSpaceDimension >
 
using OutputDiffusionTensor3DType = DiffusionTensor3D< double >
 
using OutputPointType = Point< double, Self::OutputSpaceDimension >
 
using OutputPointValueType = typename OutputPointType::ValueType
 
using OutputSymmetricSecondRankTensorType = SymmetricSecondRankTensor< double, VOutputDimension >
 
using OutputVectorPixelType = VariableLengthVector< double >
 
using OutputVectorType = Vector< double, Self::OutputSpaceDimension >
 
using OutputVectorValueType = typename OutputVectorType::ValueType
 
using OutputVnlVectorType = vnl_vector_fixed< double, Self::OutputSpaceDimension >
 
using Pointer = SmartPointer< Self >
 
using ScalarType = ParametersValueType
 
using Self = MatrixOffsetTransformBase
 
using Superclass = Transform< double, VInputDimension, VOutputDimension >
 
using TranslationType = OutputVectorType
 
using TranslationValueType = typename TranslationType::ValueType
 
- Public Types inherited from itk::Transform< double, VInputDimension, VOutputDimension >
using ConstPointer = SmartPointer< const Self >
 
using DerivativeType = Array< ParametersValueType >
 
using DirectionChangeMatrix = Matrix< double, Self::OutputSpaceDimension, Self::InputSpaceDimension >
 
using FixedParametersType = OptimizerParameters< FixedParametersValueType >
 
using FixedParametersValueType = double
 
using InputCovariantVectorType = CovariantVector< double, VInputDimension >
 
using InputDiffusionTensor3DType = DiffusionTensor3D< double >
 
using InputDirectionMatrix = Matrix< double, Self::InputSpaceDimension, Self::InputSpaceDimension >
 
using InputPointType = Point< double, VInputDimension >
 
using InputSymmetricSecondRankTensorType = SymmetricSecondRankTensor< double, VInputDimension >
 
using InputVectorPixelType = VariableLengthVector< double >
 
using InputVectorType = Vector< double, VInputDimension >
 
using InputVnlVectorType = vnl_vector_fixed< double, VInputDimension >
 
using InverseJacobianPositionType = vnl_matrix_fixed< ParametersValueType, VInputDimension, VOutputDimension >
 
using InverseTransformBasePointer = typename InverseTransformBaseType::Pointer
 
using InverseTransformBaseType = Transform< double, VOutputDimension, VInputDimension >
 
using JacobianPositionType = vnl_matrix_fixed< ParametersValueType, VOutputDimension, VInputDimension >
 
using JacobianType = Array2D< ParametersValueType >
 
using MatrixType = Matrix< double, Self::OutputSpaceDimension, Self::InputSpaceDimension >
 
using NumberOfParametersType = IdentifierType
 
using OutputCovariantVectorType = CovariantVector< double, VOutputDimension >
 
using OutputDiffusionTensor3DType = DiffusionTensor3D< double >
 
using OutputDirectionMatrix = Matrix< double, Self::OutputSpaceDimension, Self::OutputSpaceDimension >
 
using OutputPointType = Point< double, VOutputDimension >
 
using OutputSymmetricSecondRankTensorType = SymmetricSecondRankTensor< double, VOutputDimension >
 
using OutputVectorPixelType = VariableLengthVector< double >
 
using OutputVectorType = Vector< double, VOutputDimension >
 
using OutputVnlVectorType = vnl_vector_fixed< double, VOutputDimension >
 
using ParametersType = OptimizerParameters< ParametersValueType >
 
using ParametersValueType = double
 
using Pointer = SmartPointer< Self >
 
using ScalarType = ParametersValueType
 
using Self = Transform
 
using Superclass = TransformBaseTemplate< double >
 
using TransformCategoryEnum = TransformBaseTemplateEnums::TransformCategory
 
- Public Types inherited from TransformBaseTemplate< double >
using ConstPointer = SmartPointer< const Self >
 
using FixedParametersType = OptimizerParameters< FixedParametersValueType >
 
using FixedParametersValueType = double
 
using NumberOfParametersType = IdentifierType
 
using ParametersType = OptimizerParameters< ParametersValueType >
 
using ParametersValueType = double
 
using Pointer = SmartPointer< Self >
 
using Self = TransformBaseTemplate
 
using Superclass = Object
 
using TransformCategoryEnum = TransformBaseTemplateEnums::TransformCategory
 
using TransformCategoryType = TransformCategoryEnum
 

Public Member Functions

bool GetInverse (Self *inverse) const
 
InverseTransformBasePointer GetInverseTransform () const override
 
 ITK_DISALLOW_COPY_AND_MOVE (AffineTransform)
 
 itkNewMacro (Self)
 
 itkOverrideGetNameOfClassMacro (AffineTransform)
 
ScalarType Metric () const
 
ScalarType Metric (const Self *other) const
 
void Rotate2D (TParametersValueType angle, bool pre=false)
 
void Rotate3D (const OutputVectorType &axis, TParametersValueType angle, bool pre=false)
 
void Scale (const OutputVectorType &factor, bool pre=false)
 
void Scale (const TParametersValueType &factor, bool pre=false)
 
void Shear (int axis1, int axis2, TParametersValueType coef, bool pre=false)
 
void Translate (const OutputVectorType &trans, bool pre=false)
 
void Rotate (int axis1, int axis2, TParametersValueType angle, bool pre=false)
 
- Public Member Functions inherited from itk::MatrixOffsetTransformBase< double, 3, 3 >
void Compose (const Self *other, bool pre=false)
 
void ComputeInverseJacobianWithRespectToPosition (const InputPointType &x, InverseJacobianPositionType &jac) const override
 
void ComputeJacobianWithRespectToParameters (const InputPointType &p, JacobianType &jacobian) const override
 
virtual void ComputeJacobianWithRespectToPosition (const InputPointType &, JacobianPositionType &) const
 
void ComputeJacobianWithRespectToPosition (const InputPointType &x, JacobianPositionType &jac) const override
 
const InputPointTypeGetCenter () const
 
const FixedParametersTypeGetFixedParameters () const override
 
InverseTransformBasePointer GetInverseTransform () const override
 
virtual const MatrixTypeGetMatrix () const
 
const char * GetNameOfClass () const override
 
const OutputVectorTypeGetOffset () const
 
const ParametersTypeGetParameters () const override
 
TransformCategoryEnum GetTransformCategory () const override
 
const OutputVectorTypeGetTranslation () const
 
bool IsLinear () const override
 
void SetFixedParameters (const FixedParametersType &) override
 
virtual void SetIdentity ()
 
void SetParameters (const ParametersType &parameters) override
 
virtual OutputCovariantVectorType TransformCovariantVector (const InputCovariantVectorType &) const
 
OutputCovariantVectorType TransformCovariantVector (const InputCovariantVectorType &vec) const override
 
virtual OutputCovariantVectorType TransformCovariantVector (const InputCovariantVectorType &vector, const InputPointType &point) const
 
virtual OutputVectorPixelType TransformCovariantVector (const InputVectorPixelType &) const
 
OutputVectorPixelType TransformCovariantVector (const InputVectorPixelType &vect) const override
 
virtual OutputVectorPixelType TransformCovariantVector (const InputVectorPixelType &vector, const InputPointType &point) const
 
virtual OutputDiffusionTensor3DType TransformDiffusionTensor3D (const InputDiffusionTensor3DType &) const
 
virtual OutputDiffusionTensor3DType TransformDiffusionTensor3D (const InputDiffusionTensor3DType &inputTensor, const InputPointType &point) const
 
OutputDiffusionTensor3DType TransformDiffusionTensor3D (const InputDiffusionTensor3DType &tensor) const override
 
virtual OutputVectorPixelType TransformDiffusionTensor3D (const InputVectorPixelType &) const
 
virtual OutputVectorPixelType TransformDiffusionTensor3D (const InputVectorPixelType &inputTensor, const InputPointType &point) const
 
OutputVectorPixelType TransformDiffusionTensor3D (const InputVectorPixelType &tensor) const override
 
OutputPointType TransformPoint (const InputPointType &point) const override
 
virtual OutputSymmetricSecondRankTensorType TransformSymmetricSecondRankTensor (const InputSymmetricSecondRankTensorType &) const
 
OutputSymmetricSecondRankTensorType TransformSymmetricSecondRankTensor (const InputSymmetricSecondRankTensorType &inputTensor) const override
 
virtual OutputSymmetricSecondRankTensorType TransformSymmetricSecondRankTensor (const InputSymmetricSecondRankTensorType &inputTensor, const InputPointType &point) const
 
virtual OutputVectorPixelType TransformSymmetricSecondRankTensor (const InputVectorPixelType &) const
 
OutputVectorPixelType TransformSymmetricSecondRankTensor (const InputVectorPixelType &inputTensor) const override
 
virtual OutputVectorPixelType TransformSymmetricSecondRankTensor (const InputVectorPixelType &inputTensor, const InputPointType &point) const
 
virtual OutputVectorPixelType TransformVector (const InputVectorPixelType &) const
 
OutputVectorPixelType TransformVector (const InputVectorPixelType &vect) const override
 
virtual OutputVectorPixelType TransformVector (const InputVectorPixelType &vector, const InputPointType &point) const
 
virtual OutputVectorType TransformVector (const InputVectorType &) const
 
OutputVectorType TransformVector (const InputVectorType &vect) const override
 
virtual OutputVectorType TransformVector (const InputVectorType &vector, const InputPointType &point) const
 
virtual OutputVnlVectorType TransformVector (const InputVnlVectorType &) const
 
OutputVnlVectorType TransformVector (const InputVnlVectorType &vect) const override
 
virtual OutputVnlVectorType TransformVector (const InputVnlVectorType &vector, const InputPointType &point) const
 
virtual void SetMatrix (const MatrixType &matrix)
 
void SetOffset (const OutputVectorType &offset)
 
void SetCenter (const InputPointType &center)
 
void SetTranslation (const OutputVectorType &translation)
 
bool GetInverse (InverseTransformType *inverse) const
 
- Public Member Functions inherited from itk::Transform< double, VInputDimension, VOutputDimension >
virtual void ComputeJacobianWithRespectToParametersCachedTemporaries (const InputPointType &p, JacobianType &jacobian, JacobianType &) const
 
void CopyInFixedParameters (const FixedParametersValueType *const begin, const FixedParametersValueType *const end) override
 
void CopyInParameters (const ParametersValueType *const begin, const ParametersValueType *const end) override
 
const FixedParametersTypeGetFixedParameters () const override
 
unsigned int GetInputSpaceDimension () const override
 
bool GetInverse (Self *) const
 
virtual InverseTransformBasePointer GetInverseTransform () const
 
const char * GetNameOfClass () const override
 
virtual NumberOfParametersType GetNumberOfFixedParameters () const
 
virtual NumberOfParametersType GetNumberOfLocalParameters () const
 
NumberOfParametersType GetNumberOfParameters () const override
 
unsigned int GetOutputSpaceDimension () const override
 
const ParametersTypeGetParameters () const override
 
TransformCategoryEnum GetTransformCategory () const override
 
std::string GetTransformTypeAsString () const override
 
virtual bool IsLinear () const
 
 itkCloneMacro (Self)
 
void SetFixedParameters (const FixedParametersType &) override=0
 
void SetParameters (const ParametersType &) override=0
 
void SetParametersByValue (const ParametersType &p) override
 
virtual OutputCovariantVectorType TransformCovariantVector (const InputCovariantVectorType &) const
 
virtual OutputCovariantVectorType TransformCovariantVector (const InputCovariantVectorType &vector, const InputPointType &point) const
 
virtual OutputVectorPixelType TransformCovariantVector (const InputVectorPixelType &) const
 
virtual OutputVectorPixelType TransformCovariantVector (const InputVectorPixelType &vector, const InputPointType &point) const
 
virtual OutputDiffusionTensor3DType TransformDiffusionTensor3D (const InputDiffusionTensor3DType &) const
 
virtual OutputDiffusionTensor3DType TransformDiffusionTensor3D (const InputDiffusionTensor3DType &inputTensor, const InputPointType &point) const
 
virtual OutputVectorPixelType TransformDiffusionTensor3D (const InputVectorPixelType &) const
 
virtual OutputVectorPixelType TransformDiffusionTensor3D (const InputVectorPixelType &inputTensor, const InputPointType &point) const
 
virtual OutputPointType TransformPoint (const InputPointType &) const=0
 
virtual OutputSymmetricSecondRankTensorType TransformSymmetricSecondRankTensor (const InputSymmetricSecondRankTensorType &) const
 
virtual OutputSymmetricSecondRankTensorType TransformSymmetricSecondRankTensor (const InputSymmetricSecondRankTensorType &inputTensor, const InputPointType &point) const
 
virtual OutputVectorPixelType TransformSymmetricSecondRankTensor (const InputVectorPixelType &) const
 
virtual OutputVectorPixelType TransformSymmetricSecondRankTensor (const InputVectorPixelType &inputTensor, const InputPointType &point) const
 
virtual OutputVectorPixelType TransformVector (const InputVectorPixelType &) const
 
virtual OutputVectorPixelType TransformVector (const InputVectorPixelType &vector, const InputPointType &point) const
 
virtual OutputVectorType TransformVector (const InputVectorType &) const
 
virtual OutputVectorType TransformVector (const InputVectorType &vector, const InputPointType &point) const
 
virtual OutputVnlVectorType TransformVector (const InputVnlVectorType &) const
 
virtual OutputVnlVectorType TransformVector (const InputVnlVectorType &vector, const InputPointType &point) const
 
virtual void UpdateTransformParameters (const DerivativeType &update, ParametersValueType factor=1.0)
 
virtual void ComputeJacobianWithRespectToParameters (const InputPointType &, JacobianType &) const=0
 
virtual void ComputeJacobianWithRespectToPosition (const InputPointType &, JacobianPositionType &) const
 
template< typename TImage > std std::enable_if_t< TImage::ImageDimension==VInputDimension &&TImage::ImageDimension==VOutputDimension, void > ApplyToImageMetadata (SmartPointer< TImage > image) const
 
- Public Member Functions inherited from TransformBaseTemplate< double >
virtual void CopyInFixedParameters (const FixedParametersValueType *const begin, const FixedParametersValueType *const end)=0
 
virtual void CopyInParameters (const ParametersValueType *const begin, const ParametersValueType *const end)=0
 
virtual const FixedParametersTypeGetFixedParameters () const=0
 
virtual unsigned int GetInputSpaceDimension () const=0
 
virtual NumberOfParametersType GetNumberOfParameters () const=0
 
virtual unsigned int GetOutputSpaceDimension () const=0
 
virtual const ParametersTypeGetParameters () const=0
 
virtual TransformCategoryEnum GetTransformCategory () const=0
 
virtual std::string GetTransformTypeAsString () const=0
 
 ITK_DISALLOW_COPY_AND_MOVE (TransformBaseTemplate)
 
 itkGetConstReferenceMacro (InputSpaceName, std::string)
 
 itkGetConstReferenceMacro (OutputSpaceName, std::string)
 
 itkOverrideGetNameOfClassMacro (TransformBaseTemplate)
 
 itkSetMacro (InputSpaceName, std::string)
 
 itkSetMacro (OutputSpaceName, std::string)
 
virtual void SetFixedParameters (const FixedParametersType &)=0
 
virtual void SetParameters (const ParametersType &)=0
 
virtual void SetParametersByValue (const ParametersType &p)=0
 

Static Public Attributes

static constexpr unsigned int InputSpaceDimension = VDimension
 
static constexpr unsigned int OutputSpaceDimension = VDimension
 
static constexpr unsigned int ParametersDimension = VDimension * (VDimension + 1)
 
static constexpr unsigned int SpaceDimension = VDimension
 
- Static Public Attributes inherited from itk::MatrixOffsetTransformBase< double, 3, 3 >
static constexpr unsigned int InputSpaceDimension
 
static constexpr unsigned int OutputSpaceDimension
 
static constexpr unsigned int ParametersDimension
 
- Static Public Attributes inherited from itk::Transform< double, VInputDimension, VOutputDimension >
static constexpr unsigned int InputSpaceDimension
 
static constexpr unsigned int OutputSpaceDimension
 
- Static Public Attributes inherited from TransformBaseTemplate< double >
static constexpr TransformCategoryEnum BSpline
 
static constexpr TransformCategoryEnum DisplacementField
 
static constexpr TransformCategoryEnum Linear
 
static constexpr TransformCategoryEnum Spline
 
static constexpr TransformCategoryEnum UnknownTransformCategory
 
static constexpr TransformCategoryEnum VelocityField
 

Protected Member Functions

 ~AffineTransform () override=default
 
 AffineTransform (const MatrixType &matrix, const OutputVectorType &offset)
 
 AffineTransform (unsigned int parametersDimension)
 
 AffineTransform ()
 
- Protected Member Functions inherited from itk::MatrixOffsetTransformBase< double, 3, 3 >
virtual void ComputeMatrix ()
 
virtual void ComputeMatrixParameters ()
 
virtual void ComputeOffset ()
 
virtual void ComputeTranslation ()
 
const InverseMatrixTypeGetInverseMatrix () const
 
virtual bool GetSingular () const
 
const InverseMatrixTypeGetVarInverseMatrix () const
 
bool InverseMatrixIsOld () const
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
void SetVarCenter (const InputPointType &center)
 
void SetVarInverseMatrix (const InverseMatrixType &matrix) const
 
void SetVarMatrix (const MatrixType &matrix)
 
void SetVarOffset (const OutputVectorType &offset)
 
void SetVarTranslation (const OutputVectorType &translation)
 
 ~MatrixOffsetTransformBase () override=default
 
 MatrixOffsetTransformBase (unsigned int paramDims=ParametersDimension)
 
- Protected Member Functions inherited from itk::Transform< double, VInputDimension, VOutputDimension >
LightObject::Pointer InternalClone () const override
 
OutputDiffusionTensor3DType PreservationOfPrincipalDirectionDiffusionTensor3DReorientation (const InputDiffusionTensor3DType &, const InverseJacobianPositionType &) const
 
 Transform ()=default
 
 Transform (NumberOfParametersType numberOfParameters)
 
 ~Transform () override=default
 
- Protected Member Functions inherited from TransformBaseTemplate< double >
 TransformBaseTemplate ()=default
 
 ~TransformBaseTemplate () override=default
 

Additional Inherited Members

- Static Public Member Functions inherited from itk::MatrixOffsetTransformBase< double, 3, 3 >
static Pointer New ()
 
- Public Attributes inherited from itk::Transform< double, VInputDimension, VOutputDimension >
InverseJacobianPositionType &jacobian const
 
- Static Protected Member Functions inherited from itk::Transform< double, VInputDimension, VOutputDimension >
static InverseTransformBasePointer InvertTransform (const TTransform &transform)
 
- Protected Attributes inherited from itk::Transform< double, VInputDimension, VOutputDimension >
FixedParametersType m_FixedParameters
 
ParametersType m_Parameters
 

Member Typedef Documentation

◆ CenterType

template<typename TParametersValueType = double, unsigned int VDimension = 3>
using itk::MatrixOffsetTransformBase< TParametersValueType, VInputDimension, VOutputDimension >::CenterType = InputPointType

Definition at line 186 of file itkMatrixOffsetTransformBase.h.

◆ ConstPointer

template<typename TParametersValueType = double, unsigned int VDimension = 3>
using itk::AffineTransform< TParametersValueType, VDimension >::ConstPointer = SmartPointer<const Self>

Definition at line 112 of file itkAffineTransform.h.

◆ InputCovariantVectorType

template<typename TParametersValueType = double, unsigned int VDimension = 3>
using itk::MatrixOffsetTransformBase< TParametersValueType, VInputDimension, VOutputDimension >::InputCovariantVectorType = CovariantVector<TParametersValueType, Self::InputSpaceDimension>

Standard covariant vector type for this class

Definition at line 153 of file itkMatrixOffsetTransformBase.h.

◆ InputPointType

template<typename TParametersValueType = double, unsigned int VDimension = 3>
using itk::MatrixOffsetTransformBase< TParametersValueType, VInputDimension, VOutputDimension >::InputPointType = Point<TParametersValueType, Self::InputSpaceDimension>

Standard coordinate point type for this class

Definition at line 174 of file itkMatrixOffsetTransformBase.h.

◆ InputVectorType

template<typename TParametersValueType = double, unsigned int VDimension = 3>
using itk::MatrixOffsetTransformBase< TParametersValueType, VInputDimension, VOutputDimension >::InputVectorType = Vector<TParametersValueType, Self::InputSpaceDimension>

Standard vector type for this class

Definition at line 148 of file itkMatrixOffsetTransformBase.h.

◆ InputVnlVectorType

template<typename TParametersValueType = double, unsigned int VDimension = 3>
using itk::MatrixOffsetTransformBase< TParametersValueType, VInputDimension, VOutputDimension >::InputVnlVectorType = vnl_vector_fixed<TParametersValueType, Self::InputSpaceDimension>

Standard vnl_vector type for this class

Definition at line 170 of file itkMatrixOffsetTransformBase.h.

◆ InverseMatrixType

template<typename TParametersValueType = double, unsigned int VDimension = 3>
using itk::MatrixOffsetTransformBase< TParametersValueType, VInputDimension, VOutputDimension >::InverseMatrixType = Matrix<TParametersValueType, Self::InputSpaceDimension, Self::OutputSpaceDimension>

Standard inverse matrix type for this class

Definition at line 184 of file itkMatrixOffsetTransformBase.h.

◆ InverseTransformBasePointer

template<typename TParametersValueType = double, unsigned int VDimension = 3>
using itk::AffineTransform< TParametersValueType, VDimension >::InverseTransformBasePointer = typename InverseTransformBaseType::Pointer

Definition at line 150 of file itkAffineTransform.h.

◆ InverseTransformBaseType

template<typename TParametersValueType = double, unsigned int VDimension = 3>
using itk::AffineTransform< TParametersValueType, VDimension >::InverseTransformBaseType = typename Superclass::InverseTransformBaseType

Base inverse transform type. This type should not be changed to the concrete inverse transform type or inheritance would be lost.

Definition at line 149 of file itkAffineTransform.h.

◆ MatrixType

template<typename TParametersValueType = double, unsigned int VDimension = 3>
using itk::MatrixOffsetTransformBase< TParametersValueType, VInputDimension, VOutputDimension >::MatrixType = Matrix<TParametersValueType, Self::OutputSpaceDimension, Self::InputSpaceDimension>

Standard matrix type for this class

Definition at line 180 of file itkMatrixOffsetTransformBase.h.

◆ OffsetType

template<typename TParametersValueType = double, unsigned int VDimension = 3>
using itk::MatrixOffsetTransformBase< TParametersValueType, VInputDimension, VOutputDimension >::OffsetType = OutputVectorType

Definition at line 188 of file itkMatrixOffsetTransformBase.h.

◆ OutputCovariantVectorType

template<typename TParametersValueType = double, unsigned int VDimension = 3>
using itk::MatrixOffsetTransformBase< TParametersValueType, VInputDimension, VOutputDimension >::OutputCovariantVectorType = CovariantVector<TParametersValueType, Self::OutputSpaceDimension>

Definition at line 154 of file itkMatrixOffsetTransformBase.h.

◆ OutputPointType

template<typename TParametersValueType = double, unsigned int VDimension = 3>
using itk::MatrixOffsetTransformBase< TParametersValueType, VInputDimension, VOutputDimension >::OutputPointType = Point<TParametersValueType, Self::OutputSpaceDimension>

Definition at line 176 of file itkMatrixOffsetTransformBase.h.

◆ OutputVectorType

template<typename TParametersValueType = double, unsigned int VDimension = 3>
using itk::MatrixOffsetTransformBase< TParametersValueType, VInputDimension, VOutputDimension >::OutputVectorType = Vector<TParametersValueType, Self::OutputSpaceDimension>

Definition at line 149 of file itkMatrixOffsetTransformBase.h.

◆ OutputVnlVectorType

template<typename TParametersValueType = double, unsigned int VDimension = 3>
using itk::MatrixOffsetTransformBase< TParametersValueType, VInputDimension, VOutputDimension >::OutputVnlVectorType = vnl_vector_fixed<TParametersValueType, Self::OutputSpaceDimension>

Definition at line 171 of file itkMatrixOffsetTransformBase.h.

◆ Pointer

template<typename TParametersValueType = double, unsigned int VDimension = 3>
using itk::AffineTransform< TParametersValueType, VDimension >::Pointer = SmartPointer<Self>

Definition at line 111 of file itkAffineTransform.h.

◆ Self

template<typename TParametersValueType = double, unsigned int VDimension = 3>
using itk::AffineTransform< TParametersValueType, VDimension >::Self = AffineTransform

Standard type alias

Definition at line 108 of file itkAffineTransform.h.

◆ Superclass

template<typename TParametersValueType = double, unsigned int VDimension = 3>
using itk::AffineTransform< TParametersValueType, VDimension >::Superclass = MatrixOffsetTransformBase<TParametersValueType, VDimension, VDimension>

Definition at line 109 of file itkAffineTransform.h.

◆ TranslationType

template<typename TParametersValueType = double, unsigned int VDimension = 3>
using itk::MatrixOffsetTransformBase< TParametersValueType, VInputDimension, VOutputDimension >::TranslationType = OutputVectorType

Definition at line 191 of file itkMatrixOffsetTransformBase.h.

Constructor & Destructor Documentation

◆ AffineTransform() [1/3]

template<typename TParametersValueType = double, unsigned int VDimension = 3>
itk::AffineTransform< TParametersValueType, VDimension >::AffineTransform ( const MatrixType matrix,
const OutputVectorType offset 
)
protected

Construct an AffineTransform object

This method constructs a new AffineTransform object and
initializes the matrix and offset parts of the transformation
to values specified by the caller.  If the arguments are
omitted, then the AffineTransform is initialized to an identity
transformation in the appropriate number of dimensions.   

◆ AffineTransform() [2/3]

template<typename TParametersValueType = double, unsigned int VDimension = 3>
itk::AffineTransform< TParametersValueType, VDimension >::AffineTransform ( unsigned int  parametersDimension)
protected

Construct an AffineTransform object

This method constructs a new AffineTransform object and
initializes the matrix and offset parts of the transformation
to values specified by the caller.  If the arguments are
omitted, then the AffineTransform is initialized to an identity
transformation in the appropriate number of dimensions.   

◆ AffineTransform() [3/3]

template<typename TParametersValueType = double, unsigned int VDimension = 3>
itk::AffineTransform< TParametersValueType, VDimension >::AffineTransform ( )
protected

Construct an AffineTransform object

This method constructs a new AffineTransform object and
initializes the matrix and offset parts of the transformation
to values specified by the caller.  If the arguments are
omitted, then the AffineTransform is initialized to an identity
transformation in the appropriate number of dimensions.   

◆ ~AffineTransform()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
itk::AffineTransform< TParametersValueType, VDimension >::~AffineTransform ( )
overrideprotecteddefault

Destroy an AffineTransform object

Member Function Documentation

◆ GetInverse()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
bool itk::AffineTransform< TParametersValueType, VDimension >::GetInverse ( Self inverse) const

Get the inverse of the transform.

◆ GetInverseTransform()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
InverseTransformBasePointer itk::AffineTransform< TParametersValueType, VDimension >::GetInverseTransform ( ) const
overridevirtual

Get the inverse of the transform.

Reimplemented from itk::Transform< double, VInputDimension, VOutputDimension >.

Reimplemented in itk::ScalableAffineTransform< double, 3 >.

◆ ITK_DISALLOW_COPY_AND_MOVE()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
itk::AffineTransform< TParametersValueType, VDimension >::ITK_DISALLOW_COPY_AND_MOVE ( AffineTransform< TParametersValueType, VDimension >  )

◆ itkNewMacro()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
itk::AffineTransform< TParametersValueType, VDimension >::itkNewMacro ( Self  )

New macro for creation of through a Smart Pointer

◆ itkOverrideGetNameOfClassMacro()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
itk::AffineTransform< TParametersValueType, VDimension >::itkOverrideGetNameOfClassMacro ( AffineTransform< TParametersValueType, VDimension >  )

◆ Metric() [1/2]

template<typename TParametersValueType = double, unsigned int VDimension = 3>
ScalarType itk::AffineTransform< TParametersValueType, VDimension >::Metric ( ) const

This method computes the distance from self to the identity transformation, using the same metric as the one-argument form of the Metric() method.

◆ Metric() [2/2]

template<typename TParametersValueType = double, unsigned int VDimension = 3>
ScalarType itk::AffineTransform< TParametersValueType, VDimension >::Metric ( const Self other) const

Compute distance between two affine transformations.

This method computes a "distance" between two affine transformations. This distance is guaranteed to be a metric, but not any particular metric. (At the moment, the algorithm is to collect all the elements of the matrix and offset into a vector, and compute the euclidean (L2) norm of that vector. Some metric which could be used to estimate the distance between two points transformed by the affine transformation would be more useful, but I don't have time right now to work out the mathematical details.)

◆ Rotate()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
void itk::AffineTransform< TParametersValueType, VDimension >::Rotate ( int  axis1,
int  axis2,
TParametersValueType  angle,
bool  pre = false 
)

Compose affine transformation with an elementary rotation.

This method composes self with a rotation that affects two
specified axes, replacing the current value of self.  The
rotation angle is in radians.  The axis of rotation goes
through the origin.  The transformation is given by

y[axis1] =  std::cos(angle)*x[axis1] + std::sin(angle)*x[axis2]
y[axis2] = -sin(angle)*x[axis1] + std::cos(angle)*x[axis2].

All coordinates other than axis1 and axis2 are unchanged;
a rotation of pi/2 radians will carry +axis1 into +axis2.
The rotation is precomposed with self if pre is true, and
postcomposed otherwise.
Note that the rotation is applied centered at the origin. 

◆ Rotate2D()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
void itk::AffineTransform< TParametersValueType, VDimension >::Rotate2D ( TParametersValueType  angle,
bool  pre = false 
)

Compose 2D affine transformation with a rotation.

This method composes self, which must be a 2D affine transformation, with a clockwise rotation through a given angle in radians. The center of rotation is the origin. The rotation is precomposed with self if pre is true, and postcomposed otherwise. Note that the rotation is applied centered at the origin.

Warning
Only to be use in two dimensions
Todo:
Find a way to generate a compile-time error is this is used with VDimension != 2.

◆ Rotate3D()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
void itk::AffineTransform< TParametersValueType, VDimension >::Rotate3D ( const OutputVectorType axis,
TParametersValueType  angle,
bool  pre = false 
)

Compose 3D affine transformation with a rotation.

This method composes self, which must be a 3D affine transformation, with a clockwise rotation around a specified axis. The rotation angle is in radians; the axis of rotation goes through the origin. The rotation is precomposed with self if pre is true, and postcomposed otherwise. Note that the rotation is applied centered at the origin.

Warning
Only to be used in dimension 3
Todo:
Find a way to generate a compile-time error is this is used with VDimension != 3.

◆ Scale() [1/2]

template<typename TParametersValueType = double, unsigned int VDimension = 3>
void itk::AffineTransform< TParametersValueType, VDimension >::Scale ( const OutputVectorType factor,
bool  pre = false 
)

Compose affine transformation with a scaling.

This method modifies self to magnify the source by a given factor along each axis. If all factors are the same, or only a single factor is given, then the scaling is isotropic; otherwise it is anisotropic. If an odd number of factors are negative, then the parity of the image changes. If any of the factors is zero, then the transformation becomes a projection and is not invertible. The scaling is precomposed with self if pre is true, and postcomposed otherwise. Note that the scaling is applied centered at the origin.

◆ Scale() [2/2]

template<typename TParametersValueType = double, unsigned int VDimension = 3>
void itk::AffineTransform< TParametersValueType, VDimension >::Scale ( const TParametersValueType &  factor,
bool  pre = false 
)

◆ Shear()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
void itk::AffineTransform< TParametersValueType, VDimension >::Shear ( int  axis1,
int  axis2,
TParametersValueType  coef,
bool  pre = false 
)

Compose affine transformation with a shear

This method composes self with a shear transformation, replacing the original contents of self. The shear is precomposed with self if pre is true, and postcomposed otherwise. The transformation is given by

y[axis1] = x[axis1] + coef*x[axis2] y[axis2] = x[axis2].

Note that the shear is applied centered at the origin.

◆ Translate()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
void itk::AffineTransform< TParametersValueType, VDimension >::Translate ( const OutputVectorType trans,
bool  pre = false 
)

Compose affine transformation with a translation.

This method modifies self to include a translation of the origin. The translation is precomposed with self if pre is true, and postcomposed otherwise. This updates Translation based on current center.

Member Data Documentation

◆ InputSpaceDimension

template<typename TParametersValueType = double, unsigned int VDimension = 3>
constexpr unsigned int itk::AffineTransform< TParametersValueType, VDimension >::InputSpaceDimension = VDimension
staticconstexpr

Dimension of the domain space.

Definition at line 121 of file itkAffineTransform.h.

◆ OutputSpaceDimension

template<typename TParametersValueType = double, unsigned int VDimension = 3>
constexpr unsigned int itk::AffineTransform< TParametersValueType, VDimension >::OutputSpaceDimension = VDimension
staticconstexpr

Definition at line 122 of file itkAffineTransform.h.

◆ ParametersDimension

template<typename TParametersValueType = double, unsigned int VDimension = 3>
constexpr unsigned int itk::AffineTransform< TParametersValueType, VDimension >::ParametersDimension = VDimension * (VDimension + 1)
staticconstexpr

Definition at line 124 of file itkAffineTransform.h.

◆ SpaceDimension

template<typename TParametersValueType = double, unsigned int VDimension = 3>
constexpr unsigned int itk::AffineTransform< TParametersValueType, VDimension >::SpaceDimension = VDimension
staticconstexpr

Definition at line 123 of file itkAffineTransform.h.


The documentation for this class was generated from the following file: