#include <itkVersor.h>
Public Types | |
typedef Versor | Self |
typedef T | ValueType |
typedef NumericTraits< ValueType >::RealType | RealType |
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 Self & | operator= (const Self &v) |
const Self & | operator *= (const Self &v) |
const Self & | operator/= (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 MatrixType &m) |
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 |
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.
Definition at line 52 of file itkVersor.h.
|
CovariantVector type. Definition at line 72 of file itkVersor.h. |
|
Type of the rotation matrix equivalent to the Versor Definition at line 81 of file itkVersor.h. |
|
Point type. Definition at line 69 of file itkVersor.h. |
|
Type used for computations on the versor components Definition at line 63 of file itkVersor.h. |
|
Standard class typedefs. Definition at line 56 of file itkVersor.h. |
|
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. |
|
Vector type used to represent the axis. Definition at line 66 of file itkVersor.h. |
|
Vnl Quaternion type. Definition at line 78 of file itkVersor.h. |
|
Vnl Vector type. Definition at line 75 of file itkVersor.h. |
|
Default constructor creates a null versor (representing 0 degrees rotation). |
|
Copy constructor. |
|
Compute the Exponential of the unit quaternion Exponentiation by a factor is equivalent to multiplication of the rotaion angle of the quaternion. |
|
Returns the rotation angle in radians. |
|
Returns the axis of the rotation. It is a unit vector parallel to the axis. |
|
Get Conjugate versor. Returns the versor that produce a rotation by the same angle but in opposite direction. |
|
Get the matrix representation. |
|
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. |
|
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. |
|
Returns the Scalar part. |
|
Get Tensor part of the Versor. Given that Versors are normalized quaternions this value is expected to be 1.0 always |
|
Get a vnl_quaternion with a copy of the internal memory block. |
|
Returns the W component. Definition at line 170 of file itkVersor.h. Referenced by itk::operator<<(). |
|
Returns the X component. Definition at line 158 of file itkVersor.h. Referenced by itk::operator<<(). |
|
Returns the Y component. Definition at line 162 of file itkVersor.h. Referenced by itk::operator<<(). |
|
Returns the Z component. Definition at line 166 of file itkVersor.h. Referenced by itk::operator<<(). |
|
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. |
|
Versor operator*. Performs the composition of two versors. this operation is NOT commutative. |
|
Composition operator *=. Compose the current versor with the operand and store the result in the current versor. |
|
Versor operator!= Performs the comparison between two versors. this operation uses an arbitrary threshold for the comparison. |
|
Versor operator/. Performs the division of two versors. |
|
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
|
|
Assignment operator =. Copy the versor argument. |
|
Versor operator== Performs the comparison between two versors. this operation uses an arbitrary threshold for the comparison. |
|
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. |
|
Set the versor using an orthogonal matrix. Based on code from: http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm |
|
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. |
|
Set the Versor from Quaternion components.
|
|
Set the Versor from a Quaternion
|
|
Reset the values so the versor is equivalent to an identity transformation. This is equivalent to set a zero 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.
|
|
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.
|
|
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.
|
|
Get the Square root of the unit quaternion. |
|
|
Transform a point. |
|
Transform a covariant vector. |
|
Transform a vector. |