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

#include <itkAffineTransform.h>

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

Public Types

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

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother () const
 
virtual const char * GetNameOfClass () const
 
void Scale (const OutputVectorType &factor, bool pre=false)
 
void Scale (const TParametersValueType &factor, bool pre=false)
 
void Translate (const OutputVectorType &trans, bool pre=false)
 
- Public Member Functions inherited from itk::MatrixOffsetTransformBase< TParametersValueType, NDimensions, NDimensions >
virtual ::itk::LightObject::Pointer CreateAnother () const
 
TransformCategoryEnum GetTransformCategory () const override
 
virtual void SetIdentity ()
 
virtual void SetMatrix (const MatrixType &matrix)
 
virtual const MatrixTypeGetMatrix () const
 
void SetOffset (const OutputVectorType &offset)
 
const OutputVectorTypeGetOffset () const
 
void SetCenter (const InputPointType &center)
 
const InputPointTypeGetCenter () const
 
void SetTranslation (const OutputVectorType &translation)
 
const OutputVectorTypeGetTranslation () const
 
void SetParameters (const ParametersType &parameters) override
 
const ParametersTypeGetParameters () const override
 
void SetFixedParameters (const FixedParametersType &) override
 
const FixedParametersTypeGetFixedParameters () const override
 
void Compose (const Self *other, bool pre=false)
 
OutputPointType TransformPoint (const InputPointType &point) const override
 
OutputVectorType TransformVector (const InputVectorType &vect) const override
 
OutputVnlVectorType TransformVector (const InputVnlVectorType &vect) const override
 
OutputVectorPixelType TransformVector (const InputVectorPixelType &vect) const override
 
OutputCovariantVectorType TransformCovariantVector (const InputCovariantVectorType &vec) const override
 
OutputVectorPixelType TransformCovariantVector (const InputVectorPixelType &vect) const override
 
OutputDiffusionTensor3DType TransformDiffusionTensor3D (const InputDiffusionTensor3DType &tensor) const override
 
OutputVectorPixelType TransformDiffusionTensor3D (const InputVectorPixelType &tensor) const override
 
OutputSymmetricSecondRankTensorType TransformSymmetricSecondRankTensor (const InputSymmetricSecondRankTensorType &inputTensor) const override
 
OutputVectorPixelType TransformSymmetricSecondRankTensor (const InputVectorPixelType &inputTensor) const override
 
void ComputeJacobianWithRespectToParameters (const InputPointType &p, JacobianType &jacobian) const override
 
void ComputeJacobianWithRespectToPosition (const InputPointType &x, JacobianPositionType &jac) const override
 
void ComputeInverseJacobianWithRespectToPosition (const InputPointType &x, InverseJacobianPositionType &jac) const override
 
bool GetInverse (Self *inverse) const
 
InverseTransformBasePointer GetInverseTransform () const override
 
bool IsLinear () const override
 
- Public Member Functions inherited from itk::Transform< TParametersValueType, NInputDimensions, NOutputDimensions >
void CopyInFixedParameters (const FixedParametersValueType *const begin, const FixedParametersValueType *const end) override
 
void CopyInParameters (const ParametersValueType *const begin, const ParametersValueType *const end) override
 
unsigned int GetInputSpaceDimension () const override
 
bool GetInverse (Self *) const
 
virtual NumberOfParametersType GetNumberOfFixedParameters () const
 
virtual NumberOfParametersType GetNumberOfLocalParameters () const
 
NumberOfParametersType GetNumberOfParameters () const override
 
unsigned int GetOutputSpaceDimension () const override
 
std::string GetTransformTypeAsString () const override
 
 itkCloneMacro (Self)
 
void SetParametersByValue (const ParametersType &p) override
 
virtual OutputCovariantVectorType TransformCovariantVector (const InputCovariantVectorType &vector, const InputPointType &point) const
 
virtual OutputVectorPixelType TransformCovariantVector (const InputVectorPixelType &vector, const InputPointType &point) const
 
virtual OutputDiffusionTensor3DType TransformDiffusionTensor3D (const InputDiffusionTensor3DType &inputTensor, const InputPointType &point) const
 
virtual OutputVectorPixelType TransformDiffusionTensor3D (const InputVectorPixelType &inputTensor, const InputPointType &point) const
 
virtual OutputSymmetricSecondRankTensorType TransformSymmetricSecondRankTensor (const InputSymmetricSecondRankTensorType &inputTensor, const InputPointType &point) const
 
virtual OutputVectorPixelType TransformSymmetricSecondRankTensor (const InputVectorPixelType &inputTensor, const InputPointType &point) const
 
virtual OutputVectorPixelType TransformVector (const InputVectorPixelType &vector, const InputPointType &point) const
 
virtual OutputVectorType TransformVector (const InputVectorType &vector, const InputPointType &point) const
 
virtual OutputVnlVectorType TransformVector (const InputVnlVectorType &vector, const InputPointType &point) const
 
virtual void UpdateTransformParameters (const DerivativeType &update, ParametersValueType factor=1.0)
 
virtual void ComputeJacobianWithRespectToParametersCachedTemporaries (const InputPointType &p, JacobianType &jacobian, JacobianType &) const
 
 itkLegacyMacro (virtual void ComputeJacobianWithRespectToPosition(const InputPointType &x, JacobianType &jacobian) const)
 
 itkLegacyMacro (virtual void ComputeInverseJacobianWithRespectToPosition(const InputPointType &x, JacobianType &jacobian) const)
 
- Public Member Functions inherited from itk::TransformBaseTemplate< TParametersValueType >
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 void SetFixedParameters (const FixedParametersType &)=0
 
virtual void SetParameters (const ParametersType &)=0
 
virtual void SetParametersByValue (const ParametersType &p)=0
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
unsigned long AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexcept override
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
Pointer Clone () const
 
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::MatrixOffsetTransformBase< TParametersValueType, NDimensions, NDimensions >
static Pointer New ()
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool val)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Static Public Attributes

static constexpr unsigned int InputSpaceDimension = NDimensions
 
static constexpr unsigned int OutputSpaceDimension = NDimensions
 
static constexpr unsigned int ParametersDimension = NDimensions * (NDimensions + 1)
 
static constexpr unsigned int SpaceDimension = NDimensions
 
- Static Public Attributes inherited from itk::MatrixOffsetTransformBase< TParametersValueType, NDimensions, NDimensions >
static constexpr unsigned int InputSpaceDimension
 
static constexpr unsigned int OutputSpaceDimension
 
static constexpr unsigned int ParametersDimension
 
- Static Public Attributes inherited from itk::Transform< TParametersValueType, NInputDimensions, NOutputDimensions >
static constexpr unsigned int InputSpaceDimension = NInputDimensions
 
static constexpr unsigned int OutputSpaceDimension = NOutputDimensions
 
void Rotate (int axis1, int axis2, TParametersValueType angle, bool pre=false)
 
void Rotate2D (TParametersValueType angle, bool pre=false)
 
void Rotate3D (const OutputVectorType &axis, TParametersValueType angle, bool pre=false)
 
void Shear (int axis1, int axis2, TParametersValueType coef, bool pre=false)
 
bool GetInverse (Self *inverse) const
 
InverseTransformBasePointer GetInverseTransform () const override
 
ScalarType Metric (const Self *other) const
 
ScalarType Metric () const
 
 AffineTransform (const MatrixType &matrix, const OutputVectorType &offset)
 
 AffineTransform (unsigned int parametersDimension)
 
 AffineTransform ()
 
 ~AffineTransform () override=default
 
void PrintSelf (std::ostream &os, Indent indent) const override
 

Additional Inherited Members

- Protected Member Functions inherited from itk::MatrixOffsetTransformBase< TParametersValueType, NDimensions, NDimensions >
const InverseMatrixTypeGetInverseMatrix () const
 
 MatrixOffsetTransformBase (const MatrixType &matrix, const OutputVectorType &offset)
 
 MatrixOffsetTransformBase (unsigned int paramDims)
 
 MatrixOffsetTransformBase ()
 
 ~MatrixOffsetTransformBase () override=default
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
const InverseMatrixTypeGetVarInverseMatrix () const
 
void SetVarInverseMatrix (const InverseMatrixType &matrix) const
 
bool InverseMatrixIsOld () const
 
virtual void ComputeMatrixParameters ()
 
virtual void ComputeMatrix ()
 
void SetVarMatrix (const MatrixType &matrix)
 
virtual void ComputeTranslation ()
 
void SetVarTranslation (const OutputVectorType &translation)
 
virtual void ComputeOffset ()
 
void SetVarOffset (const OutputVectorType &offset)
 
void SetVarCenter (const InputPointType &center)
 
virtual bool GetSingular () const
 
- Protected Member Functions inherited from itk::Transform< TParametersValueType, NInputDimensions, NOutputDimensions >
LightObject::Pointer InternalClone () const override
 
 Transform ()
 
 Transform (NumberOfParametersType numberOfParameters)
 
 ~Transform () override=default
 
OutputDiffusionTensor3DType PreservationOfPrincipalDirectionDiffusionTensor3DReorientation (const InputDiffusionTensor3DType &, const InverseJacobianPositionType &) const
 
- Protected Member Functions inherited from itk::TransformBaseTemplate< TParametersValueType >
 TransformBaseTemplate ()=default
 
 ~TransformBaseTemplate () override=default
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
 ~Object () override
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &timeStamp)
 
- Protected Member Functions inherited from itk::LightObject
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 
- Protected Attributes inherited from itk::Transform< TParametersValueType, NInputDimensions, NOutputDimensions >
ParametersType m_Parameters
 
FixedParametersType m_FixedParameters
 
DirectionChangeMatrix m_DirectionChange
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount
 

Detailed Description

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

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.

NDimensions 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 (NDimension + 1) * NDimension using method SetParameters(). The first (NDimension x NDimension) parameters defines the matrix in row-major order (where the column index varies the fastest). The last NDimension 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.

Examples
Examples/Filtering/ResampleImageFilter.cxx, Examples/Filtering/ResampleImageFilter2.cxx, Examples/Filtering/ResampleImageFilter3.cxx, Examples/Filtering/ResampleImageFilter4.cxx, Examples/Filtering/ResampleImageFilter7.cxx, Examples/Filtering/ResampleImageFilter8.cxx, Examples/IO/TransformReadWrite.cxx, Examples/RegistrationITKv4/DeformableRegistration15.cxx, Examples/RegistrationITKv4/ImageRegistration19.cxx, Examples/RegistrationITKv4/ImageRegistration20.cxx, Examples/RegistrationITKv4/ImageRegistration9.cxx, Examples/RegistrationITKv4/MultiResImageRegistration2.cxx, Examples/RegistrationITKv4/MultiStageImageRegistration1.cxx, Examples/RegistrationITKv4/MultiStageImageRegistration2.cxx, SphinxExamples/src/Core/Transform/ApplyAffineTransformFromHomogeneousMatrixAndResample/Code.cxx, SphinxExamples/src/Core/Transform/GlobalRegistrationTwoImagesAffine/Code.cxx, SphinxExamples/src/Core/Transform/MutualInformationAffine/Code.cxx, SphinxExamples/src/Registration/Common/WatchRegistration/Code.cxx, SphinxExamples/src/Registration/Metricsv4/PerformRegistrationOnVectorImages/Code.cxx, and SphinxExamples/src/Registration/Metricsv4/RegisterTwoPointSets/Code.cxx.

Definition at line 101 of file itkAffineTransform.h.

Member Typedef Documentation

◆ CenterType

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

Definition at line 143 of file itkAffineTransform.h.

◆ ConstPointer

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

Definition at line 112 of file itkAffineTransform.h.

◆ FixedParametersType

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

Definition at line 128 of file itkAffineTransform.h.

◆ InputCovariantVectorType

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

Definition at line 139 of file itkAffineTransform.h.

◆ InputPointType

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

Definition at line 133 of file itkAffineTransform.h.

◆ InputVectorType

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

Definition at line 135 of file itkAffineTransform.h.

◆ InputVnlVectorType

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

Definition at line 137 of file itkAffineTransform.h.

◆ InverseJacobianPositionType

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

Definition at line 131 of file itkAffineTransform.h.

◆ InverseMatrixType

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

Definition at line 142 of file itkAffineTransform.h.

◆ InverseTransformBasePointer

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

Definition at line 150 of file itkAffineTransform.h.

◆ InverseTransformBaseType

template<typename TParametersValueType = double, unsigned int NDimensions = 3>
using itk::AffineTransform< TParametersValueType, NDimensions >::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.

◆ JacobianPositionType

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

Definition at line 130 of file itkAffineTransform.h.

◆ JacobianType

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

Definition at line 129 of file itkAffineTransform.h.

◆ MatrixType

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

Definition at line 141 of file itkAffineTransform.h.

◆ OffsetType

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

Definition at line 144 of file itkAffineTransform.h.

◆ OutputCovariantVectorType

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

Definition at line 140 of file itkAffineTransform.h.

◆ OutputPointType

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

Definition at line 134 of file itkAffineTransform.h.

◆ OutputVectorType

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

Definition at line 136 of file itkAffineTransform.h.

◆ OutputVnlVectorType

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

Definition at line 138 of file itkAffineTransform.h.

◆ ParametersType

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

Parameters Type

Definition at line 127 of file itkAffineTransform.h.

◆ Pointer

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

Definition at line 111 of file itkAffineTransform.h.

◆ ScalarType

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

Definition at line 132 of file itkAffineTransform.h.

◆ Self

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

Standard type alias

Definition at line 108 of file itkAffineTransform.h.

◆ Superclass

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

Definition at line 109 of file itkAffineTransform.h.

◆ TranslationType

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

Definition at line 145 of file itkAffineTransform.h.

Constructor & Destructor Documentation

◆ AffineTransform() [1/3]

template<typename TParametersValueType = double, unsigned int NDimensions = 3>
itk::AffineTransform< TParametersValueType, NDimensions >::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 NDimensions = 3>
itk::AffineTransform< TParametersValueType, NDimensions >::AffineTransform ( unsigned int  parametersDimension)
protected

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. 

◆ AffineTransform() [3/3]

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

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. 

◆ ~AffineTransform()

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

Destroy an AffineTransform object

Member Function Documentation

◆ CreateAnother()

template<typename TParametersValueType = double, unsigned int NDimensions = 3>
virtual::itk::LightObject::Pointer itk::AffineTransform< TParametersValueType, NDimensions >::CreateAnother ( ) const
virtual

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from itk::Object.

Reimplemented in itk::AzimuthElevationToCartesianTransform< TParametersValueType, NDimensions >, itk::FixedCenterOfRotationAffineTransform< TParametersValueType, NDimensions >, itk::CenteredAffineTransform< TParametersValueType, NDimensions >, and itk::ScalableAffineTransform< TParametersValueType, NDimensions >.

◆ GetInverse()

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

Get an inverse of this transform.

◆ GetInverseTransform()

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

◆ GetNameOfClass()

template<typename TParametersValueType = double, unsigned int NDimensions = 3>
virtual const char* itk::AffineTransform< TParametersValueType, NDimensions >::GetNameOfClass ( ) const
virtual

◆ Metric() [1/2]

template<typename TParametersValueType = double, unsigned int NDimensions = 3>
ScalarType itk::AffineTransform< TParametersValueType, NDimensions >::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 NDimensions = 3>
ScalarType itk::AffineTransform< TParametersValueType, NDimensions >::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.)

◆ New()

template<typename TParametersValueType = double, unsigned int NDimensions = 3>
static Pointer itk::AffineTransform< TParametersValueType, NDimensions >::New ( )
static

◆ PrintSelf()

template<typename TParametersValueType = double, unsigned int NDimensions = 3>
void itk::AffineTransform< TParametersValueType, NDimensions >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotectedvirtual

◆ Rotate()

template<typename TParametersValueType = double, unsigned int NDimensions = 3>
void itk::AffineTransform< TParametersValueType, NDimensions >::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 NDimensions = 3>
void itk::AffineTransform< TParametersValueType, NDimensions >::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 NDimensions != 2.

◆ Rotate3D()

template<typename TParametersValueType = double, unsigned int NDimensions = 3>
void itk::AffineTransform< TParametersValueType, NDimensions >::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 NDimensions != 3.

◆ Scale() [1/2]

template<typename TParametersValueType = double, unsigned int NDimensions = 3>
void itk::AffineTransform< TParametersValueType, NDimensions >::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 NDimensions = 3>
void itk::AffineTransform< TParametersValueType, NDimensions >::Scale ( const TParametersValueType &  factor,
bool  pre = false 
)

◆ Shear()

template<typename TParametersValueType = double, unsigned int NDimensions = 3>
void itk::AffineTransform< TParametersValueType, NDimensions >::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 NDimensions = 3>
void itk::AffineTransform< TParametersValueType, NDimensions >::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 NDimensions = 3>
constexpr unsigned int itk::AffineTransform< TParametersValueType, NDimensions >::InputSpaceDimension = NDimensions
staticconstexpr

Dimension of the domain space.

Definition at line 121 of file itkAffineTransform.h.

◆ OutputSpaceDimension

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

Definition at line 122 of file itkAffineTransform.h.

◆ ParametersDimension

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

Definition at line 124 of file itkAffineTransform.h.

◆ SpaceDimension

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

Definition at line 123 of file itkAffineTransform.h.


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