LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::regionGraphMeansNode< T > Class Template Reference

Type for adjacency graph nodes containing the mean values of each region. More...

#include <ltiRegionGraphMeans.h>

Inheritance diagram for lti::regionGraphMeansNode< T >:
Inheritance graph
[legend]
Collaboration diagram for lti::regionGraphMeansNode< T >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef T value_type

Public Member Functions

 regionGraphMeansNode ()
 ~regionGraphMeansNode ()
 regionGraphMeansNode (const regionGraphMeansNode< T > &other)
regionGraphMeansNode< T > & operator+= (const regionGraphMeansNode< T > &other)
regionGraphMeansNode< T > & operator= (const regionGraphMeansNode< T > &other)
regionGraphMeansNode< T > & consider (const T &elem)
computeMean () const
int size () const
bool read (ioHandler &handler, const bool complete=true)
bool write (ioHandler &handler, const bool complete=true) const

Protected Attributes

sumOfElements
int n

Detailed Description

template<class T>
class lti::regionGraphMeansNode< T >

Type for adjacency graph nodes containing the mean values of each region.

The template value specifies the data type representing a "mean", or better said, n times the mean, with n the number of pixels in the region.

The type T can be for instance trgbPixel<float> or just a scalar double or float, but in general it is a type with a default constructor that initialize to zero or a neutral element, and also accepts the operator+=, and operator/(int).


Member Typedef Documentation

template<class T>
typedef T lti::regionGraphMeansNode< T >::value_type

Type used to represent the mean value.


Constructor & Destructor Documentation

template<class T>
lti::regionGraphMeansNode< T >::regionGraphMeansNode (  ) 

Default constructor initialize class with "zero" state.

template<class T>
lti::regionGraphMeansNode< T >::~regionGraphMeansNode (  ) 

Default constructor initialize class with "zero" state.

template<class T>
lti::regionGraphMeansNode< T >::regionGraphMeansNode ( const regionGraphMeansNode< T > &  other  ) 

Copy constructor.


Member Function Documentation

template<class T>
T lti::regionGraphMeansNode< T >::computeMean (  )  const

Compute the mean value.

template<class T>
regionGraphMeansNode<T>& lti::regionGraphMeansNode< T >::consider ( const T &  elem  ) 

Consider one element to the means computation.

template<class T>
regionGraphMeansNode<T>& lti::regionGraphMeansNode< T >::operator+= ( const regionGraphMeansNode< T > &  other  ) 

Operator+= required by the interface to combine two nodes.

template<class T>
regionGraphMeansNode<T>& lti::regionGraphMeansNode< T >::operator= ( const regionGraphMeansNode< T > &  other  ) 

Assignment operator.

Reimplemented from lti::ioObject.

template<class T>
bool lti::regionGraphMeansNode< T >::read ( ioHandler handler,
const bool  complete = true 
) [virtual]

Read node from ioHandler.

Reimplemented from lti::ioObject.

template<class T>
int lti::regionGraphMeansNode< T >::size (  )  const

Return the number of points considered.

template<class T>
bool lti::regionGraphMeansNode< T >::write ( ioHandler handler,
const bool  complete = true 
) const [virtual]

Write node to ioHandler.

Reimplemented from lti::ioObject.


Member Data Documentation

template<class T>
int lti::regionGraphMeansNode< T >::n [protected]

Number of elements considered until now.

template<class T>
T lti::regionGraphMeansNode< T >::sumOfElements [protected]

Contains the sum of the elements considered until now.


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

Generated on Sat Apr 10 15:27:46 2010 for LTI-Lib by Doxygen 1.6.1