Orfeo Toolbox  4.0
Public Types | Public Member Functions | Static Public Attributes | Private Attributes | List of all members
itk::Matrix< T, NRows, NColumns > Class Template Reference

A templated class holding a M x N size Matrix. More...

#include <itkMatrix.h>

+ Inheritance diagram for itk::Matrix< T, NRows, NColumns >:

Public Types

typedef Matrix< T, NColumns,
NColumns > 
CompatibleSquareMatrixType
 
typedef T ComponentType
 
typedef vnl_matrix_fixed< T,
NRows, NColumns > 
InternalMatrixType
 
typedef Matrix Self
 
typedef T ValueType
 

Public Member Functions

 Matrix (const vnl_matrix< T > &matrix)
 
 Matrix (const InternalMatrixType &matrix)
 
 Matrix ()
 
 Matrix (const Self &matrix)
 
void Fill (const T &value)
 
vnl_matrix_fixed< T, NColumns,
NRows > 
GetInverse (void) const
 
vnl_matrix_fixed< T, NColumns,
NRows > 
GetTranspose (void) const
 
InternalMatrixTypeGetVnlMatrix (void)
 
const InternalMatrixTypeGetVnlMatrix (void) const
 
bool operator!= (const Self &matrix) const
 
T & operator() (unsigned int row, unsigned int col)
 
const T & operator() (unsigned int row, unsigned int col) const
 
Vector< T, NRows > operator* (const Vector< T, NColumns > &vector) const
 
Point< T, NRows > operator* (const Point< T, NColumns > &vector) const
 
CovariantVector< T, NRows > operator* (const CovariantVector< T, NColumns > &vector) const
 
vnl_vector_fixed< T, NRows > operator* (const vnl_vector_fixed< T, NColumns > &vector) const
 
Self operator* (const CompatibleSquareMatrixType &matrix) const
 
template<unsigned int OuterDim>
Matrix< T, NRows, OuterDim > operator* (const vnl_matrix_fixed< T, NRows, OuterDim > &matrix) const
 
vnl_matrix< T > operator* (const vnl_matrix< T > &matrix) const
 
vnl_vector< T > operator* (const vnl_vector< T > &matrix) const
 
Self operator* (const T &value)
 
void operator*= (const CompatibleSquareMatrixType &matrix)
 
void operator*= (const vnl_matrix< T > &matrix)
 
void operator*= (const T &value)
 
Self operator+ (const Self &matrix) const
 
const Selfoperator+= (const Self &matrix)
 
Self operator- (const Self &matrix) const
 
const Selfoperator-= (const Self &matrix)
 
Self operator/ (const T &value)
 
void operator/= (const T &value)
 
const Selfoperator= (const vnl_matrix< T > &matrix)
 
const Selfoperator= (const InternalMatrixType &matrix)
 
const Selfoperator= (const Self &matrix)
 
bool operator== (const Self &matrix) const
 
T * operator[] (unsigned int i)
 
const T * operator[] (unsigned int i) const
 
void SetIdentity (void)
 

Static Public Attributes

static const unsigned int ColumnDimensions = NColumns
 
static const unsigned int RowDimensions = NRows
 

Private Attributes

InternalMatrixType m_Matrix
 

Detailed Description

template<typename T, unsigned int NRows = 3, unsigned int NColumns = 3>
class itk::Matrix< T, NRows, NColumns >

A templated class holding a M x N size Matrix.

This class contains a vnl_matrix_fixed in order to make all the vnl mathematical methods available.

{Math/Matrix,Matrix}

Definition at line 46 of file itkMatrix.h.

Member Typedef Documentation

template<typename T, unsigned int NRows = 3, unsigned int NColumns = 3>
typedef Matrix<T, NColumns, NColumns> itk::Matrix< T, NRows, NColumns >::CompatibleSquareMatrixType

Compatible square matrix. This is currently used by operator* to help with wrapping.

Todo:
In the future, the method should be templated to allow multiplication by NColumns by XRows.

Definition at line 66 of file itkMatrix.h.

template<typename T, unsigned int NRows = 3, unsigned int NColumns = 3>
typedef T itk::Matrix< T, NRows, NColumns >::ComponentType

Definition at line 54 of file itkMatrix.h.

template<typename T, unsigned int NRows = 3, unsigned int NColumns = 3>
typedef vnl_matrix_fixed< T, NRows, NColumns > itk::Matrix< T, NRows, NColumns >::InternalMatrixType

Internal matrix type

Definition at line 61 of file itkMatrix.h.

template<typename T, unsigned int NRows = 3, unsigned int NColumns = 3>
typedef Matrix itk::Matrix< T, NRows, NColumns >::Self

Standard class typedefs.

Definition at line 50 of file itkMatrix.h.

template<typename T, unsigned int NRows = 3, unsigned int NColumns = 3>
typedef T itk::Matrix< T, NRows, NColumns >::ValueType

Component value type

Definition at line 53 of file itkMatrix.h.

Constructor & Destructor Documentation

template<typename T, unsigned int NRows = 3, unsigned int NColumns = 3>
itk::Matrix< T, NRows, NColumns >::Matrix ( const vnl_matrix< T > &  matrix)
inline

For every operator=, there should be an equivalent copy constructor.

Definition at line 196 of file itkMatrix.h.

template<typename T, unsigned int NRows = 3, unsigned int NColumns = 3>
itk::Matrix< T, NRows, NColumns >::Matrix ( const InternalMatrixType matrix)
inlineexplicit

For every operator=, there should be an equivalent copy constructor.

Definition at line 232 of file itkMatrix.h.

template<typename T, unsigned int NRows = 3, unsigned int NColumns = 3>
itk::Matrix< T, NRows, NColumns >::Matrix ( )
inline

Default constructor.

Definition at line 262 of file itkMatrix.h.

template<typename T, unsigned int NRows = 3, unsigned int NColumns = 3>
itk::Matrix< T, NRows, NColumns >::Matrix ( const Self matrix)
inline

Copy constructor.

Definition at line 265 of file itkMatrix.h.

Member Function Documentation

template<typename T, unsigned int NRows = 3, unsigned int NColumns = 3>
void itk::Matrix< T, NRows, NColumns >::Fill ( const T &  value)
inline
template<typename T, unsigned int NRows = 3, unsigned int NColumns = 3>
vnl_matrix_fixed< T, NColumns, NRows > itk::Matrix< T, NRows, NColumns >::GetInverse ( void  ) const
inline
template<typename T, unsigned int NRows = 3, unsigned int NColumns = 3>
vnl_matrix_fixed< T, NColumns, NRows > itk::Matrix< T, NRows, NColumns >::GetTranspose ( void  ) const
inline

Return the transposed matrix.

Definition at line 256 of file itkMatrix.h.

Referenced by itk::MaskFeaturePointSelectionFilter< TImage, TMask, TFeatures >::GenerateData().

template<typename T, unsigned int NRows = 3, unsigned int NColumns = 3>
InternalMatrixType& itk::Matrix< T, NRows, NColumns >::GetVnlMatrix ( void  )
inline
template<typename T, unsigned int NRows = 3, unsigned int NColumns = 3>
const InternalMatrixType& itk::Matrix< T, NRows, NColumns >::GetVnlMatrix ( void  ) const
inline

Return the matrix.

Definition at line 171 of file itkMatrix.h.

template<typename T, unsigned int NRows = 3, unsigned int NColumns = 3>
bool itk::Matrix< T, NRows, NColumns >::operator!= ( const Self matrix) const
inline

Definition at line 220 of file itkMatrix.h.

template<typename T, unsigned int NRows = 3, unsigned int NColumns = 3>
T& itk::Matrix< T, NRows, NColumns >::operator() ( unsigned int  row,
unsigned int  col 
)
inline

Return an element of the matrix.

Definition at line 141 of file itkMatrix.h.

template<typename T, unsigned int NRows = 3, unsigned int NColumns = 3>
const T& itk::Matrix< T, NRows, NColumns >::operator() ( unsigned int  row,
unsigned int  col 
) const
inline

Return an element of the matrix.

Definition at line 147 of file itkMatrix.h.

template<typename T, unsigned int NRows, unsigned int NColumns>
Vector< T, NRows > itk::Matrix< T, NRows, NColumns >::operator* ( const Vector< T, NColumns > &  vect) const

Matrix by Vector multiplication.

Product by a Vector

Definition at line 32 of file itkMatrix.hxx.

template<typename T, unsigned int NRows, unsigned int NColumns>
Point< T, NRows > itk::Matrix< T, NRows, NColumns >::operator* ( const Point< T, NColumns > &  pnt) const

Matrix by Point multiplication.

Product by a Point

Definition at line 53 of file itkMatrix.hxx.

template<typename T, unsigned int NRows, unsigned int NColumns>
CovariantVector< T, NRows > itk::Matrix< T, NRows, NColumns >::operator* ( const CovariantVector< T, NColumns > &  covect) const

Matrix by CovariantVector multiplication.

Product by a CovariantVector

Definition at line 95 of file itkMatrix.hxx.

template<typename T, unsigned int NRows, unsigned int NColumns>
vnl_vector_fixed< T, NRows > itk::Matrix< T, NRows, NColumns >::operator* ( const vnl_vector_fixed< T, NColumns > &  inVNLvect) const

Matrix by vnl_vector_fixed multiplication.

Product by a vnl_vector_fixed

Definition at line 74 of file itkMatrix.hxx.

template<typename T, unsigned int NRows, unsigned int NColumns>
Matrix< T, NRows, NColumns > itk::Matrix< T, NRows, NColumns >::operator* ( const CompatibleSquareMatrixType matrix) const

Matrix by Matrix multiplication.

Product by a matrix

Definition at line 116 of file itkMatrix.hxx.

References itk::Matrix< T, NRows, NColumns >::GetVnlMatrix().

template<typename T, unsigned int NRows = 3, unsigned int NColumns = 3>
template<unsigned int OuterDim>
Matrix<T, NRows, OuterDim> itk::Matrix< T, NRows, NColumns >::operator* ( const vnl_matrix_fixed< T, NRows, OuterDim > &  matrix) const
inline

Definition at line 84 of file itkMatrix.h.

template<typename T, unsigned int NRows, unsigned int NColumns>
vnl_matrix< T > itk::Matrix< T, NRows, NColumns >::operator* ( const vnl_matrix< T > &  matrix) const

Matrix by vnl_matrix multiplication.

Product by a vnl_matrix

Definition at line 204 of file itkMatrix.hxx.

template<typename T, unsigned int NRows, unsigned int NColumns>
vnl_vector< T > itk::Matrix< T, NRows, NColumns >::operator* ( const vnl_vector< T > &  vc) const

Matrix by vnl_vector multiplication.

Product by a vnl_vector

Definition at line 237 of file itkMatrix.hxx.

template<typename T, unsigned int NRows = 3, unsigned int NColumns = 3>
Self itk::Matrix< T, NRows, NColumns >::operator* ( const T &  value)
inline

Matrix by scalar multiplication.

Definition at line 117 of file itkMatrix.h.

template<typename T , unsigned int NRows, unsigned int NColumns>
void itk::Matrix< T, NRows, NColumns >::operator*= ( const CompatibleSquareMatrixType matrix)

Matrix by Matrix multiplication.

Product by a matrix

Definition at line 215 of file itkMatrix.hxx.

References itk::Matrix< T, NRows, NColumns >::GetVnlMatrix().

template<typename T, unsigned int NRows, unsigned int NColumns>
void itk::Matrix< T, NRows, NColumns >::operator*= ( const vnl_matrix< T > &  matrix)

Matrix by vnl_matrix multiplication.

Product by a vnl_matrix

Definition at line 226 of file itkMatrix.hxx.

template<typename T, unsigned int NRows = 3, unsigned int NColumns = 3>
void itk::Matrix< T, NRows, NColumns >::operator*= ( const T &  value)
inline

Matrix by scalar multiplication.

Definition at line 113 of file itkMatrix.h.

template<typename T , unsigned int NRows, unsigned int NColumns>
Matrix< T, NRows, NColumns > itk::Matrix< T, NRows, NColumns >::operator+ ( const Self matrix) const

Matrix addition.

Matrix Addition

Definition at line 128 of file itkMatrix.hxx.

References itk::Matrix< T, NRows, NColumns >::m_Matrix.

template<typename T , unsigned int NRows, unsigned int NColumns>
const Matrix< T, NRows, NColumns > & itk::Matrix< T, NRows, NColumns >::operator+= ( const Self matrix)

Matrix Addition in-place

Definition at line 148 of file itkMatrix.hxx.

References itk::Matrix< T, NRows, NColumns >::m_Matrix.

template<typename T , unsigned int NRows, unsigned int NColumns>
Matrix< T, NRows, NColumns > itk::Matrix< T, NRows, NColumns >::operator- ( const Self matrix) const

Matrix addition.

Matrix Subtraction

Definition at line 166 of file itkMatrix.hxx.

References itk::Matrix< T, NRows, NColumns >::m_Matrix.

template<typename T , unsigned int NRows, unsigned int NColumns>
const Matrix< T, NRows, NColumns > & itk::Matrix< T, NRows, NColumns >::operator-= ( const Self matrix)

Matrix subtraction in-place

Definition at line 186 of file itkMatrix.hxx.

References itk::Matrix< T, NRows, NColumns >::m_Matrix.

template<typename T, unsigned int NRows = 3, unsigned int NColumns = 3>
Self itk::Matrix< T, NRows, NColumns >::operator/ ( const T &  value)
inline

Matrix by scalar division.

Definition at line 132 of file itkMatrix.h.

template<typename T, unsigned int NRows = 3, unsigned int NColumns = 3>
void itk::Matrix< T, NRows, NColumns >::operator/= ( const T &  value)
inline

Matrix by scalar division.

Definition at line 126 of file itkMatrix.h.

template<typename T, unsigned int NRows = 3, unsigned int NColumns = 3>
const Self& itk::Matrix< T, NRows, NColumns >::operator= ( const vnl_matrix< T > &  matrix)
inline
template<typename T, unsigned int NRows = 3, unsigned int NColumns = 3>
const Self& itk::Matrix< T, NRows, NColumns >::operator= ( const InternalMatrixType matrix)
inline

Definition at line 225 of file itkMatrix.h.

template<typename T, unsigned int NRows = 3, unsigned int NColumns = 3>
const Self& itk::Matrix< T, NRows, NColumns >::operator= ( const Self matrix)
inline

Assignment operator.

Definition at line 238 of file itkMatrix.h.

template<typename T, unsigned int NRows = 3, unsigned int NColumns = 3>
bool itk::Matrix< T, NRows, NColumns >::operator== ( const Self matrix) const
inline
template<typename T, unsigned int NRows = 3, unsigned int NColumns = 3>
T* itk::Matrix< T, NRows, NColumns >::operator[] ( unsigned int  i)
inline

Return a row of the matrix.

Definition at line 153 of file itkMatrix.h.

template<typename T, unsigned int NRows = 3, unsigned int NColumns = 3>
const T* itk::Matrix< T, NRows, NColumns >::operator[] ( unsigned int  i) const
inline

Return a row of the matrix.

Definition at line 159 of file itkMatrix.h.

template<typename T, unsigned int NRows = 3, unsigned int NColumns = 3>
void itk::Matrix< T, NRows, NColumns >::SetIdentity ( void  )
inline

Member Data Documentation

template<typename T, unsigned int NRows = 3, unsigned int NColumns = 3>
const unsigned int itk::Matrix< T, NRows, NColumns >::ColumnDimensions = NColumns
static

Definition at line 58 of file itkMatrix.h.

template<typename T, unsigned int NRows = 3, unsigned int NColumns = 3>
InternalMatrixType itk::Matrix< T, NRows, NColumns >::m_Matrix
private

Definition at line 268 of file itkMatrix.h.

Referenced by itk::Matrix< ScalarType, itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension) >::Fill(), itk::Matrix< ScalarType, itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension) >::GetInverse(), itk::Matrix< ScalarType, itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension) >::GetTranspose(), itk::Matrix< ScalarType, itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension) >::GetVnlMatrix(), itk::Matrix< ScalarType, itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension) >::operator()(), itk::Matrix< ScalarType, itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension) >::operator*(), itk::Matrix< ScalarType, itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension) >::operator*=(), itk::Matrix< T, NRows, NColumns >::operator+(), itk::Matrix< T, NRows, NColumns >::operator+=(), itk::Matrix< T, NRows, NColumns >::operator-(), itk::Matrix< T, NRows, NColumns >::operator-=(), itk::Matrix< ScalarType, itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension) >::operator/=(), itk::Matrix< ScalarType, itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension) >::operator=(), itk::Matrix< ScalarType, itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension) >::operator==(), itk::Matrix< ScalarType, itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension) >::operator[](), and itk::Matrix< ScalarType, itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension) >::SetIdentity().

template<typename T, unsigned int NRows = 3, unsigned int NColumns = 3>
const unsigned int itk::Matrix< T, NRows, NColumns >::RowDimensions = NRows
static

Number Of Columns and Rows.

Definition at line 57 of file itkMatrix.h.


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

Generated at Sat Mar 8 2014 17:23:08 for Orfeo Toolbox with doxygen 1.8.3.1