Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
BIAS::Histogram1D< T > Class Template Reference

Simple one dimensional histogram computation. More...

#include <MathAlgo/Histogram1D.hh>

+ Inheritance diagram for BIAS::Histogram1D< T >:
+ Collaboration diagram for BIAS::Histogram1D< T >:

Public Member Functions

void AddData (const std::vector< T > &data)
 
void AddData (const T &data)
 
void AddDebugLevel (const long int lv)
 
void AddDebugLevel (const std::string &name)
 
void Clear ()
 
bool DebugLevelIsSet (const long int lv) const
 
bool DebugLevelIsSet (const std::string &name) const
 
GetBinCenterWithMaxEntries ()
 
int GetDebugLevel () const
 
std::ostream & GetDebugStream () const
 
void GetDebugStream (std::ostream &os) const
 
int GetHistogram (std::vector< T > &bin_center, std::vector< unsigned > &hist)
 
 Histogram1D ()
 
long int Name2DebugLevel (const std::string &name) const
 looks up a debuglevel in the internal map, returns 0 if not found More...
 
long int NewDebugLevel (const std::string &name)
 creates a new debuglevel More...
 
void PrintDebugLevel (std::ostream &os=std::cout) const
 
void RemoveDebugLevel (const long int lv)
 
void RemoveDebugLevel (const std::string &name)
 
void SetAutoScale (const bool val)
 
void SetDebugLevel (const long int lv)
 
void SetDebugLevel (const std::string &name)
 
void SetDebugStream (const std::ostream &os)
 
void SetHistogramBoundaries (const T &min_val, const T &max_val)
 
void SetNumBins (const unsigned val)
 
void ShowDebugLevel (std::ostream &os=std::cout) const
 prints all internally known debuglevels More...
 
 ~Histogram1D ()
 

Static Public Member Functions

static long int GetGlobalDebugLevel ()
 
static void SetGlobalDebugLevel (long int lev)
 

Protected Member Functions

void ComputeBinCenters_ (std::vector< T > &center) const
 
long ConsumeNextFreeDebuglevel_ ()
 returns the next available debuglevel More...
 
int GetBinNum_ (const T &data)
 
void InitInternals_ ()
 
void InitInternalsFromData_ ()
 

Protected Attributes

long int _liDebugLevel
 
long int _liNextDebugLevel
 new concept, debuglevel are managed here in the debug class More...
 
std::map< std::string, long int > _String2Debuglevel
 
bool AutoScale_
 compute min and max value automatically More...
 
BinSize_
 
std::vector< T > Data_
 
MaxValue_
 
MinValue_
 
unsigned NumBins_
 

Static Protected Attributes

static std::ostream _zDebugStream
 
static long int GlobalDebugLevel = 0
 

Detailed Description

template<class T>
class BIAS::Histogram1D< T >

Simple one dimensional histogram computation.

Only defined for T=float|double

Author
woelk 01/2008 (c) www.vision-n.de

Definition at line 38 of file Histogram1D.hh.

Constructor & Destructor Documentation

template<class T >
Histogram1D::Histogram1D ( )

Definition at line 8 of file Histogram1D.cpp.

template<class T >
Histogram1D::~Histogram1D ( )

Definition at line 15 of file Histogram1D.cpp.

Member Function Documentation

template<class T >
void Histogram1D::AddData ( const std::vector< T > &  data)

Definition at line 21 of file Histogram1D.cpp.

Referenced by BIAS::PMDImageProc::LimitDepthSpread().

template<class T >
void Histogram1D::AddData ( const T &  data)

Definition at line 26 of file Histogram1D.cpp.

void BIAS::Debug::AddDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::AddDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 362 of file Debug.hh.

template<class T>
void BIAS::Histogram1D< T >::Clear ( )
inline

Definition at line 46 of file Histogram1D.hh.

template<class T >
void Histogram1D::ComputeBinCenters_ ( std::vector< T > &  center) const
protected

Definition at line 119 of file Histogram1D.cpp.

long BIAS::Debug::ConsumeNextFreeDebuglevel_ ( )
inlineprotectedinherited

returns the next available debuglevel

Author
woelk 09/2006

Definition at line 521 of file Debug.hh.

bool BIAS::Debug::DebugLevelIsSet ( const long int  lv) const
inlineinherited
bool BIAS::Debug::DebugLevelIsSet ( const std::string &  name) const
inlineinherited

Definition at line 350 of file Debug.hh.

template<class T >
T Histogram1D::GetBinCenterWithMaxEntries ( )
Returns
the bin center with the maximum number of entries
Author
ischiller

Definition at line 64 of file Histogram1D.cpp.

Referenced by BIAS::PMDImageProc::LimitDepthSpread().

template<class T>
int BIAS::Histogram1D< T >::GetBinNum_ ( const T &  data)
inlineprotected

Definition at line 75 of file Histogram1D.hh.

int BIAS::Debug::GetDebugLevel ( ) const
inlineinherited
std::ostream& BIAS::Debug::GetDebugStream ( ) const
inlineinherited

Definition at line 405 of file Debug.hh.

void BIAS::Debug::GetDebugStream ( std::ostream &  os) const
inlineinherited

Definition at line 414 of file Debug.hh.

static long int BIAS::Debug::GetGlobalDebugLevel ( )
inlinestaticinherited

Definition at line 431 of file Debug.hh.

template<class T >
int Histogram1D::GetHistogram ( std::vector< T > &  bin_center,
std::vector< unsigned > &  hist 
)

this should not happen when autoscale is true

Definition at line 31 of file Histogram1D.cpp.

template<class T >
void Histogram1D::InitInternals_ ( )
protected

Definition at line 105 of file Histogram1D.cpp.

template<class T >
void Histogram1D::InitInternalsFromData_ ( )
protected

Definition at line 81 of file Histogram1D.cpp.

long int BIAS::Debug::Name2DebugLevel ( const std::string &  name) const
inlineinherited

looks up a debuglevel in the internal map, returns 0 if not found

Author
woelk 09/2006

Definition at line 454 of file Debug.hh.

long int BIAS::Debug::NewDebugLevel ( const std::string &  name)
inlineinherited
void BIAS::Debug::PrintDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

Definition at line 383 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const long int  lv)
inlineinherited

Definition at line 369 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 376 of file Debug.hh.

template<class T>
void BIAS::Histogram1D< T >::SetAutoScale ( const bool  val)
inline

Definition at line 63 of file Histogram1D.hh.

void BIAS::Debug::SetDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::SetDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 325 of file Debug.hh.

void BIAS::Debug::SetDebugStream ( const std::ostream &  os)
inlineinherited

Definition at line 398 of file Debug.hh.

static void BIAS::Debug::SetGlobalDebugLevel ( long int  lev)
inlinestaticinherited

Definition at line 424 of file Debug.hh.

template<class T>
void BIAS::Histogram1D< T >::SetHistogramBoundaries ( const T &  min_val,
const T &  max_val 
)
inline

Definition at line 60 of file Histogram1D.hh.

Referenced by BIAS::PMDImageProc::LimitDepthSpread().

template<class T>
void BIAS::Histogram1D< T >::SetNumBins ( const unsigned  val)
inline

Definition at line 66 of file Histogram1D.hh.

Referenced by BIAS::PMDImageProc::LimitDepthSpread().

void BIAS::Debug::ShowDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

prints all internally known debuglevels

Author
woelk 09/2006

Definition at line 496 of file Debug.hh.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel
protectedinherited

Definition at line 510 of file Debug.hh.

Referenced by BIAS::Debug::operator=(), and BIAS::ImageBase::operator=().

long int BIAS::Debug::_liNextDebugLevel
protectedinherited

new concept, debuglevel are managed here in the debug class

Definition at line 516 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::map<std::string, long int> BIAS::Debug::_String2Debuglevel
protectedinherited

Definition at line 517 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream
staticprotectedinherited

Definition at line 511 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

template<class T>
bool BIAS::Histogram1D< T >::AutoScale_
protected

compute min and max value automatically

Definition at line 73 of file Histogram1D.hh.

template<class T>
T BIAS::Histogram1D< T >::BinSize_
protected

Definition at line 72 of file Histogram1D.hh.

template<class T>
std::vector<T> BIAS::Histogram1D< T >::Data_
protected

Definition at line 70 of file Histogram1D.hh.

long int BIAS::Debug::GlobalDebugLevel = 0
staticprotectedinherited

Definition at line 513 of file Debug.hh.

template<class T>
T BIAS::Histogram1D< T >::MaxValue_
protected

Definition at line 72 of file Histogram1D.hh.

template<class T>
T BIAS::Histogram1D< T >::MinValue_
protected

Definition at line 72 of file Histogram1D.hh.

template<class T>
unsigned BIAS::Histogram1D< T >::NumBins_
protected

Definition at line 71 of file Histogram1D.hh.


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