Public Types | Public Member Functions | Private Attributes

cmtk::Matrix3x3< T > Class Template Reference
[cmtkBase Library]

Homogeneous 3x3 transformation matrix. More...

#include <cmtkMatrix3x3.h>

Collaboration diagram for cmtk::Matrix3x3< T >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef Matrix3x3< T > Self
 This class.

Public Member Functions

 Matrix3x3 ()
 Default constructor: make identity matrix.
 Matrix3x3 (const Self &other)
 Copy constructor.
 Matrix3x3 (const T *const values)
 Array constructor.
template<class T2 >
 Matrix3x3 (const T2(&matrix)[3][3])
 2D array constructor.
SelfSet (const T *const values)
 Set from array of entries.
SelfFill (const T value)
 Set to constant value.
SelfInvert2x2 ()
 Inversion operator (in place).
SelfInvert3x3 ()
 Inversion operator (in place) as a 3D non-homogeneous matrix.
Self GetTranspose () const
 Transpose operator.
T * operator[] (const size_t i)
 Index operator.
const T * operator[] (const size_t i) const
 Constant index operator.
SelfCompose (const Types::Coordinate params[8])
 Compose from canonical parameters.
bool Decompose (Types::Coordinate params[8], const Types::Coordinate *center=NULL) const
 Decompose into affine parameters.
Selfoperator*= (const Self &other)
 In-place multiplication operator.
Selfoperator*= (const T scalar)
 In-place scalar multiplication operator.
const Self operator* (const Self &other) const
 Multiplication operator.
Selfoperator= (const Self &other)
 Assignment operator.
template<class T2 >
void Multiply (const FixedVector< 2, T2 > &u, FixedVector< 2, T2 > &v) const
template<class T2 >
void Multiply (const FixedVector< 3, T2 > &u, FixedVector< 3, T2 > &v) const
 Multiply with actual 3d vector.
template<class T2 >
void Multiply (FixedVector< 2, T2 > &v) const
 Multiply in place with 3d vector (will implicitly be made homogeneous).
template<class T2 >
void Multiply (FixedVector< 3, T2 > &v) const
 Multiply in place with actual 3d vector.
Determinant () const
 Get determinant.
FrobeniusNorm () const
 Get Frobenius norm.
void ComputeEigenvalues (T(&lambda)[3]) const
 Compute eigenvalues.

Private Attributes

Matrix [3][3]
 The actual matrix.

Detailed Description

template<class T = Types::Coordinate>
class cmtk::Matrix3x3< T >

Homogeneous 3x3 transformation matrix.

Definition at line 52 of file cmtkMatrix3x3.h.


Member Typedef Documentation

template<class T = Types::Coordinate>
typedef Matrix3x3<T> cmtk::Matrix3x3< T >::Self

This class.

Definition at line 56 of file cmtkMatrix3x3.h.


Constructor & Destructor Documentation

template<class T = Types::Coordinate>
cmtk::Matrix3x3< T >::Matrix3x3 ( const T *const   values ) [inline]

Array constructor.

If a NULL parameter is given, an uninitialized matrix is generated. This is intended behaviour.

Definition at line 72 of file cmtkMatrix3x3.h.

template<class T = Types::Coordinate>
template<class T2 >
cmtk::Matrix3x3< T >::Matrix3x3 ( const T2(&)  matrix[3][3] ) [inline]

2D array constructor.

Definition at line 79 of file cmtkMatrix3x3.h.


Member Function Documentation

template<class T = Types::Coordinate>
T cmtk::Matrix3x3< T >::Determinant (  ) const [inline]

Get determinant.

Definition at line 170 of file cmtkMatrix3x3.h.

Referenced by cmtk::DeformationField::GetJacobianDeterminant(), and cmtk::UniformVolume::GetPrincipalAxes().

template<class T = Types::Coordinate>
template<class T2 >
void cmtk::Matrix3x3< T >::Multiply ( FixedVector< 2, T2 > &  v ) const [inline]

Multiply in place with 3d vector (will implicitly be made homogeneous).

Definition at line 156 of file cmtkMatrix3x3.h.

template<class T = Types::Coordinate>
template<class T2 >
void cmtk::Matrix3x3< T >::Multiply ( FixedVector< 3, T2 > &  v ) const [inline]

Multiply in place with actual 3d vector.

Definition at line 163 of file cmtkMatrix3x3.h.

template<class T = Types::Coordinate>
template<class T2 >
void cmtk::Matrix3x3< T >::Multiply ( const FixedVector< 3, T2 > &  u,
FixedVector< 3, T2 > &  v 
) const [inline]

Multiply with actual 3d vector.

Note:
The '&' declaration of both arguments forces the C++ compiler to maintain them as explicitly sized arrays, rather than collapsing to pointers. This is what allows us to overload this function based on the array size (!) of its arguments.

Definition at line 149 of file cmtkMatrix3x3.h.

template<class T = Types::Coordinate>
template<class T2 >
void cmtk::Matrix3x3< T >::Multiply ( const FixedVector< 2, T2 > &  u,
FixedVector< 2, T2 > &  v 
) const [inline]
template<class T = Types::Coordinate>
const T* cmtk::Matrix3x3< T >::operator[] ( const size_t  i ) const [inline]

Constant index operator.

Definition at line 108 of file cmtkMatrix3x3.h.

template<class T = Types::Coordinate>
T* cmtk::Matrix3x3< T >::operator[] ( const size_t  i ) [inline]

Index operator.

Definition at line 102 of file cmtkMatrix3x3.h.


Member Data Documentation

template<class T = Types::Coordinate>
T cmtk::Matrix3x3< T >::Matrix[3][3] [private]

The actual matrix.

Definition at line 188 of file cmtkMatrix3x3.h.

Referenced by cmtk::Matrix3x3< T >::Matrix3x3(), and cmtk::Matrix3x3< T >::operator=().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines