Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itk::AffineTransform< TScalarType, NDimensions > Class Template Reference
[Transforms]

#include <itkAffineTransform.h>

Inheritance diagram for itk::AffineTransform:

Inheritance graph
[legend]
Collaboration diagram for itk::AffineTransform< TScalarType, NDimensions >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef AffineTransform Self
typedef Transform< TScalarType,
NDimensions, NDimensions > 
Superclass
typedef SmartPointer< SelfPointer
typedef SmartPointer< const
Self
ConstPointer
typedef Superclass::ParametersType ParametersType
typedef Superclass::JacobianType JacobianType
typedef Superclass::ScalarType ScalarType
typedef Matrix< TScalarType,
itkGetStaticConstMacro(SpaceDimension),
itkGetStaticConstMacro(SpaceDimension) 
MatrixType )
typedef OutputVectorType OffsetType
typedef Vector< TScalarType,
itkGetStaticConstMacro(SpaceDimension) 
InputVectorType )
typedef Vector< TScalarType,
itkGetStaticConstMacro(SpaceDimension) 
OutputVectorType )
typedef CovariantVector< TScalarType,
itkGetStaticConstMacro(SpaceDimension) 
InputCovariantVectorType )
typedef CovariantVector< TScalarType,
itkGetStaticConstMacro(SpaceDimension) 
OutputCovariantVectorType )
typedef vnl_vector_fixed<
TScalarType, itkGetStaticConstMacro(SpaceDimension) 
InputVnlVectorType )
typedef vnl_vector_fixed<
TScalarType, itkGetStaticConstMacro(SpaceDimension) 
OutputVnlVectorType )
typedef Point< TScalarType,
itkGetStaticConstMacro(SpaceDimension) 
InputPointType )
typedef Point< TScalarType,
itkGetStaticConstMacro(SpaceDimension) 
OutputPointType )

Public Methods

virtual const char * GetClassName () const
const OffsetTypeGetOffset (void) const
const MatrixTypeGetMatrix () const
void SetOffset (const OffsetType &offset)
void SetMatrix (const MatrixType &matrix)
void SetParameters (const ParametersType &parameters)
const ParametersTypeGetParameters (void) const
void Compose (const Self *other, bool pre=0)
void Translate (const OutputVectorType &offset, bool pre=0)
void Rotate2D (TScalarType angle, bool pre=0)
void Rotate3D (const OutputVectorType &axis, TScalarType angle, bool pre=0)
void Shear (int axis1, int axis2, TScalarType coef, bool pre=0)
InputCovariantVectorType BackTransform (const OutputCovariantVectorType &vector) const
InputPointType BackTransformPoint (const OutputPointType &point) const
AffineTransform::Pointer Inverse (void) const
ScalarType Metric (const Self *other) const
ScalarType Metric (void) const
void PrintSelf (std::ostream &s, Indent indent) const
const JacobianTypeGetJacobian (const InputPointType &point) const
 itkStaticConstMacro (SpaceDimension, unsigned int, NDimensions)
 itkStaticConstMacro (ParametersDimension, unsigned int, NDimensions *(NDimensions+1))
void SetIdentity (void)
const MatrixTypeGetInverse () const
void Scale (const OutputVectorType &factor, bool pre=0)
void Scale (const TScalarType &factor, bool pre=0)
void Rotate (int axis1, int axis2, TScalarType angle, bool pre=0)
OutputPointType TransformPoint (const InputPointType &point) const
OutputVectorType TransformVector (const InputVectorType &vector) const
OutputVnlVectorType TransformVector (const InputVnlVectorType &vector) const
OutputCovariantVectorType TransformCovariantVector (const InputCovariantVectorType &vector) const
InputPointType BackTransform (const OutputPointType &point) const
InputVectorType BackTransform (const OutputVectorType &vector) const
InputVnlVectorType BackTransform (const OutputVnlVectorType &vector) const

Static Public Methods

Pointer New ()

Protected Methods

virtual ~AffineTransform ()
void RecomputeInverse ()
 AffineTransform (const MatrixType &matrix, const OutputVectorType &offset)
 AffineTransform (unsigned int outputSpaceDimension, unsigned int parametersDimension)
 AffineTransform ()

Detailed Description

template<class TScalarType = double, unsigned int NDimensions = 3>
class itk::AffineTransform< TScalarType, 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:

ScalarT 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 column-major order (where the column index) varies the fastest). The last NDimension parameters defines the translation or offest in each dimensions.

Todo:
Is there any real value in allowing the user to template over the scalar type? Perhaps it should always be double, unless there's a compatibility problem with the Point class.

Add methods to transform (or back transform) many points or vectors at once?

Add reflection? *

Definition at line 112 of file itkAffineTransform.h.


Member Typedef Documentation

template<class TScalarType = double, unsigned int NDimensions = 3>
typedef SmartPointer<const Self> itk::AffineTransform< TScalarType, NDimensions >::ConstPointer
 

Reimplemented from itk::Transform< TScalarType, NDimensions, NDimensions >.

Reimplemented in itk::AzimuthElevationToCartesianTransform< TScalarType, NDimensions >, and itk::CenteredAffineTransform< TScalarType, NDimensions >.

Definition at line 121 of file itkAffineTransform.h.

template<class TScalarType = double, unsigned int NDimensions = 3>
typedef CovariantVector<TScalarType, itkGetStaticConstMacro(SpaceDimension) itk::AffineTransform< TScalarType, NDimensions >::InputCovariantVectorType)
 

Standard covariant vector type for this class

Reimplemented from itk::Transform< TScalarType, NDimensions, NDimensions >.

Reimplemented in itk::CenteredAffineTransform< TScalarType, NDimensions >.

Definition at line 154 of file itkAffineTransform.h.

template<class TScalarType = double, unsigned int NDimensions = 3>
typedef Point<TScalarType, itkGetStaticConstMacro(SpaceDimension) itk::AffineTransform< TScalarType, NDimensions >::InputPointType)
 

Standard coordinate point type for this class

Reimplemented from itk::Transform< TScalarType, NDimensions, NDimensions >.

Reimplemented in itk::AzimuthElevationToCartesianTransform< TScalarType, NDimensions >, and itk::CenteredAffineTransform< TScalarType, NDimensions >.

Definition at line 168 of file itkAffineTransform.h.

template<class TScalarType = double, unsigned int NDimensions = 3>
typedef Vector<TScalarType, itkGetStaticConstMacro(SpaceDimension) itk::AffineTransform< TScalarType, NDimensions >::InputVectorType)
 

Standard vector type for this class

Reimplemented from itk::Transform< TScalarType, NDimensions, NDimensions >.

Reimplemented in itk::CenteredAffineTransform< TScalarType, NDimensions >.

Definition at line 147 of file itkAffineTransform.h.

template<class TScalarType = double, unsigned int NDimensions = 3>
typedef vnl_vector_fixed<TScalarType, itkGetStaticConstMacro(SpaceDimension) itk::AffineTransform< TScalarType, NDimensions >::InputVnlVectorType)
 

Standard vnl_vector type for this class

Reimplemented from itk::Transform< TScalarType, NDimensions, NDimensions >.

Reimplemented in itk::CenteredAffineTransform< TScalarType, NDimensions >.

Definition at line 161 of file itkAffineTransform.h.

template<class TScalarType = double, unsigned int NDimensions = 3>
typedef Superclass::JacobianType itk::AffineTransform< TScalarType, NDimensions >::JacobianType
 

Jacobian Type

Reimplemented from itk::Transform< TScalarType, NDimensions, NDimensions >.

Reimplemented in itk::AzimuthElevationToCartesianTransform< TScalarType, NDimensions >, and itk::CenteredAffineTransform< TScalarType, NDimensions >.

Definition at line 140 of file itkAffineTransform.h.

template<class TScalarType = double, unsigned int NDimensions = 3>
typedef Matrix<TScalarType, itkGetStaticConstMacro(SpaceDimension), itkGetStaticConstMacro(SpaceDimension) itk::AffineTransform< TScalarType, NDimensions >::MatrixType)
 

Standard matrix type for this class

Reimplemented in itk::AzimuthElevationToCartesianTransform< TScalarType, NDimensions >, and itk::CenteredAffineTransform< TScalarType, NDimensions >.

Definition at line 175 of file itkAffineTransform.h.

template<class TScalarType = double, unsigned int NDimensions = 3>
typedef OutputVectorType itk::AffineTransform< TScalarType, NDimensions >::OffsetType
 

Standard offset type for this class

Reimplemented in itk::CenteredAffineTransform< TScalarType, NDimensions >.

Definition at line 178 of file itkAffineTransform.h.

template<class TScalarType = double, unsigned int NDimensions = 3>
typedef CovariantVector<TScalarType, itkGetStaticConstMacro(SpaceDimension) itk::AffineTransform< TScalarType, NDimensions >::OutputCovariantVectorType)
 

Standard covariant vector type for this class

Reimplemented from itk::Transform< TScalarType, NDimensions, NDimensions >.

Reimplemented in itk::CenteredAffineTransform< TScalarType, NDimensions >.

Definition at line 156 of file itkAffineTransform.h.

template<class TScalarType = double, unsigned int NDimensions = 3>
typedef Point<TScalarType, itkGetStaticConstMacro(SpaceDimension) itk::AffineTransform< TScalarType, NDimensions >::OutputPointType)
 

Standard coordinate point type for this class

Reimplemented from itk::Transform< TScalarType, NDimensions, NDimensions >.

Reimplemented in itk::AzimuthElevationToCartesianTransform< TScalarType, NDimensions >, and itk::CenteredAffineTransform< TScalarType, NDimensions >.

Definition at line 170 of file itkAffineTransform.h.

template<class TScalarType = double, unsigned int NDimensions = 3>
typedef Vector<TScalarType, itkGetStaticConstMacro(SpaceDimension) itk::AffineTransform< TScalarType, NDimensions >::OutputVectorType)
 

Standard vector type for this class

Reimplemented from itk::Transform< TScalarType, NDimensions, NDimensions >.

Reimplemented in itk::CenteredAffineTransform< TScalarType, NDimensions >.

Definition at line 149 of file itkAffineTransform.h.

template<class TScalarType = double, unsigned int NDimensions = 3>
typedef vnl_vector_fixed<TScalarType, itkGetStaticConstMacro(SpaceDimension) itk::AffineTransform< TScalarType, NDimensions >::OutputVnlVectorType)
 

Standard vnl_vector type for this class

Reimplemented from itk::Transform< TScalarType, NDimensions, NDimensions >.

Reimplemented in itk::CenteredAffineTransform< TScalarType, NDimensions >.

Definition at line 163 of file itkAffineTransform.h.

template<class TScalarType = double, unsigned int NDimensions = 3>
typedef Superclass::ParametersType itk::AffineTransform< TScalarType, NDimensions >::ParametersType
 

Parameters Type

Reimplemented from itk::Transform< TScalarType, NDimensions, NDimensions >.

Reimplemented in itk::AzimuthElevationToCartesianTransform< TScalarType, NDimensions >, and itk::CenteredAffineTransform< TScalarType, NDimensions >.

Definition at line 137 of file itkAffineTransform.h.

template<class TScalarType = double, unsigned int NDimensions = 3>
typedef SmartPointer<Self> itk::AffineTransform< TScalarType, NDimensions >::Pointer
 

Reimplemented from itk::Transform< TScalarType, NDimensions, NDimensions >.

Reimplemented in itk::AzimuthElevationToCartesianTransform< TScalarType, NDimensions >, and itk::CenteredAffineTransform< TScalarType, NDimensions >.

Definition at line 120 of file itkAffineTransform.h.

template<class TScalarType = double, unsigned int NDimensions = 3>
typedef Superclass::ScalarType itk::AffineTransform< TScalarType, NDimensions >::ScalarType
 

Standard scalar type for this class

Reimplemented from itk::Transform< TScalarType, NDimensions, NDimensions >.

Reimplemented in itk::AzimuthElevationToCartesianTransform< TScalarType, NDimensions >, and itk::CenteredAffineTransform< TScalarType, NDimensions >.

Definition at line 143 of file itkAffineTransform.h.

template<class TScalarType = double, unsigned int NDimensions = 3>
typedef AffineTransform itk::AffineTransform< TScalarType, NDimensions >::Self
 

Standard typedefs

Reimplemented from itk::Transform< TScalarType, NDimensions, NDimensions >.

Reimplemented in itk::AzimuthElevationToCartesianTransform< TScalarType, NDimensions >, and itk::CenteredAffineTransform< TScalarType, NDimensions >.

Definition at line 118 of file itkAffineTransform.h.

template<class TScalarType = double, unsigned int NDimensions = 3>
typedef Transform< TScalarType, NDimensions, NDimensions > itk::AffineTransform< TScalarType, NDimensions >::Superclass
 

Reimplemented from itk::Transform< TScalarType, NDimensions, NDimensions >.

Reimplemented in itk::AzimuthElevationToCartesianTransform< TScalarType, NDimensions >, and itk::CenteredAffineTransform< TScalarType, NDimensions >.

Definition at line 119 of file itkAffineTransform.h.


Constructor & Destructor Documentation

template<class TScalarType = double, unsigned int NDimensions = 3>
itk::AffineTransform< TScalarType, 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. *

template<class TScalarType = double, unsigned int NDimensions = 3>
itk::AffineTransform< TScalarType, NDimensions >::AffineTransform unsigned int    outputSpaceDimension,
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. *

template<class TScalarType = double, unsigned int NDimensions = 3>
itk::AffineTransform< TScalarType, NDimensions >::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. *

template<class TScalarType = double, unsigned int NDimensions = 3>
virtual itk::AffineTransform< TScalarType, NDimensions >::~AffineTransform   [protected, virtual]
 

Destroy an AffineTransform object *


Member Function Documentation

template<class TScalarType = double, unsigned int NDimensions = 3>
InputCovariantVectorType itk::AffineTransform< TScalarType, NDimensions >::BackTransform const OutputCovariantVectorType   vector const [inline]
 

template<class TScalarType = double, unsigned int NDimensions = 3>
InputVnlVectorType itk::AffineTransform< TScalarType, NDimensions >::BackTransform const OutputVnlVectorType   vector const [inline]
 

Back transform by an affine transformation

This method finds the point or vector that maps to a given point or vector under the affine transformation defined by self. If no such point exists, an exception is thrown. *

template<class TScalarType = double, unsigned int NDimensions = 3>
InputVectorType itk::AffineTransform< TScalarType, NDimensions >::BackTransform const OutputVectorType   vector const [inline]
 

Back transform by an affine transformation

This method finds the point or vector that maps to a given point or vector under the affine transformation defined by self. If no such point exists, an exception is thrown. *

template<class TScalarType = double, unsigned int NDimensions = 3>
InputPointType itk::AffineTransform< TScalarType, NDimensions >::BackTransform const OutputPointType   point const [inline]
 

Back transform by an affine transformation

This method finds the point or vector that maps to a given point or vector under the affine transformation defined by self. If no such point exists, an exception is thrown. *

Reimplemented in itk::AzimuthElevationToCartesianTransform< TScalarType, NDimensions >.

template<class TScalarType = double, unsigned int NDimensions = 3>
InputPointType itk::AffineTransform< TScalarType, NDimensions >::BackTransformPoint const OutputPointType   point const
 

Back transform a point by an affine transform

This method finds the point that maps to a given point under the affine transformation defined by self. If no such point exists, an exception is thrown. The returned value is (a pointer to) a brand new point created with new.

Reimplemented in itk::AzimuthElevationToCartesianTransform< TScalarType, NDimensions >.

template<class TScalarType = double, unsigned int NDimensions = 3>
void itk::AffineTransform< TScalarType, NDimensions >::Compose const Self   other,
bool    pre = 0
 

Compose with another AffineTransform

This method composes self with another AffineTransform of the same dimension, modifying self to be the composition of self and other. If the argument pre is true, then other is precomposed with self; that is, the resulting transformation consists of first applying other to the source, followed by self. If pre is false or omitted, then other is post-composed with self; that is the resulting transformation consists of first applying self to the source, followed by other.

template<class TScalarType = double, unsigned int NDimensions = 3>
virtual const char* itk::AffineTransform< TScalarType, NDimensions >::GetClassName   const [virtual]
 

Run-time type information (and related methods).

Reimplemented from itk::Transform< TScalarType, NDimensions, NDimensions >.

Reimplemented in itk::AzimuthElevationToCartesianTransform< TScalarType, NDimensions >, and itk::CenteredAffineTransform< TScalarType, NDimensions >.

template<class TScalarType = double, unsigned int NDimensions = 3>
const MatrixType& itk::AffineTransform< TScalarType, NDimensions >::GetInverse   const [inline]
 

Get inverse matrix of an AffineTransform

This method returns the value of the inverse matrix of the AffineTransform. It's not clear that this is useful except for debugging the class itself.

Todo:
Do something reasonable if the transform is singular.

Definition at line 211 of file itkAffineTransform.h.

template<class TScalarType = double, unsigned int NDimensions = 3>
const JacobianType& itk::AffineTransform< TScalarType, NDimensions >::GetJacobian const InputPointType   point const [virtual]
 

Compute the Jacobian of the transformation

This method computes the Jacobian matrix of the transformation. given point or vector, returning the transformed point or vector. The rank of the Jacobian will also indicate if the transform is invertible at this point.

Reimplemented from itk::Transform< TScalarType, NDimensions, NDimensions >.

Reimplemented in itk::CenteredAffineTransform< TScalarType, NDimensions >.

template<class TScalarType = double, unsigned int NDimensions = 3>
const MatrixType& itk::AffineTransform< TScalarType, NDimensions >::GetMatrix   const [inline]
 

Get matrix of an AffineTransform

This method returns the value of the matrix of the AffineTransform.

Definition at line 190 of file itkAffineTransform.h.

References itk::Object::Modified(), and itk::AffineTransform< TScalarType, NDimensions >::RecomputeInverse().

template<class TScalarType = double, unsigned int NDimensions = 3>
const OffsetType& itk::AffineTransform< TScalarType, NDimensions >::GetOffset void    const [inline]
 

Get offset of an AffineTransform

This method returns the offset value of the AffineTransform. *

Definition at line 183 of file itkAffineTransform.h.

template<class TScalarType = double, unsigned int NDimensions = 3>
const ParametersType& itk::AffineTransform< TScalarType, NDimensions >::GetParameters void    const [virtual]
 

Get the Transformation Parameters.

Reimplemented from itk::Transform< TScalarType, NDimensions, NDimensions >.

Reimplemented in itk::CenteredAffineTransform< TScalarType, NDimensions >.

template<class TScalarType = double, unsigned int NDimensions = 3>
AffineTransform::Pointer itk::AffineTransform< TScalarType, NDimensions >::Inverse void    const
 

Find inverse of an affine transformation

This method creates and returns a new AffineTransform object which is the inverse of self. If self is not invertible, an exception is thrown. *

Reimplemented in itk::CenteredAffineTransform< TScalarType, NDimensions >.

template<class TScalarType = double, unsigned int NDimensions = 3>
itk::AffineTransform< TScalarType, NDimensions >::itkStaticConstMacro ParametersDimension   ,
unsigned    int,
NDimensions *(NDimensions+1)   
 

Dimension of the domain space.

Reimplemented in itk::AzimuthElevationToCartesianTransform< TScalarType, NDimensions >.

template<class TScalarType = double, unsigned int NDimensions = 3>
itk::AffineTransform< TScalarType, NDimensions >::itkStaticConstMacro SpaceDimension   ,
unsigned    int,
NDimensions   
 

Dimension of the domain space.

Reimplemented in itk::AzimuthElevationToCartesianTransform< TScalarType, NDimensions >, and itk::CenteredAffineTransform< TScalarType, NDimensions >.

template<class TScalarType = double, unsigned int NDimensions = 3>
ScalarType itk::AffineTransform< TScalarType, NDimensions >::Metric void    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. *

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

template<class TScalarType = double, unsigned int NDimensions = 3>
Pointer itk::AffineTransform< TScalarType, NDimensions >::New   [static]
 

New macro for creation of through a Smart Pointer

Reimplemented from itk::Transform< TScalarType, NDimensions, NDimensions >.

Reimplemented in itk::AzimuthElevationToCartesianTransform< TScalarType, NDimensions >, and itk::CenteredAffineTransform< TScalarType, NDimensions >.

template<class TScalarType = double, unsigned int NDimensions = 3>
void itk::AffineTransform< TScalarType, NDimensions >::PrintSelf std::ostream &    s,
Indent    indent
const [virtual]
 

Print contents of an AffineTransform

Reimplemented from itk::Object.

Reimplemented in itk::AzimuthElevationToCartesianTransform< TScalarType, NDimensions >, and itk::CenteredAffineTransform< TScalarType, NDimensions >.

template<class TScalarType = double, unsigned int NDimensions = 3>
void itk::AffineTransform< TScalarType, NDimensions >::RecomputeInverse   [protected]
 

Recompute inverse of the transformation matrix *

Reimplemented in itk::CenteredAffineTransform< TScalarType, NDimensions >.

Referenced by itk::AffineTransform< TScalarType, NDimensions >::GetMatrix(), and itk::AffineTransform< TScalarType, NDimensions >::SetOffset().

template<class TScalarType = double, unsigned int NDimensions = 3>
void itk::AffineTransform< TScalarType, NDimensions >::Rotate int    axis1,
int    axis2,
TScalarType    angle,
bool    pre = 0
 

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] = cos(angle)*x[axis1] + sin(angle)*x[axis2] y[axis2] = -sin(angle)*x[axis1] + 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.

template<class TScalarType = double, unsigned int NDimensions = 3>
void itk::AffineTransform< TScalarType, NDimensions >::Rotate2D TScalarType    angle,
bool    pre = 0
 

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.

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.

template<class TScalarType = double, unsigned int NDimensions = 3>
void itk::AffineTransform< TScalarType, NDimensions >::Rotate3D const OutputVectorType   axis,
TScalarType    angle,
bool    pre = 0
 

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.

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.

template<class TScalarType = double, unsigned int NDimensions = 3>
void itk::AffineTransform< TScalarType, NDimensions >::Scale const TScalarType &    factor,
bool    pre = 0
 

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.

template<class TScalarType = double, unsigned int NDimensions = 3>
void itk::AffineTransform< TScalarType, NDimensions >::Scale const OutputVectorType   factor,
bool    pre = 0
 

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.

template<class TScalarType = double, unsigned int NDimensions = 3>
void itk::AffineTransform< TScalarType, NDimensions >::SetIdentity void    [inline]
 

Set the transformation to an Identity

This sets the matrix to identity and the Offset to null.

Reimplemented in itk::CenteredAffineTransform< TScalarType, NDimensions >.

Definition at line 196 of file itkAffineTransform.h.

template<class TScalarType = double, unsigned int NDimensions = 3>
void itk::AffineTransform< TScalarType, NDimensions >::SetMatrix const MatrixType   matrix [inline]
 

Set matrix of an AffineTransform

This method sets the matrix of an AffineTransform to a value specified by the user.

Definition at line 229 of file itkAffineTransform.h.

template<class TScalarType = double, unsigned int NDimensions = 3>
void itk::AffineTransform< TScalarType, NDimensions >::SetOffset const OffsetType   offset [inline]
 

Set offset (origin) of an Affine Transform.

This method sets the offset of an AffineTransform to a value specified by the user. The offset is ...?

Definition at line 222 of file itkAffineTransform.h.

References itk::Object::Modified(), and itk::AffineTransform< TScalarType, NDimensions >::RecomputeInverse().

template<class TScalarType = double, unsigned int NDimensions = 3>
void itk::AffineTransform< TScalarType, NDimensions >::SetParameters const ParametersType   parameters [virtual]
 

Set the transformation from a container of parameters. The first (NDimension x NDimension) parameters define the matrix and the last NDimension parameters the translation.

Reimplemented from itk::Transform< TScalarType, NDimensions, NDimensions >.

Reimplemented in itk::CenteredAffineTransform< TScalarType, NDimensions >.

template<class TScalarType = double, unsigned int NDimensions = 3>
void itk::AffineTransform< TScalarType, NDimensions >::Shear int    axis1,
int    axis2,
TScalarType    coef,
bool    pre = 0
 

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]. *

template<class TScalarType = double, unsigned int NDimensions = 3>
OutputCovariantVectorType itk::AffineTransform< TScalarType, NDimensions >::TransformCovariantVector const InputCovariantVectorType   vector const [virtual]
 

Transform by an affine transformation

This method applies the affine transform given by self to a given point or vector, returning the transformed point or vector. The TransformPoint method transforms its argument as an affine point, whereas the TransformVector method transforms its argument as a vector.

Reimplemented from itk::Transform< TScalarType, NDimensions, NDimensions >.

template<class TScalarType = double, unsigned int NDimensions = 3>
OutputPointType itk::AffineTransform< TScalarType, NDimensions >::TransformPoint const InputPointType   point const [virtual]
 

Transform by an affine transformation

This method applies the affine transform given by self to a given point or vector, returning the transformed point or vector. The TransformPoint method transforms its argument as an affine point, whereas the TransformVector method transforms its argument as a vector.

Reimplemented from itk::Transform< TScalarType, NDimensions, NDimensions >.

Reimplemented in itk::AzimuthElevationToCartesianTransform< TScalarType, NDimensions >.

template<class TScalarType = double, unsigned int NDimensions = 3>
OutputVnlVectorType itk::AffineTransform< TScalarType, NDimensions >::TransformVector const InputVnlVectorType   vector const [virtual]
 

Transform by an affine transformation

This method applies the affine transform given by self to a given point or vector, returning the transformed point or vector. The TransformPoint method transforms its argument as an affine point, whereas the TransformVector method transforms its argument as a vector.

Reimplemented from itk::Transform< TScalarType, NDimensions, NDimensions >.

template<class TScalarType = double, unsigned int NDimensions = 3>
OutputVectorType itk::AffineTransform< TScalarType, NDimensions >::TransformVector const InputVectorType   vector const [virtual]
 

Transform by an affine transformation

This method applies the affine transform given by self to a given point or vector, returning the transformed point or vector. The TransformPoint method transforms its argument as an affine point, whereas the TransformVector method transforms its argument as a vector.

Reimplemented from itk::Transform< TScalarType, NDimensions, NDimensions >.

template<class TScalarType = double, unsigned int NDimensions = 3>
void itk::AffineTransform< TScalarType, NDimensions >::Translate const OutputVectorType   offset,
bool    pre = 0
 

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.


The documentation for this class was generated from the following file:
Generated at Fri May 21 01:18:03 2004 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000