MDSTk Libraries  1.1.0
Medical Data Segmentation Toolkit
Public Types | Public Member Functions | Protected Attributes
mds::img::CPixelStats Class Reference

Feature vector containing basic statistics like mean value and variance. More...

#include <mdsPixelStats.h>

Inheritance diagram for mds::img::CPixelStats:
Inheritance graph
[legend]

List of all members.

Public Types

enum  
 Templates that require members of the CStaticVector class can use this enum to check the existence. More...
enum  
 The vector size. More...
enum  
 Templates that require members of the CFeatureVector class may use this enum to check the existence. More...
enum  { MEAN_VALUE = 0, VARIANCE = 1 }
 Indexes of the most important features. More...
typedef CFeatureVector< double, 2 > tBase
 Base class.
typedef double tElement
 Vector element type.
typedef tBase::tFeature tFeature
 Type representing a single feature value.
typedef Eigen::Matrix
< tElement, SIZE,
1, Eigen::ColMajor > 
tStorage
 Underlying data (see the Eigen math library).
typedef
mds::math::CStaticVector
< double, Size > 
tVector
 Feature vector.

Public Member Functions

CStaticVectorabs ()
 Absolute value of all elements.
tStorageasEigen ()
 Returns reference to the underlying data (see the Eigen math library).
const tStorageasEigen () const
double & at (tSize i)
 Returns reference to the element [i].
const double & at (tSize i) const
bool checkState (int State) const
 Checks the concrete state.
 CPixelStats ()
 Default constructor.
 CPixelStats (const CPixelStats &Stats)
 Copy constructor.
CStaticVectorfill (const double &Value)
 Sets all elements of the vector to a given value.
Function forEach (Function Func)
 Calls a function object for every vector element.
Function forEach (Function Func) const
 Calls a function object for every vector element.
tFeaturegetFeature (tSize i)
 Returns value of a subscripted feature.
const tFeaturegetFeature (tSize i) const
tVectorgetImpl ()
 Returns reference to the vector implementation.
const tVectorgetImpl () const
tFeaturegetMean ()
 Returns mean value of all pixels.
const tFeaturegetMean () const
tSize getNumOfFeatures () const
 Returns size of the feature vector.
int getNumOfPixels () const
 Returns the number of pixels counted.
int getNumOfSamples () const
 Returns the number of samples taken into account.
double * getPtr ()
 Returns pointer to the vector data.
const double * getPtr () const
double * getPtr (tSize i)
 Returns pointer to a given element.
const double * getPtr (tSize i) const
tSize getSize () const
 Returns the vector size.
int getState () const
 Returns the current internal state.
tSize getStride () const
 Returns stride between two neigbouring vector elements.
tFeaturegetVariance ()
 Returns variance of all pixels.
const tFeaturegetVariance () const
CFeatureVectorincNumOfSamples (int Value)
 Inceases the number of sampels.
bool isValid () const
 Returns true if the feature vector is evaluated correctly.
CStaticVectormult (const CStaticMatrix< double, M, K > &Matrix, const CStaticVector< double, K > &Vector)
 Matrix vs.
CStaticVectormult (const CStaticVector< double, K > &Vector, const CStaticMatrix< double, K, M > &Matrix)
 Row vector vs.
CStaticVectormultAdd (const CStaticVector &Vector, const double &Scalar)
 Provides operation this += Vector * Scalar.
CStaticVectorones ()
 The vector initialization method.
double & operator() (tSize i)
 Returns reference to the subscripted element [i].
const double & operator() (tSize i) const
CStaticVectoroperator*= (const CStaticVector &v)
 Element wise product.
CStaticVectoroperator*= (const CScalar< U > &c)
 Multiplies all elements by scalar.
CStaticVectoroperator+= (const CStaticVector &v)
 Element wise addition.
CStaticVectoroperator+= (const CScalar< U > &c)
 Adds scalar to all elements.
CStaticVectoroperator-= (const CStaticVector &v)
 Element wise subtraction.
CStaticVectoroperator-= (const CScalar< U > &c)
 Subtracts scalar from all elements.
CStaticVectoroperator/= (const CStaticVector &v)
 Element wise addition.
CStaticVectoroperator/= (const CScalar< U > &c)
 Divides all elements by scalar.
CPixelStatsoperator= (const CPixelStats &Stats)
 Assignment operator.
tVectorset (tSize i, const tElement &Value)
 Sets the vector element at the position [i].
CStaticVectorset (tSize i, const double &Value)
 Sets the vector element at the position [i].
CFeatureVectorsetFeature (tSize i, const tFeature &Value)
 Sets value of the i-th feature.
void setMean (const tFeature &Value)
 Sets the mean value.
CFeatureVectorsetNumOfSamples (int Value)
 Sets the number of samples.
CFeatureVectorsetState (int State)
 Sets the internal state.
void setVariance (const tFeature &Value)
 Sets the pixel value variance.
tSize size () const
 Returns the vector size.
CStaticVectorzeros ()
 The vector initialization method.
 ~CPixelStats ()
 Destructor.

Protected Attributes

int m_NumOfSamples
 Total number of samples counted.
int m_State
 Current internal state.
tStorage m_Vector
 Underlying vector data (see the Eigen library).

Detailed Description

Feature vector containing basic statistics like mean value and variance.

It may be extracted from any set of image pixels.


Member Typedef Documentation

Base class.

Reimplemented from mds::img::CFeatureVector< double, 2 >.

typedef double mds::math::CStaticVector< double , M >::tElement [inherited]

Vector element type.

Reimplemented from mds::math::CVectorBase< V >.

Type representing a single feature value.

Reimplemented from mds::img::CFeatureVector< double, 2 >.

typedef Eigen::Matrix<tElement, SIZE, 1, Eigen::ColMajor> mds::math::CStaticVector< double , M >::tStorage [inherited]

Underlying data (see the Eigen math library).

typedef mds::math::CStaticVector<double , Size> mds::img::CFeatureVector< double , Size >::tVector [inherited]

Feature vector.

Reimplemented from mds::math::CVectorBase< V >.


Member Enumeration Documentation

anonymous enum [inherited]

Templates that require members of the CStaticVector class can use this enum to check the existence.

anonymous enum [inherited]

The vector size.

anonymous enum [inherited]

Templates that require members of the CFeatureVector class may use this enum to check the existence.

anonymous enum

Indexes of the most important features.

Enumerator:
MEAN_VALUE 
VARIANCE 

Constructor & Destructor Documentation

Default constructor.

Copy constructor.

Destructor.


Member Function Documentation

CStaticVector& mds::math::CStaticVector< double , M >::abs ( ) [inherited]

Absolute value of all elements.

  • Returns reference to this.
tStorage& mds::math::CStaticVector< double , M >::asEigen ( ) [inherited]

Returns reference to the underlying data (see the Eigen math library).

const tStorage& mds::math::CStaticVector< double , M >::asEigen ( ) const [inherited]
double & mds::math::CStaticVector< double , M >::at ( tSize  i) [inherited]

Returns reference to the element [i].

Reimplemented from mds::math::CVectorBase< V >.

const double & mds::math::CStaticVector< double , M >::at ( tSize  i) const [inherited]

Reimplemented from mds::math::CVectorBase< V >.

bool mds::img::CFeatureVector< double , Size >::checkState ( int  State) const [inherited]

Checks the concrete state.

CStaticVector& mds::math::CStaticVector< double , M >::fill ( const double &  Value) [inherited]

Sets all elements of the vector to a given value.

  • Returns reference to this.
Function mds::math::CStaticVector< double , M >::forEach ( Function  Func) [inherited]

Calls a function object for every vector element.

Reimplemented from mds::math::CVectorBase< V >.

Function mds::math::CStaticVector< double , M >::forEach ( Function  Func) const [inherited]

Calls a function object for every vector element.

Reimplemented from mds::math::CVectorBase< V >.

tFeature& mds::img::CFeatureVector< double , Size >::getFeature ( tSize  i) [inherited]

Returns value of a subscripted feature.

const tFeature& mds::img::CFeatureVector< double , Size >::getFeature ( tSize  i) const [inherited]
template<class V>
tVector& mds::math::CVectorBase< V >::getImpl ( ) [inherited]

Returns reference to the vector implementation.

template<class V>
const tVector& mds::math::CVectorBase< V >::getImpl ( ) const [inherited]

Returns mean value of all pixels.

tSize mds::img::CFeatureVector< double , Size >::getNumOfFeatures ( ) const [inherited]

Returns size of the feature vector.

Returns the number of pixels counted.

int mds::img::CFeatureVector< double , Size >::getNumOfSamples ( ) const [inherited]

Returns the number of samples taken into account.

double * mds::math::CStaticVector< double , M >::getPtr ( ) [inherited]

Returns pointer to the vector data.

const double * mds::math::CStaticVector< double , M >::getPtr ( ) const [inherited]
double * mds::math::CStaticVector< double , M >::getPtr ( tSize  i) [inherited]

Returns pointer to a given element.

const double * mds::math::CStaticVector< double , M >::getPtr ( tSize  i) const [inherited]
tSize mds::math::CStaticVector< double , M >::getSize ( ) const [inherited]

Returns the vector size.

Reimplemented from mds::math::CVectorBase< V >.

int mds::img::CFeatureVector< double , Size >::getState ( ) const [inherited]

Returns the current internal state.

tSize mds::math::CStaticVector< double , M >::getStride ( ) const [inherited]

Returns stride between two neigbouring vector elements.

Reimplemented from mds::math::CVectorBase< V >.

Returns variance of all pixels.

CFeatureVector& mds::img::CFeatureVector< double , Size >::incNumOfSamples ( int  Value) [inherited]

Inceases the number of sampels.

bool mds::img::CFeatureVector< double , Size >::isValid ( ) const [inherited]

Returns true if the feature vector is evaluated correctly.

CStaticVector& mds::math::CStaticVector< double , M >::mult ( const CStaticMatrix< double , M, K > &  Matrix,
const CStaticVector< double , K > &  Vector 
) [inherited]

Matrix vs.

column vector multiplication.

  • Returns reference to this.
CStaticVector& mds::math::CStaticVector< double , M >::mult ( const CStaticVector< double , K > &  Vector,
const CStaticMatrix< double , K, M > &  Matrix 
) [inherited]

Row vector vs.

matrix multiplication.

  • Returns reference to this.
CStaticVector& mds::math::CStaticVector< double , M >::multAdd ( const CStaticVector< double, Size > &  Vector,
const double &  Scalar 
) [inherited]

Provides operation this += Vector * Scalar.

  • Returns reference to this.
CStaticVector& mds::math::CStaticVector< double , M >::ones ( ) [inherited]

The vector initialization method.

  • Returns reference to this.
double & mds::math::CStaticVector< double , M >::operator() ( tSize  i) [inherited]

Returns reference to the subscripted element [i].

Reimplemented from mds::math::CVectorBase< V >.

const double & mds::math::CStaticVector< double , M >::operator() ( tSize  i) const [inherited]

Reimplemented from mds::math::CVectorBase< V >.

CStaticVector& mds::math::CStaticVector< double , M >::operator*= ( const CStaticVector< double, Size > &  v) [inherited]

Element wise product.

CStaticVector& mds::math::CStaticVector< double , M >::operator*= ( const CScalar< U > &  c) [inherited]

Multiplies all elements by scalar.

CStaticVector& mds::math::CStaticVector< double , M >::operator+= ( const CStaticVector< double, Size > &  v) [inherited]

Element wise addition.

CStaticVector& mds::math::CStaticVector< double , M >::operator+= ( const CScalar< U > &  c) [inherited]

Adds scalar to all elements.

CStaticVector& mds::math::CStaticVector< double , M >::operator-= ( const CStaticVector< double, Size > &  v) [inherited]

Element wise subtraction.

CStaticVector& mds::math::CStaticVector< double , M >::operator-= ( const CScalar< U > &  c) [inherited]

Subtracts scalar from all elements.

CStaticVector& mds::math::CStaticVector< double , M >::operator/= ( const CStaticVector< double, Size > &  v) [inherited]

Element wise addition.

CStaticVector& mds::math::CStaticVector< double , M >::operator/= ( const CScalar< U > &  c) [inherited]

Divides all elements by scalar.

CPixelStats& mds::img::CPixelStats::operator= ( const CPixelStats Stats)

Assignment operator.

template<class V>
tVector& mds::math::CVectorBase< V >::set ( tSize  i,
const tElement Value 
) [inherited]

Sets the vector element at the position [i].

CStaticVector& mds::math::CStaticVector< double , M >::set ( tSize  i,
const double &  Value 
) [inherited]

Sets the vector element at the position [i].

CFeatureVector& mds::img::CFeatureVector< double , Size >::setFeature ( tSize  i,
const tFeature Value 
) [inherited]

Sets value of the i-th feature.

void mds::img::CPixelStats::setMean ( const tFeature Value)

Sets the mean value.

CFeatureVector& mds::img::CFeatureVector< double , Size >::setNumOfSamples ( int  Value) [inherited]

Sets the number of samples.

CFeatureVector& mds::img::CFeatureVector< double , Size >::setState ( int  State) [inherited]

Sets the internal state.

Sets the pixel value variance.

tSize mds::math::CStaticVector< double , M >::size ( ) const [inherited]

Returns the vector size.

Reimplemented from mds::math::CVectorBase< V >.

CStaticVector& mds::math::CStaticVector< double , M >::zeros ( ) [inherited]

The vector initialization method.

  • Returns reference to this.

Member Data Documentation

int mds::img::CFeatureVector< double , Size >::m_NumOfSamples [protected, inherited]

Total number of samples counted.

int mds::img::CFeatureVector< double , Size >::m_State [protected, inherited]

Current internal state.

tStorage mds::math::CStaticVector< double , M >::m_Vector [protected, inherited]

Underlying vector data (see the Eigen library).


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