latest version v1.9 - last update 10 Apr 2010 |
Type for adjacency graph nodes containing the mean values of each region. More...
#include <ltiRegionGraphMeans.h>
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) |
T | computeMean () const |
int | size () const |
bool | read (ioHandler &handler, const bool complete=true) |
bool | write (ioHandler &handler, const bool complete=true) const |
Protected Attributes | |
T | sumOfElements |
int | n |
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).
typedef T lti::regionGraphMeansNode< T >::value_type |
Type used to represent the mean value.
lti::regionGraphMeansNode< T >::regionGraphMeansNode | ( | ) |
Default constructor initialize class with "zero" state.
lti::regionGraphMeansNode< T >::~regionGraphMeansNode | ( | ) |
Default constructor initialize class with "zero" state.
lti::regionGraphMeansNode< T >::regionGraphMeansNode | ( | const regionGraphMeansNode< T > & | other | ) |
Copy constructor.
T lti::regionGraphMeansNode< T >::computeMean | ( | ) | const |
Compute the mean value.
regionGraphMeansNode<T>& lti::regionGraphMeansNode< T >::consider | ( | const T & | elem | ) |
Consider one element to the means computation.
regionGraphMeansNode<T>& lti::regionGraphMeansNode< T >::operator+= | ( | const regionGraphMeansNode< T > & | other | ) |
Operator+= required by the interface to combine two nodes.
regionGraphMeansNode<T>& lti::regionGraphMeansNode< T >::operator= | ( | const regionGraphMeansNode< T > & | other | ) |
Assignment operator.
Reimplemented from lti::ioObject.
bool lti::regionGraphMeansNode< T >::read | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | [virtual] |
Read node from ioHandler.
Reimplemented from lti::ioObject.
int lti::regionGraphMeansNode< T >::size | ( | ) | const |
Return the number of points considered.
bool lti::regionGraphMeansNode< T >::write | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | const [virtual] |
Write node to ioHandler.
Reimplemented from lti::ioObject.
int lti::regionGraphMeansNode< T >::n [protected] |
Number of elements considered until now.
T lti::regionGraphMeansNode< T >::sumOfElements [protected] |
Contains the sum of the elements considered until now.