Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

vuHistogram.h

Go to the documentation of this file.
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     /* Constructor. */
00061     //vuHistogram();
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     // Read contents of histogram from a stream.
00087     //not implemented: friend istream& operator>>(istream& os, vuHistogram& hist);
00088  protected:
00090     vuDVector<dword> m_Histogram;
00092     HistType m_Type;
00093     // Name of the Histogram
00094     //m_TypeName has been made static out of class to allow 
00095 };
00096 
00097 #endif

Generated on Wed Dec 15 21:20:34 2004 for vuVolume by  doxygen 1.3.9.1