IGSTK
|
A class representing a 3D Rigid transform. More...
#include <igstkTransform.h>
Public Types | |
typedef ::itk::Vector< double, 3 > | VectorType |
typedef ::itk::Point< double, 3 > | PointType |
typedef ::itk::Versor< double > | VersorType |
![]() | |
typedef double | ErrorType |
typedef TimeStamp::TimePeriodType | TimePeriodType |
Public Member Functions | |
Transform () | |
Constructor and destructor. More... | |
Transform (const Transform &t) | |
virtual | ~Transform () |
const Transform & | operator= (const Transform &inputTransform) |
Assign the values of one transform to another. More... | |
void | SetTranslationAndRotation (const VectorType &translation, const VersorType &rotation, TransformBase::ErrorType errorValue, TimeStamp::TimePeriodType millisecondsToExpiration) |
Set Translation and Rotation simultaneously. More... | |
void | SetRotation (const VersorType &rotation, ErrorType errorValue, TimePeriodType millisecondsToExpiration) |
Set only Rotation. More... | |
void | SetTranslation (const VectorType &translation, ErrorType errorValue, TimePeriodType millisecondsToExpiration) |
Set only Translation. More... | |
virtual VectorType | GetTranslation () |
Returns the translational component. More... | |
virtual VersorType | GetRotation () |
Returns the rotational component. More... | |
void | ExportTransform (vtkMatrix4x4 &matrix) const |
Export the content of the transformation in the format of a vtkMatrix4x4. More... | |
void | ImportTransform (vtkMatrix4x4 &matrix) |
Set the content of the transformation from a vtkMatrix4x4. More... | |
bool | operator== (const Transform &inputTransform) |
Compare two transforms for equivalence, in the sense that these are the same objects in memory. More... | |
bool | operator!= (const Transform &inputTransform) |
bool | IsNumericallyEquivalent (const Transform &inputTransform, double tol=vnl_math::eps) const |
Compare two transforms for equivalence. More... | |
bool | IsIdentity (double tol=vnl_math::eps) const |
Evaluate if the Transform is an Identity upto a given tolerance. More... | |
void | SetToIdentity (TimePeriodType validityPeriodInMilliseconds) |
Resets the Transform to an Identity Transform. More... | |
void | Print (std::ostream &os, itk::Indent indent) const |
Method for printing the member variables of this class to an ostream. More... | |
Transform | GetInverse () const |
Returns the Inverse Transform of the current one. More... | |
![]() | |
TransformBase () | |
Constructor and destructor. More... | |
TransformBase (const TransformBase &t) | |
virtual | ~TransformBase () |
virtual ErrorType | GetError () |
Returns the estimation error associated with this transform. More... | |
TimePeriodType | GetStartTime () const |
Returns the time at which the validity of this transformation starts. More... | |
TimePeriodType | GetExpirationTime () const |
Returns the time at which the validity of this transformation expires. More... | |
bool | IsValidAtTime (TimePeriodType timeToTestInMilliseconds) const |
Returns the validity status of the transform at the time passed as argument. More... | |
bool | IsValidNow () const |
Returns the validity status of the transform when it is called. More... | |
Static Public Member Functions | |
static Transform | TransformCompose (Transform leftTransform, Transform rightTransform) |
Transform composition method. More... | |
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. More... | |
Additional Inherited Members | |
![]() | |
TimeStamp | m_TimeStamp |
ErrorType | m_Error |
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.
Definition at line 57 of file igstkTransform.h.
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.
igstk::Transform::Transform | ( | ) |
Constructor and destructor.
igstk::Transform::Transform | ( | const Transform & | t | ) |
|
virtual |
|
static |
Transform composition method.
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 |
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 |
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 | ) |
|
virtual |
Method for printing the member variables of this class to an ostream.
Implements igstk::TransformBase.
|
protected |
|
protected |
|
protectedvirtual |
Print the object information in a stream.