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

itk::MultivariateLegendrePolynomial Class Reference

#include <itkMultivariateLegendrePolynomial.h>

List of all members.


Detailed Description

2D and 3D multivariate Legendre Polynomial

In 2D,

\[ f(x_vector, parameter_vector) = sum_i (sum_j (parameter_{ i j } * P_i(x) *P_j(y)) over j from 0 to l - i)) over i from 0 to l \]

where P_i() denoting a Legendre polynomial of degree i and l it the degree of the polynomial

In 3D,

\[ f(x_vector, parameter_vecter) = sum_i (sum_j (sum_k (parameter_{i j k} * P_i(x) * P_j(y) * P_k(z)) over k from 0 to l - i - j) over j from 0 to l - i) over i from 0 to l \]

The size of the parameter vector for 2D is $ (l + 1) * (l + 2) / 2 $, and for 3D is $ (l + 1) * (l + 2) / 2 * (l + 3) / 3 $

To get the size of the parameter vector, users can use one of the two GetNumberOfCoefficients() member functions

To get function result, users can use the operator() or its SimpleForwardIterator's Get() method.

This is a part of the bias correction methods and implemenations that was initially developed and implemented by Martin Styner, Univ. of North Carolina at Chapel Hill, and his colleagues.

For more details. refer to the following articles. "Parametric estimate of intensity inhomogeneities applied to MRI" Martin Styner, G. Gerig, Christian Brechbuehler, Gabor Szekely, IEEE TRANSACTIONS ON MEDICAL IMAGING; 19(3), pp. 153-165, 2000, (http://www.ia.unc.edu/~styner/docs/tmi00.pdf)

"Evaluation of 2D/3D bias correction with 1+1ES-optimization" Martin Styner, Prof. Dr. G. Gerig (IKT, BIWI, ETH Zuerich), TR-197 (http://www.ia.unc.edu/~styner/docs/StynerTR97.pdf)

Definition at line 70 of file itkMultivariateLegendrePolynomial.h.
double Evaluate (IndexType &index)
unsigned int GetNumberOfCoefficients (unsigned int dimension, unsigned int degree)
unsigned int GetNumberOfCoefficients ()
void Print (std::ostream &os)
void CalculateXCoef (double norm_y, const CoefficientArrayType &coef)
void CalculateYCoef (double norm_z, const CoefficientArrayType &coef)
double LegendreSum (const double x, int n, const CoefficientArrayType &coef, int offset=0)
void PrintSelf (std::ostream &os, Indent indent) const

Public Types

typedef DoubleArrayType CoefficientArrayType
typedef ULongArrayType DomainSizeType
typedef std::vector< double > DoubleArrayType
typedef LongArrayType IndexType
typedef std::vector< long > LongArrayType
typedef Array< double > ParametersType
typedef MultivariateLegendrePolynomial Self
typedef std::vector< unsigned
long > 
ULongArrayType

Public Member Functions

const CoefficientArrayTypeGetCoefficients (void) const
unsigned int GetDegree (void) const
unsigned int GetDimension (void) const
const DomainSizeTypeGetDomainSize (void) const
unsigned int GetNumberOfCoefficients (void) const
 MultivariateLegendrePolynomial (unsigned int dimension, unsigned int degree, const DomainSizeType &domainSize)
void SetCoefficients (const ParametersType &coef) throw (CoefficientVectorSizeMismatch)
void SetCoefficients (const CoefficientArrayType &coef) throw (CoefficientVectorSizeMismatch)
virtual ~MultivariateLegendrePolynomial ()

Classes

class  CoefficientVectorSizeMismatch
class  SimpleForwardIterator


Member Typedef Documentation

typedef DoubleArrayType itk::MultivariateLegendrePolynomial::CoefficientArrayType

Internal coefficient storage type.

Definition at line 80 of file itkMultivariateLegendrePolynomial.h.

typedef ULongArrayType itk::MultivariateLegendrePolynomial::DomainSizeType

The size of the domain.

Definition at line 87 of file itkMultivariateLegendrePolynomial.h.

typedef std::vector< double > itk::MultivariateLegendrePolynomial::DoubleArrayType

Definition at line 75 of file itkMultivariateLegendrePolynomial.h.

typedef LongArrayType itk::MultivariateLegendrePolynomial::IndexType

Definition at line 88 of file itkMultivariateLegendrePolynomial.h.

typedef std::vector< long > itk::MultivariateLegendrePolynomial::LongArrayType

Definition at line 77 of file itkMultivariateLegendrePolynomial.h.

typedef Array< double > itk::MultivariateLegendrePolynomial::ParametersType

Same as CoefficientArray This type definition will be used by EnergyFunction object.

Definition at line 84 of file itkMultivariateLegendrePolynomial.h.

typedef MultivariateLegendrePolynomial itk::MultivariateLegendrePolynomial::Self

Definition at line 73 of file itkMultivariateLegendrePolynomial.h.

typedef std::vector< unsigned long > itk::MultivariateLegendrePolynomial::ULongArrayType

Definition at line 76 of file itkMultivariateLegendrePolynomial.h.


Constructor & Destructor Documentation

itk::MultivariateLegendrePolynomial::MultivariateLegendrePolynomial ( unsigned int  dimension,
unsigned int  degree,
const DomainSizeType domainSize 
)

Constructor.

virtual itk::MultivariateLegendrePolynomial::~MultivariateLegendrePolynomial (  )  [virtual]

Destructor.


Member Function Documentation

void itk::MultivariateLegendrePolynomial::CalculateXCoef ( double  norm_y,
const CoefficientArrayType coef 
) [protected]

Referenced by Evaluate().

void itk::MultivariateLegendrePolynomial::CalculateYCoef ( double  norm_z,
const CoefficientArrayType coef 
) [protected]

Referenced by Evaluate().

double itk::MultivariateLegendrePolynomial::Evaluate ( IndexType index  )  [inline]

In the case which the bias field is 2D, it returns bias value at the point which is specified by the index

Definition at line 147 of file itkMultivariateLegendrePolynomial.h.

References CalculateXCoef(), CalculateYCoef(), and LegendreSum().

Referenced by itk::MultivariateLegendrePolynomial::SimpleForwardIterator::Get().

const CoefficientArrayType& itk::MultivariateLegendrePolynomial::GetCoefficients ( void   )  const

Gets Legendre polynomials' coefficients.

unsigned int itk::MultivariateLegendrePolynomial::GetDegree ( void   )  const [inline]

Gets the degree (the degree of Legendre polynomials).

Definition at line 103 of file itkMultivariateLegendrePolynomial.h.

unsigned int itk::MultivariateLegendrePolynomial::GetDimension ( void   )  const [inline]

Gets the dimension.

Definition at line 99 of file itkMultivariateLegendrePolynomial.h.

Referenced by itk::MultivariateLegendrePolynomial::SimpleForwardIterator::SimpleForwardIterator().

const DomainSizeType& itk::MultivariateLegendrePolynomial::GetDomainSize ( void   )  const [inline]

Gets each dimesion's size.

Definition at line 115 of file itkMultivariateLegendrePolynomial.h.

Referenced by itk::MultivariateLegendrePolynomial::SimpleForwardIterator::SimpleForwardIterator().

unsigned int itk::MultivariateLegendrePolynomial::GetNumberOfCoefficients ( unsigned int  dimension,
unsigned int  degree 
)

Gets the number of coefficients.

unsigned int itk::MultivariateLegendrePolynomial::GetNumberOfCoefficients (  ) 

Gets the number of coefficients.

unsigned int itk::MultivariateLegendrePolynomial::GetNumberOfCoefficients ( void   )  const [inline]

Returns the number of coefficients of the polynomial This number is computed from the degree of the polynomial the SetCoefficients() method expects an array of this size, an exception is thrown otherwise

See also:
SetCoefficients

Definition at line 111 of file itkMultivariateLegendrePolynomial.h.

double itk::MultivariateLegendrePolynomial::LegendreSum ( const double  x,
int  n,
const CoefficientArrayType coef,
int  offset = 0 
) [protected]

Referenced by Evaluate().

void itk::MultivariateLegendrePolynomial::Print ( std::ostream &  os  ) 

void itk::MultivariateLegendrePolynomial::PrintSelf ( std::ostream &  os,
Indent  indent 
) const [protected]

void itk::MultivariateLegendrePolynomial::SetCoefficients ( const ParametersType coef  )  throw (CoefficientVectorSizeMismatch)

void itk::MultivariateLegendrePolynomial::SetCoefficients ( const CoefficientArrayType coef  )  throw (CoefficientVectorSizeMismatch)

Sets the Legendre polynomials' parameters.

Warning:
The number of coefficients provided should match the number returned by GetNumberOfCoefficients() otherwise an exception is thrown.


The documentation for this class was generated from the following file:
Generated at Thu Nov 6 08:45:56 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000