igstk::Transform Class Reference

A class representing a 3D Rigid transform. More...

#include <igstkTransform.h>

Inheritance diagram for igstk::Transform:
Inheritance graph
[legend]
Collaboration diagram for igstk::Transform:
Collaboration graph
[legend]

List of all members.

Public Types

typedef ::itk::Vector< double, 3 > VectorType
typedef ::itk::Point< double, 3 > PointType
typedef ::itk::Versor< double > VersorType

Public Member Functions

 Transform ()
 Constructor and destructor.
 Transform (const Transform &t)
virtual ~Transform ()
const Transformoperator= (const Transform &inputTransform)
 Assign the values of one transform to another.
void SetTranslationAndRotation (const VectorType &translation, const VersorType &rotation, TransformBase::ErrorType errorValue, TimeStamp::TimePeriodType millisecondsToExpiration)
 Set Translation and Rotation simultaneously.
void SetRotation (const VersorType &rotation, ErrorType errorValue, TimePeriodType millisecondsToExpiration)
 Set only Rotation.
void SetTranslation (const VectorType &translation, ErrorType errorValue, TimePeriodType millisecondsToExpiration)
 Set only Translation.
virtual VectorType GetTranslation ()
 Returns the translational component.
virtual VersorType GetRotation ()
 Returns the rotational component.
void ExportTransform (vtkMatrix4x4 &matrix) const
 Export the content of the transformation in the format of a vtkMatrix4x4.
void ImportTransform (vtkMatrix4x4 &matrix)
 Set the content of the transformation from a vtkMatrix4x4.
bool operator== (const Transform &inputTransform)
 Compare two transforms for equivalence, in the sense that these are the same objects in memory.
bool operator!= (const Transform &inputTransform)
bool IsNumericallyEquivalent (const Transform &inputTransform, double tol=vnl_math::eps) const
 Compare two transforms for equivalence.
bool IsIdentity (double tol=vnl_math::eps) const
 Evaluate if the Transform is an Identity upto a given tolerance.
void SetToIdentity (TimePeriodType validityPeriodInMilliseconds)
 Resets the Transform to an Identity Transform.
void Print (std::ostream &os, itk::Indent indent) const
 Method for printing the member variables of this class to an ostream.
Transform GetInverse () const
 Returns the Inverse Transform of the current one.

Static Public Member Functions

static Transform TransformCompose (Transform leftTransform, Transform rightTransform)
 Transform composition method.

Protected Member Functions

void PrintHeader (std::ostream &os, itk::Indent indent) const
void PrintTrailer (std::ostream &itkNotUsed(os), itk::Indent itkNotUsed(indent)) const
virtual void PrintSelf (std::ostream &os, itk::Indent indent) const
 Print the object information in a stream.

Detailed Description

A class representing a 3D Rigid transform.

This class represents relative positions and orientations in 3D space. It is intended to be used for positioning objects in the scene and as a communication vehicle between trackers and spatial objects. The class contains a TimeStamp defining the validity period for the information in the transform.

This class can be used for storing Translation and Rotation simultaneously, or only Translation, or only Rotation. When only Translation or only Rotation are used, the other component of the transform is set to an identity. If the user intends to use both rotations and translation, she must invoke the SetTranslationAndRotation() method.

All the set methods require an argument that defines the number of milliseconds for which the stored information is considered to be valid. The validity period will be counted from the moment the Set method was invoked.

See also:
TimeStamp

Definition at line 57 of file igstkTransform.h.


Member Typedef Documentation

typedef ::itk::Vector<double, 3> igstk::Transform::VectorType

Definition at line 61 of file igstkTransform.h.

typedef ::itk::Point<double, 3> igstk::Transform::PointType

Definition at line 62 of file igstkTransform.h.

typedef ::itk::Versor<double> igstk::Transform::VersorType

Definition at line 63 of file igstkTransform.h.


Constructor & Destructor Documentation

igstk::Transform::Transform (  ) 

Constructor and destructor.

igstk::Transform::Transform ( const Transform t  ) 
virtual igstk::Transform::~Transform (  )  [virtual]

Member Function Documentation

static Transform igstk::Transform::TransformCompose ( Transform  leftTransform,
Transform  rightTransform 
) [static]

Transform composition method.

const Transform& igstk::Transform::operator= ( const Transform inputTransform  ) 

Assign the values of one transform to another.

void igstk::Transform::SetTranslationAndRotation ( const VectorType translation,
const VersorType rotation,
TransformBase::ErrorType  errorValue,
TimeStamp::TimePeriodType  millisecondsToExpiration 
)

Set Translation and Rotation simultaneously.

This values will override any previously set rotation and translation. The information will be considered valid from the time of invokation of the method until that time plus the millisecondsToExpiration value.

void igstk::Transform::SetRotation ( const VersorType rotation,
ErrorType  errorValue,
TimePeriodType  millisecondsToExpiration 
)

Set only Rotation.

This method should be used when the transform represents only a rotation. Internally the translational part of the transform will be set to zero. The assigned rotation will override any previously set rotation and will set to zero any previous translation. The information will be considered valid from the time of invokation of the method until that time plus the millisecondsToExpiration value.

void igstk::Transform::SetTranslation ( const VectorType translation,
ErrorType  errorValue,
TimePeriodType  millisecondsToExpiration 
)

Set only Translation.

This method should be used when the transform represents only a translation. Internally the rotational part of the transform will be set to zero. The assigned translation will override any previously set translation and will set to zero any previous rotation. The information will be considered valid from the time of invokation of the method until that time plus the millisecondsToExpiration value.

virtual VectorType igstk::Transform::GetTranslation (  )  [virtual]

Returns the translational component.

Users MUST check the validity time of the transform before attempting to use this returned value. The content of the transform may have expired.

virtual VersorType igstk::Transform::GetRotation (  )  [virtual]

Returns the rotational component.

Users MUST check the validity time of the transform before attempting to use this returned value. The content of the transform may have expired.

void igstk::Transform::ExportTransform ( vtkMatrix4x4 &  matrix  )  const

Export the content of the transformation in the format of a vtkMatrix4x4.

Users must allocate the matrix first and then pass it by reference to this method. The current method will simply fill in the transform using the current information of translation and rotation.

void igstk::Transform::ImportTransform ( vtkMatrix4x4 &  matrix  ) 

Set the content of the transformation from a vtkMatrix4x4.

bool igstk::Transform::operator== ( const Transform inputTransform  ) 

Compare two transforms for equivalence, in the sense that these are the same objects in memory.

bool igstk::Transform::operator!= ( const Transform inputTransform  ) 
bool igstk::Transform::IsNumericallyEquivalent ( const Transform inputTransform,
double  tol = vnl_math::eps 
) const

Compare two transforms for equivalence.

bool igstk::Transform::IsIdentity ( double  tol = vnl_math::eps  )  const

Evaluate if the Transform is an Identity upto a given tolerance.

void igstk::Transform::SetToIdentity ( TimePeriodType  validityPeriodInMilliseconds  ) 

Resets the Transform to an Identity Transform.

void igstk::Transform::Print ( std::ostream &  os,
itk::Indent  indent 
) const [virtual]

Method for printing the member variables of this class to an ostream.

Implements igstk::TransformBase.

Transform igstk::Transform::GetInverse (  )  const

Returns the Inverse Transform of the current one.

void igstk::Transform::PrintHeader ( std::ostream &  os,
itk::Indent  indent 
) const [protected]
void igstk::Transform::PrintTrailer ( std::ostream &  itkNotUsedos,
itk::Indent   itkNotUsedindent 
) const [protected]
virtual void igstk::Transform::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const [protected, virtual]

Print the object information in a stream.


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

Generated on Tue Dec 22 03:55:49 2009 for IGSTK by  doxygen 1.6.1