00001 #ifndef _VUHISTOGRAM_H_
00002 #define _VUHISTOGRAM_H_
00003
00004 #include <iostream>
00005
00006 #include "vuDVector.h"
00007 #include "vuString.h"
00008 #include <vuSimpleTypes.h>
00009
00010 using namespace std;
00011
00054 class vuHistogram {
00055 public:
00056 enum HistType { TYPE_INTENSITY=0, TYPE_LAPWEIGHTED,
00057 TYPE_NUMTYPES
00058 };
00059
00060
00061
00063 vuHistogram(HistType type = TYPE_INTENSITY) ;
00065 virtual ~vuHistogram();
00066
00068 void setType(HistType type);
00069 HistType getType() { return m_Type; }
00071 void reset();
00073 void setSize(dword size);
00074
00076 void recordIntensity(word intensity);
00077
00079 const vuDVector<dword> getHistogram() const
00080 { return m_Histogram; }
00082 const char* getTypeName() const;
00083
00085 friend ostream& operator<<(ostream& os, const vuHistogram& hist);
00086
00087
00088 protected:
00090 vuDVector<dword> m_Histogram;
00092 HistType m_Type;
00093
00094
00095 };
00096
00097 #endif