go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes
itk::AdvancedSimilarity2DTransform< TScalarType > Class Template Reference

#include <itkAdvancedSimilarity2DTransform.h>

Detailed Description

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

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

This transform applies a homogenous scale and rigid transform in 2D space. The transform is specified as a scale and rotation around a arbitrary center and is followed by a translation. given one angle for rotation, a homogeneous scale and a 2D offset for translation.

The parameters for this transform can be set either using individual Set methods or in serialized form using SetParameters() and SetFixedParameters().

The serialization of the optimizable parameters is an array of 3 elements ordered as follows: p[0] = scale p[1] = angle p[2] = x component of the translation p[3] = y component of the translation

The serialization of the fixed parameters is an array of 2 elements ordered as follows: p[0] = x coordinate of the center p[1] = y coordinate of the center

Access methods for the center, translation and underlying matrix offset vectors are documented in the superclass MatrixOffsetTransformBase.

Access methods for the angle are documented in superclass Rigid2DTransform.

See also
Transform
MatrixOffsetTransformBase
Rigid2DTransform

Definition at line 78 of file itkAdvancedSimilarity2DTransform.h.

Inheritance diagram for itk::AdvancedSimilarity2DTransform< TScalarType >:
Inheritance graph
[legend]

Public Types

using ConstPointer = SmartPointer< const Self >
 
using MatrixType = Matrix< TScalarType, Self::OutputSpaceDimension, Self::InputSpaceDimension >
 
using OffsetType = OutputVectorType
 
using Pointer = SmartPointer< Self >
 
using ScaleType = TScalarType
 
using Self = AdvancedSimilarity2DTransform
 
using Superclass = AdvancedRigid2DTransform< TScalarType >
 
- Public Types inherited from itk::AdvancedRigid2DTransform< TScalarType >
using ConstPointer = SmartPointer< const Self >
 
using MatrixType = Matrix< TScalarType, Self::OutputSpaceDimension, Self::InputSpaceDimension >
 
using OffsetType = OutputVectorType
 
using Pointer = SmartPointer< Self >
 
using Self = AdvancedRigid2DTransform
 
using Superclass = AdvancedMatrixOffsetTransformBase< TScalarType, 2, 2 >
 
- Public Types inherited from itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >
using CenterType = InputPointType
 
using ConstPointer = SmartPointer< const Self >
 
using InverseMatrixType = Matrix< TScalarType, Self::InputSpaceDimension, Self::OutputSpaceDimension >
 
using MatrixType = Matrix< TScalarType, Self::OutputSpaceDimension, Self::InputSpaceDimension >
 
using OffsetType = OutputVectorType
 
using Pointer = SmartPointer< Self >
 
using Self = AdvancedMatrixOffsetTransformBase
 
using Superclass = AdvancedTransform< TScalarType, NInputDimensions, NOutputDimensions >
 
using TranslationType = OutputVectorType
 
- Public Types inherited from itk::AdvancedTransform< TScalarType, NInputDimensions, NOutputDimensions >
using ConstPointer = SmartPointer< const Self >
 
using InternalMatrixType = typename SpatialJacobianType::InternalMatrixType
 
using InverseTransformBaseType = typename Superclass::InverseTransformBaseType
 
using JacobianOfSpatialHessianType = std::vector< SpatialHessianType >
 
using JacobianOfSpatialJacobianType = std::vector< SpatialJacobianType >
 
using MovingImageGradientType = OutputCovariantVectorType
 
using MovingImageGradientValueType = typename MovingImageGradientType::ValueType
 
using NonZeroJacobianIndicesType = std::vector< unsigned long >
 
using Pointer = SmartPointer< Self >
 
using Self = AdvancedTransform
 
using SpatialHessianType = FixedArray< Matrix< ScalarType, InputSpaceDimension, InputSpaceDimension >, OutputSpaceDimension >
 
using SpatialJacobianType = Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension >
 
using Superclass = Transform< TScalarType, NInputDimensions, NOutputDimensions >
 
using TransformType = Transform< TScalarType, NInputDimensions, NOutputDimensions >
 
using TransformTypeConstPointer = typename TransformType::ConstPointer
 
using TransformTypePointer = typename TransformType::Pointer
 

Public Member Functions

virtual const char * GetClassName () const
 
void GetJacobian (const InputPointType &, JacobianType &, NonZeroJacobianIndicesType &) const override
 
const ParametersType & GetParameters () const override
 
virtual const ScaleTypeGetScale ()
 
 ITK_DISALLOW_COPY_AND_MOVE (AdvancedSimilarity2DTransform)
 
 itkStaticConstMacro (InputSpaceDimension, unsigned int, 2)
 
 itkStaticConstMacro (OutputSpaceDimension, unsigned int, 2)
 
 itkStaticConstMacro (ParametersDimension, unsigned int, 4)
 
 itkStaticConstMacro (SpaceDimension, unsigned int, 2)
 
void SetIdentity () override
 
void SetMatrix (const MatrixType &matrix) override
 
void SetParameters (const ParametersType &parameters) override
 
void SetScale (ScaleType scale)
 
- Public Member Functions inherited from itk::AdvancedRigid2DTransform< TScalarType >
virtual const TScalarTypeGetAngle ()
 
virtual const char * GetClassName () const
 
void GetJacobian (const InputPointType &, JacobianType &, NonZeroJacobianIndicesType &) const override
 
const ParametersType & GetParameters () const override
 
 ITK_DISALLOW_COPY_AND_MOVE (AdvancedRigid2DTransform)
 
 itkStaticConstMacro (InputSpaceDimension, unsigned int, 2)
 
 itkStaticConstMacro (OutputSpaceDimension, unsigned int, 2)
 
 itkStaticConstMacro (ParametersDimension, unsigned int, 3)
 
void SetAngle (TScalarType angle)
 
void SetIdentity () override
 
void SetMatrix (const MatrixType &matrix) override
 
void SetParameters (const ParametersType &parameters) override
 
- Public Member Functions inherited from itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >
const InputPointType & GetCenter () const
 
virtual const char * GetClassName () const
 
const FixedParametersType & GetFixedParameters () const override
 
void GetJacobian (const InputPointType &, JacobianType &, NonZeroJacobianIndicesType &) 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 SetIdentity ()
 
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< TScalarType, NInputDimensions, NOutputDimensions >
void ComputeJacobianWithRespectToParameters (const InputPointType &, JacobianType &) const override
 
virtual void EvaluateJacobianWithImageGradientProduct (const InputPointType &inputPoint, const MovingImageGradientType &movingImageGradient, DerivativeType &imageJacobian, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const
 
virtual const char * GetClassName () const
 
virtual bool GetHasNonZeroJacobianOfSpatialHessian () const
 
virtual bool GetHasNonZeroSpatialHessian () const
 
virtual void GetJacobian (const InputPointType &inputPoint, JacobianType &j, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const =0
 
virtual void GetJacobianOfSpatialHessian (const InputPointType &inputPoint, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const =0
 
virtual void GetJacobianOfSpatialHessian (const InputPointType &inputPoint, SpatialHessianType &sh, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const =0
 
virtual void GetJacobianOfSpatialJacobian (const InputPointType &inputPoint, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const =0
 
virtual void GetJacobianOfSpatialJacobian (const InputPointType &inputPoint, SpatialJacobianType &sj, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const =0
 
virtual NumberOfParametersType GetNumberOfNonZeroJacobianIndices () const
 
virtual void GetSpatialHessian (const InputPointType &inputPoint, SpatialHessianType &sh) const =0
 
virtual void GetSpatialJacobian (const InputPointType &inputPoint, SpatialJacobianType &sj) const =0
 
 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::AdvancedRigid2DTransform< TScalarType >
static Pointer New ()
 
- Static Public Member Functions inherited from itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >
static Pointer New ()
 

Protected Member Functions

 AdvancedSimilarity2DTransform ()
 
void ComputeMatrix () override
 
void ComputeMatrixParameters () override
 
void PrecomputeJacobianOfSpatialJacobian () override
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
void SetVarScale (ScaleType scale)
 
 ~AdvancedSimilarity2DTransform () override=default
 
- Protected Member Functions inherited from itk::AdvancedRigid2DTransform< TScalarType >
 AdvancedRigid2DTransform ()
 
 AdvancedRigid2DTransform (unsigned int outputSpaceDimension, unsigned int parametersDimension)
 
void ComputeMatrix () override
 
void ComputeMatrixParameters () override
 
virtual void PrecomputeJacobianOfSpatialJacobian ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
void SetVarAngle (TScalarType angle)
 
 ~AdvancedRigid2DTransform () override=default
 
- Protected Member Functions inherited from itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >
 AdvancedMatrixOffsetTransformBase (const unsigned int paramDims=ParametersDimension)
 
virtual void ComputeMatrix ()
 
virtual void ComputeMatrixParameters ()
 
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< TScalarType, NInputDimensions, NOutputDimensions >
 AdvancedTransform ()=default
 
 ~AdvancedTransform () override=default
 

Private Attributes

ScaleType m_Scale
 

Additional Inherited Members

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

Member Typedef Documentation

◆ ConstPointer

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

Definition at line 87 of file itkAdvancedSimilarity2DTransform.h.

◆ MatrixType

template<class TScalarType = double>
using itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::MatrixType = Matrix<TScalarType, Self::OutputSpaceDimension, Self::InputSpaceDimension>

Standard matrix type for this class.

Definition at line 109 of file itkAdvancedMatrixOffsetTransformBase.h.

◆ OffsetType

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

Definition at line 112 of file itkAdvancedMatrixOffsetTransformBase.h.

◆ Pointer

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

Definition at line 86 of file itkAdvancedSimilarity2DTransform.h.

◆ ScaleType

template<class TScalarType = double>
using itk::AdvancedSimilarity2DTransform< TScalarType >::ScaleType = TScalarType

Definition at line 103 of file itkAdvancedSimilarity2DTransform.h.

◆ Self

Standard class typedefs.

Definition at line 84 of file itkAdvancedSimilarity2DTransform.h.

◆ Superclass

Definition at line 85 of file itkAdvancedSimilarity2DTransform.h.

Constructor & Destructor Documentation

◆ AdvancedSimilarity2DTransform()

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

◆ ~AdvancedSimilarity2DTransform()

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

Member Function Documentation

◆ ComputeMatrix()

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

Compute matrix from angle and scale. This is used in Set methods to update the underlying matrix whenever a transform parameter is changed.

Reimplemented from itk::AdvancedRigid2DTransform< TScalarType >.

◆ ComputeMatrixParameters()

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

Compute the angle and scale from the matrix. This is used to compute transform parameters from a given matrix. This is used in MatrixOffsetTransformBase::Compose() and MatrixOffsetTransformBase::GetInverse().

Reimplemented from itk::AdvancedRigid2DTransform< TScalarType >.

◆ GetClassName()

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

Run-time type information (and related methods).

Reimplemented from itk::AdvancedRigid2DTransform< TScalarType >.

Reimplemented in itk::GPUAdvancedSimilarity2DTransform< TScalarType, TParentTransform >.

◆ GetJacobian()

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

This method computes the Jacobian matrix of the transformation at a given input point.

See also
Transform::GetJacobian() Compute the Jacobian of the transformation.

Reimplemented from itk::AdvancedRigid2DTransform< TScalarType >.

◆ GetParameters()

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

Get the parameters that uniquely define the transform This is typically used by optimizers. There are 4 parameters. The first one represents the scale, the second represents the angle of rotation, and the last two represent the translation. The center of rotation is fixed.

See also
Transform::GetParameters()
Transform::GetFixedParameters()

◆ GetScale()

template<class TScalarType = double>
virtual const ScaleType & itk::AdvancedSimilarity2DTransform< TScalarType >::GetScale ( )
virtual

◆ ITK_DISALLOW_COPY_AND_MOVE()

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

◆ itkStaticConstMacro() [1/4]

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

◆ itkStaticConstMacro() [2/4]

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

◆ itkStaticConstMacro() [3/4]

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

◆ itkStaticConstMacro() [4/4]

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

Dimension of parameters.

◆ New()

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

New macro for creation of through a Smart Pointer.

◆ PrecomputeJacobianOfSpatialJacobian()

template<class TScalarType = double>
void itk::AdvancedSimilarity2DTransform< TScalarType >::PrecomputeJacobianOfSpatialJacobian ( )
overrideprotectedvirtual

Update the m_JacobianOfSpatialJacobian.

Reimplemented from itk::AdvancedRigid2DTransform< TScalarType >.

◆ PrintSelf()

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

◆ SetIdentity()

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

Set the transformation to an identity.

Reimplemented from itk::AdvancedRigid2DTransform< TScalarType >.

◆ SetMatrix()

template<class TScalarType = double>
void itk::AdvancedSimilarity2DTransform< TScalarType >::SetMatrix ( const MatrixType matrix)
overridevirtual

Set the rotation Matrix of a Similarity 2D Transform

This method sets the 2x2 matrix representing a similarity transform. The Matrix is expected to be a valid similarity transform with a certain tolerance.

Warning
This method will throw an exception if the matrix provided as argument is not valid.
See also
MatrixOffsetTransformBase::SetMatrix()

Reimplemented from itk::AdvancedRigid2DTransform< TScalarType >.

◆ SetParameters()

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

Set the transformation from a container of parameters This is typically used by optimizers. There are 4 parameters. The first one represents the scale, the second represents the angle of rotation and the last two represent the translation. The center of rotation is fixed.

See also
Transform::SetParameters()
Transform::SetFixedParameters()

◆ SetScale()

template<class TScalarType = double>
void itk::AdvancedSimilarity2DTransform< TScalarType >::SetScale ( ScaleType  scale)

Set the Scale part of the transform.

◆ SetVarScale()

template<class TScalarType = double>
void itk::AdvancedSimilarity2DTransform< TScalarType >::SetVarScale ( ScaleType  scale)
inlineprotected

Set the scale without updating underlying variables.

Definition at line 221 of file itkAdvancedSimilarity2DTransform.h.

Field Documentation

◆ m_Scale

template<class TScalarType = double>
ScaleType itk::AdvancedSimilarity2DTransform< TScalarType >::m_Scale
private

Definition at line 231 of file itkAdvancedSimilarity2DTransform.h.



Generated on 2023-01-13 for elastix by doxygen 1.9.6 elastix logo