Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts
Public Types | Public Member Functions

itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix > Class Template Reference

Find Eigen values of a real 2D symmetric matrix. It serves as a thread safe alternative to the class: vnl_symmetric_eigensystem, which uses netlib routines. More...

#include <itkSymmetricEigenAnalysis.h>

Inheritance diagram for itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef TEigenMatrix EigenMatrixType
enum  EigenValueOrderType {
  OrderByValue = 1,
  OrderByMagnitude,
  DoNotOrder
}
typedef TMatrix MatrixType
typedef TVector VectorType

Public Member Functions

unsigned int ComputeEigenValues (const TMatrix &A, TVector &EigenValues) const
unsigned int ComputeEigenValuesAndVectors (const TMatrix &A, TVector &EigenValues, TEigenMatrix &EigenVectors) const
unsigned int GetDimension () const
unsigned int GetOrder () const
void SetOrder (const unsigned int n)
 SymmetricEigenAnalysis (const unsigned int dimension)
 SymmetricEigenAnalysis ()
 ~SymmetricEigenAnalysis ()

void SetOrderEigenValues (const bool b)
bool GetOrderEigenValues () const

void SetOrderEigenMagnitudes (const bool b)
bool GetOrderEigenMagnitudes () const

void SetDimension (const unsigned int n)

Detailed Description

template<typename TMatrix, typename TVector, typename TEigenMatrix = TMatrix>
class itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >

Find Eigen values of a real 2D symmetric matrix. It serves as a thread safe alternative to the class: vnl_symmetric_eigensystem, which uses netlib routines.

The class is templated over the input matrix, (which is expected to provide access to its elements with the [][] operator), matrix to store eigen values, (must provide write operations on its elements with the [] operator), EigenMatrix to store eigen vectors (must provide write access to its elements with the [][] operator).

The SetOrderEigenValues() method can be used to order eigen values (and their corresponding eigen vectors if computed) in ascending order. This is the default ordering scheme. Eigen vectors and values can be obtained without ordering by calling SetOrderEigenValues(false)

The SetOrderEigenMagnitudes() method can be used to order eigen values (and their corresponding eigen vectors if computed) by magnitude in ascending order.

The user of this class is explicitly supposed to set the dimension of the 2D matrix using the SetDimension() method.

The class contains routines taken from netlib sources. (www.netlib.org). netlib/tql1.c netlib/tql2.c netlib/tred1.c netlib/tred2.c

Reference: num. math. 11, 293-306(1968) by bowdler, martin, reinsch, and wilkinson. handbook for auto. comp., vol.ii-linear algebra, 227-240(1971).

Definition at line 60 of file itkSymmetricEigenAnalysis.h.


Member Typedef Documentation

template<typename TMatrix, typename TVector, typename TEigenMatrix = TMatrix>
typedef TEigenMatrix itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::EigenMatrixType

Definition at line 84 of file itkSymmetricEigenAnalysis.h.

template<typename TMatrix, typename TVector, typename TEigenMatrix = TMatrix>
typedef TMatrix itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::MatrixType

Definition at line 81 of file itkSymmetricEigenAnalysis.h.

template<typename TMatrix, typename TVector, typename TEigenMatrix = TMatrix>
typedef TVector itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::VectorType

Definition at line 85 of file itkSymmetricEigenAnalysis.h.


Member Enumeration Documentation

template<typename TMatrix, typename TVector, typename TEigenMatrix = TMatrix>
enum itk::SymmetricEigenAnalysis::EigenValueOrderType
Enumerator:
OrderByValue 
OrderByMagnitude 
DoNotOrder 

Definition at line 63 of file itkSymmetricEigenAnalysis.h.


Constructor & Destructor Documentation

template<typename TMatrix, typename TVector, typename TEigenMatrix = TMatrix>
itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::SymmetricEigenAnalysis (  )  [inline]

Definition at line 69 of file itkSymmetricEigenAnalysis.h.

template<typename TMatrix, typename TVector, typename TEigenMatrix = TMatrix>
itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::SymmetricEigenAnalysis ( const unsigned int  dimension  )  [inline]

Definition at line 75 of file itkSymmetricEigenAnalysis.h.

template<typename TMatrix, typename TVector, typename TEigenMatrix = TMatrix>
itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::~SymmetricEigenAnalysis (  )  [inline]

Definition at line 81 of file itkSymmetricEigenAnalysis.h.


Member Function Documentation

template<typename TMatrix, typename TVector, typename TEigenMatrix = TMatrix>
unsigned int itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::ComputeEigenValues ( const TMatrix &  A,
TVector &  EigenValues 
) const

Compute Eigen values of A A is any type that overloads the [][] operator and contains the symmetric matrix. In practice only the upper triangle of the matrix will be accessed. (Both itk::Matrix and vnl_matrix overload [][] operator.)

'EigenValues' is any type that overloads the [] operator and will contain the eigen values.

No size checking is performed. A is expected to be a square matrix of size m_Dimension. 'EigenValues' is expected to be of length m_Dimension. The matrix is not checked to see if it is symmetric.

Referenced by itk::Functor::SymmetricEigenAnalysisFunction< TInputImage::PixelType, TOutputImage::PixelType >::operator()().

template<typename TMatrix, typename TVector, typename TEigenMatrix = TMatrix>
unsigned int itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::ComputeEigenValuesAndVectors ( const TMatrix &  A,
TVector &  EigenValues,
TEigenMatrix &  EigenVectors 
) const

Compute Eigen values and vectors of A A is any type that overloads the [][] operator and contains the symmetric matrix. In practice only the upper triangle of the matrix will be accessed. (Both itk::Matrix and vnl_matrix overload [][] operator.)

'EigenValues' is any type that overloads the [] operator and will contain the eigen values.

'EigenVectors' is any type that provides access to its elements with the [][] operator. It is expected be of size m_Dimension * m_Dimension.

No size checking is performed. A is expected to be a square matrix of size m_Dimension. 'EigenValues' is expected to be of length m_Dimension. The matrix is not checked to see if it is symmetric.

Each row of the matrix 'EigenVectors' represents an eigen vector. (unlike MATLAB where the columns of the [EigenVectors, EigenValues] = eig(A) contains the eigenvectors).

template<typename TMatrix, typename TVector, typename TEigenMatrix = TMatrix>
unsigned int itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::GetDimension ( void   )  const [inline]

Get Matrix dimension, Will be 0 unless explicitly set by a call to SetDimension.

Definition at line 177 of file itkSymmetricEigenAnalysis.h.

Referenced by itk::operator<<().

template<typename TMatrix, typename TVector, typename TEigenMatrix = TMatrix>
unsigned int itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::GetOrder (  )  const [inline]

Get the Matrix order. Will be 0 unless explicitly set, or unless a call to SetDimension has been made in which case it will be the matrix dimension.

Definition at line 139 of file itkSymmetricEigenAnalysis.h.

Referenced by itk::operator<<().

template<typename TMatrix, typename TVector, typename TEigenMatrix = TMatrix>
bool itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::GetOrderEigenMagnitudes (  )  const [inline]

Set/Get methods to order the eigen value magnitudes in ascending order. In other words, |lambda_1| < |lambda_2| < .....

Definition at line 160 of file itkSymmetricEigenAnalysis.h.

Referenced by itk::operator<<().

template<typename TMatrix, typename TVector, typename TEigenMatrix = TMatrix>
bool itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::GetOrderEigenValues (  )  const [inline]

Set/Get methods to order the eigen values in ascending order. This is the default. ie lambda_1 < lambda_2 < ....

Definition at line 149 of file itkSymmetricEigenAnalysis.h.

Referenced by itk::operator<<().

template<typename TMatrix, typename TVector, typename TEigenMatrix = TMatrix>
void itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::SetDimension ( const unsigned int  n  )  [inline]

Set the dimension of the input matrix A. A is a square matrix of size m_Dimension.

Definition at line 165 of file itkSymmetricEigenAnalysis.h.

Referenced by itk::Functor::SymmetricEigenAnalysisFunction< TInputImage::PixelType, TOutputImage::PixelType >::SetDimension().

template<typename TMatrix, typename TVector, typename TEigenMatrix = TMatrix>
void itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::SetOrder ( const unsigned int  n  )  [inline]

Matrix order. Defaults to matrix dimension if not set

Definition at line 131 of file itkSymmetricEigenAnalysis.h.

template<typename TMatrix, typename TVector, typename TEigenMatrix = TMatrix>
void itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::SetOrderEigenMagnitudes ( const bool  b  )  [inline]

Set/Get methods to order the eigen value magnitudes in ascending order. In other words, |lambda_1| < |lambda_2| < .....

Definition at line 155 of file itkSymmetricEigenAnalysis.h.

Referenced by itk::Functor::SymmetricEigenAnalysisFunction< TInputImage::PixelType, TOutputImage::PixelType >::OrderEigenValuesBy().

template<typename TMatrix, typename TVector, typename TEigenMatrix = TMatrix>
void itk::SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::SetOrderEigenValues ( const bool  b  )  [inline]

Set/Get methods to order the eigen values in ascending order. This is the default. ie lambda_1 < lambda_2 < ....

Definition at line 144 of file itkSymmetricEigenAnalysis.h.

Referenced by itk::Functor::SymmetricEigenAnalysisFunction< TInputImage::PixelType, TOutputImage::PixelType >::OrderEigenValuesBy().


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

Generated at Tue Jul 13 2010 02:40:29 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000