i3d::HRCA_Histogram< T > Class Template Reference
Histogram class. More...
#include <hrca_histogram.h>
Public Member Functions | |
HRCA_Histogram () | |
Constructor. It creates an instance of the canvas and initialize all its attributes on its defaults. | |
~HRCA_Histogram () | |
Destructor. | |
void | Clear () |
clears histogram | |
void | Add (T i) |
increments the frequency of i-th value by one. | |
void | Compute (const T *data, long n) |
computes data histogram | |
void | Set (long i, long n) |
sets the frequency of i-th value to given value. | |
long | GetLeftPercentilID (int percent) const |
return index of certain percentil in histogram | |
Protected Member Functions | |
void | ComputeMax (long i) |
update _max_peak and _max_idx using i-th histogram value | |
Protected Attributes | |
long * | _hist |
histogram | |
const long | _size |
size of histogram | |
long | _max_peak |
maximal value in histogram | |
long | _max_idx |
index of maximal value | |
long | _suma |
histogram suma |
Detailed Description
template<class T>
class i3d::HRCA_Histogram< T >
Histogram class.
Member Function Documentation
template<class T>
void i3d::HRCA_Histogram< T >::Add | ( | T | i | ) | [inline] |
increments the frequency of i-th value by one.
- Parameters:
-
i
template<class T>
void i3d::HRCA_Histogram< T >::Compute | ( | const T * | data, | |
long | n | |||
) |
computes data histogram
- Parameters:
-
data n data length
template<class T>
void i3d::HRCA_Histogram< T >::Set | ( | long | i, | |
long | n | |||
) | [inline] |
sets the frequency of i-th value to given value.
- Parameters:
-
i value n frequency
template<class T>
long i3d::HRCA_Histogram< T >::GetLeftPercentilID | ( | int | percent | ) | const |
return index of certain percentil in histogram
- Parameters:
-
percent percentil (value from 0 to 100) for 0 you get index of the first nonzero value.
- Returns:
- index (i.e. intenzity)
The documentation for this class was generated from the following files:
- hrca_histogram.h
- hrca_histogram.cpp