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

itk::Versor< T > Class Template Reference
[Geometry Representation ObjectsData Representation Objects]

A templated class holding a unit quaternion. More...

#include <itkVersor.h>

Collaboration diagram for itk::Versor< T >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef Versor Self
typedef T ValueType
typedef Vector< T, 3 > VectorType
typedef Point< T, 3 > PointType
typedef CovariantVector< T, 3 > CovariantVectorType
typedef vnl_vector_fixed<
T, 3 > 
VnlVectorType
typedef vnl_quaternion< T > VnlQuaternionType
typedef Matrix< T, 3, 3 > MatrixType

Public Member Functions

vnl_quaternion< T > GetVnlQuaternion (void) const
void Set (const VnlQuaternionType &)
void Set (T x, T y, T z, T w)
 Versor ()
 Versor (const Self &v)
const Selfoperator= (const Self &v)
const Selfoperator *= (const Self &v)
const Selfoperator/= (const Self &v)
ValueType GetTensor (void) const
void Normalize (void)
Self GetConjugate (void) const
Self GetReciprocal (void) const
Self operator * (const Self &vec) const
Self operator/ (const Self &vec) const
bool operator== (const Self &vec) const
bool operator!= (const Self &vec) const
ValueType GetScalar (void) const
ValueType GetX (void) const
ValueType GetY (void) const
ValueType GetZ (void) const
ValueType GetW (void) const
ValueType GetAngle (void) const
VectorType GetAxis (void) const
VectorType GetRight (void) const
void Set (const VectorType &axis, ValueType angle)
void Set (const VectorType &axis)
void SetRotationAroundX (ValueType angle)
void SetRotationAroundY (ValueType angle)
void SetRotationAroundZ (ValueType angle)
void SetIdentity ()
VectorType Transform (const VectorType &v) const
CovariantVectorType Transform (const CovariantVectorType &v) const
PointType Transform (const PointType &v) const
VnlVectorType Transform (const VnlVectorType &v) const
MatrixType GetMatrix (void) const
Self SquareRoot (void) const
Self Exponential (ValueType exponent) const

Detailed Description

template<class T>
class itk::Versor< T >

A templated class holding a unit quaternion.

Versor is a templated class that holds a unit quaternion. The difference between versors and quaternions is that quaternions can represent rotations and scale changes while versors are limited to rotations.

This class only implements the operations that maintain versors as a group, that is, any operations between versors result in another versor. For this reason, addition is not defined in this class, even though it is a valid operation between quaternions.

See also:
Vector

Point

CovariantVector

Matrix

Definition at line 52 of file itkVersor.h.


Member Typedef Documentation

template<class T>
typedef CovariantVector<T,3> itk::Versor< T >::CovariantVectorType
 

CovariantVector type. Definition at line 69 of file itkVersor.h.

template<class T>
typedef Matrix<T,3,3> itk::Versor< T >::MatrixType
 

Type of the rotation matrix equivalent to the Versor Definition at line 78 of file itkVersor.h.

template<class T>
typedef Point<T,3> itk::Versor< T >::PointType
 

Point type. Definition at line 66 of file itkVersor.h.

template<class T>
typedef Versor itk::Versor< T >::Self
 

Standard class typedefs. Definition at line 56 of file itkVersor.h.

template<class T>
typedef T itk::Versor< T >::ValueType
 

ValueType can be used to declare a variable that is the same type as a data element held in a Versor. Definition at line 60 of file itkVersor.h.

template<class T>
typedef Vector<T,3> itk::Versor< T >::VectorType
 

Vector type used to represent the axis. Definition at line 63 of file itkVersor.h.

template<class T>
typedef vnl_quaternion<T> itk::Versor< T >::VnlQuaternionType
 

Vnl Quaternion type. Definition at line 75 of file itkVersor.h.

template<class T>
typedef vnl_vector_fixed<T,3> itk::Versor< T >::VnlVectorType
 

Vnl Vector type. Definition at line 72 of file itkVersor.h.


Constructor & Destructor Documentation

template<class T>
itk::Versor< T >::Versor  ) 
 

Default constructor creates a null versor (representing 0 degrees rotation).

template<class T>
itk::Versor< T >::Versor const Self v  ) 
 

Copy constructor.


Member Function Documentation

template<class T>
Self itk::Versor< T >::Exponential ValueType  exponent  )  const
 

Compute the Exponential of the unit quaternion Exponentiation by a factor is equivalent to multiplication of the rotaion angle of the quaternion.

template<class T>
ValueType itk::Versor< T >::GetAngle void   )  const
 

Returns the rotation angle in radians.

template<class T>
VectorType itk::Versor< T >::GetAxis void   )  const
 

Returns the axis of the rotation. It is a unit vector parallel to the axis.

template<class T>
Self itk::Versor< T >::GetConjugate void   )  const
 

Get Conjugate versor. Returns the versor that produce a rotation by the same angle but in opposite direction.

template<class T>
MatrixType itk::Versor< T >::GetMatrix void   )  const
 

Get the matrix representation.

template<class T>
Self itk::Versor< T >::GetReciprocal void   )  const
 

Get Reciprocal versor. Returns the versor that composed with this one will result in a scalar operator equals to 1. It is also equivalent to 1/this.

template<class T>
VectorType itk::Versor< T >::GetRight void   )  const
 

Returns the Right part It is a vector part of the Versor. It is called Right because it is equivalent to a right angle rotation.

template<class T>
ValueType itk::Versor< T >::GetScalar void   )  const
 

Returns the Scalar part.

template<class T>
ValueType itk::Versor< T >::GetTensor void   )  const
 

Get Tensor part of the Versor. Given that Versors are normalized quaternions this value is expected to be 1.0 always

template<class T>
vnl_quaternion<T> itk::Versor< T >::GetVnlQuaternion void   )  const
 

Get a vnl_quaternion with a copy of the internal memory block.

template<class T>
ValueType itk::Versor< T >::GetW void   )  const [inline]
 

Returns the W component. Definition at line 167 of file itkVersor.h.

template<class T>
ValueType itk::Versor< T >::GetX void   )  const [inline]
 

Returns the X component. Definition at line 155 of file itkVersor.h.

template<class T>
ValueType itk::Versor< T >::GetY void   )  const [inline]
 

Returns the Y component. Definition at line 159 of file itkVersor.h.

template<class T>
ValueType itk::Versor< T >::GetZ void   )  const [inline]
 

Returns the Z component. Definition at line 163 of file itkVersor.h.

template<class T>
void itk::Versor< T >::Normalize void   ) 
 

Normalize the Versor. Given that Versors are normalized quaternions this method is provided only for convinience when it is suspected that a versor could be out of the unit sphere.

template<class T>
Self itk::Versor< T >::operator * const Self vec  )  const
 

Versor operator*. Performs the composition of two versors. this operation is NOT commutative.

template<class T>
const Self& itk::Versor< T >::operator *= const Self v  ) 
 

Composition operator *=. Compose the current versor with the operand and store the result in the current versor.

template<class T>
bool itk::Versor< T >::operator!= const Self vec  )  const
 

Versor operator!= Performs the comparison between two versors. this operation uses and arbitrary threshold for the comparison.

template<class T>
Self itk::Versor< T >::operator/ const Self vec  )  const
 

Versor operator/. Performs the division of two versors.

template<class T>
const Self& itk::Versor< T >::operator/= const Self v  ) 
 

Division operator /=. Divide the current versor with the operand and store the result in the current versor. This is equivalent to compose the Versor with the reciprocal of the operand

See also:
GetReciprocal

template<class T>
const Self& itk::Versor< T >::operator= const Self v  ) 
 

Assignment operator =. Copy the versor argument.

template<class T>
bool itk::Versor< T >::operator== const Self vec  )  const
 

Versor operator== Performs the comparison between two versors. this operation uses and arbitrary threshold for the comparison.

template<class T>
void itk::Versor< T >::Set const VectorType axis  ) 
 

Set the versor using the right part. the magnitude of the vector given is assumed to be equal to sin(angle/2). This method will compute internally the scalar part that preserve the Versor as a unit quaternion.

template<class T>
void itk::Versor< T >::Set const VectorType axis,
ValueType  angle
 

Set the versor using a vector and angle the unit vector parallel to the given vector will be used. The angle is expected in radians.

template<class T>
void itk::Versor< T >::Set x,
y,
z,
w
 

Set the Versor from Quaternion components.

Warning:
After assignment, the corresponding quaternion will be normalized in order to get a consistent Versor.

template<class T>
void itk::Versor< T >::Set const VnlQuaternionType  ) 
 

Set the Versor from a Quaternion

Warning:
After assignment, the corresponding quaternion will be normalized in order to get a consistent Versor.

template<class T>
void itk::Versor< T >::SetIdentity  ) 
 

Reset the values so the versor is equivalent to an identity transformation. This is equivalent to set a zero angle

template<class T>
void itk::Versor< T >::SetRotationAroundX ValueType  angle  ) 
 

Sets a rotation around the X axis using the parameter as angle in radians. This is a method provided for convinience to initialize a rotation. The effect of this methods is not cumulative with any value previously stored in the Versor.

See also:
Set

SetRotationAroundY

SetRotationAroundZ

template<class T>
void itk::Versor< T >::SetRotationAroundY ValueType  angle  ) 
 

Sets a rotation around the Y axis using the parameter as angle in radians. This is a method provided for convinience to initialize a rotation. The effect of this methods is not cumulative with any value previously stored in the Versor.

See also:
Set

SetRotationAroundX

SetRotationAroundZ

template<class T>
void itk::Versor< T >::SetRotationAroundZ ValueType  angle  ) 
 

Sets a rotation around the Y axis using the parameter as angle in radians. This is a method provided for convinience to initialize a rotation. The effect of this methods is not cumulative with any value previously stored in the Versor.

See also:
Set

SetRotationAroundX

SetRotationAroundY

template<class T>
Self itk::Versor< T >::SquareRoot void   )  const
 

Get the Square root of the unit quaternion.

template<class T>
VnlVectorType itk::Versor< T >::Transform const VnlVectorType v  )  const
 

Transform a vnl_vector.

template<class T>
PointType itk::Versor< T >::Transform const PointType v  )  const
 

Transform a point.

template<class T>
CovariantVectorType itk::Versor< T >::Transform const CovariantVectorType v  )  const
 

Transform a covariant vector.

template<class T>
VectorType itk::Versor< T >::Transform const VectorType v  )  const
 

Transform a vector.


The documentation for this class was generated from the following file:
Generated at Sun Apr 1 03:14:18 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000