Fawkes API Fawkes Development Version

histogram_file.h

00001 
00002 /***************************************************************************
00003  *  histogram_file.h - Histogram file
00004  *
00005  *  Created: Sat Mar 29 16:03:12 2008
00006  *  Copyright  2008  Daniel Beck
00007  *
00008  ****************************************************************************/
00009 
00010 /*  This program is free software; you can redistribute it and/or modify
00011  *  it under the terms of the GNU General Public License as published by
00012  *  the Free Software Foundation; either version 2 of the License, or
00013  *  (at your option) any later version. A runtime exception applies to
00014  *  this software (see LICENSE.GPL_WRE file mentioned below for details).
00015  *
00016  *  This program is distributed in the hope that it will be useful,
00017  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  *  GNU Library General Public License for more details.
00020  *
00021  *  Read the full text in the LICENSE.GPL_WRE file in the doc directory.
00022  */
00023 
00024 #ifndef __FIREVISION_FVUTILS_STATISTICAL_HISTOGRAM_FILE_H_
00025 #define __FIREVISION_FVUTILS_STATISTICAL_HISTOGRAM_FILE_H_
00026 
00027 #define FIREVISION_HISTOGRAM_MAGIC  0xFF04
00028 #define FIREVISION_HISTOGRAM_CURVER 1
00029 
00030 #include <fvutils/fileformat/fvfile.h>
00031 #include <fvutils/base/roi.h>
00032 #include <vector>
00033 #include <map>
00034 
00035 namespace firevision {
00036 #if 0 /* just to make Emacs auto-indent happy */
00037 }
00038 #endif
00039 
00040 class HistogramBlock;
00041 
00042 class HistogramFile : public FireVisionDataFile
00043 {
00044  public:
00045   HistogramFile();
00046   ~HistogramFile();
00047   
00048   void add_histogram_block(HistogramBlock* block);
00049 
00050   /** Convenience typdef for a STL list of pointers to histogram blocks. */
00051   typedef std::list<HistogramBlock*> HistogramBlockList;  
00052   HistogramBlockList histogram_blocks();
00053 
00054   uint32_t get_value(hint_t object_type, 
00055                      uint16_t x, uint16_t y, uint16_t z);
00056   
00057   void set_value(hint_t object_type, 
00058                  uint16_t x, uint16_t y, uint16_t z,
00059                  uint32_t val);
00060 
00061  private:
00062   std::map<hint_t, HistogramBlock*> attached_histograms;
00063 };
00064 
00065 
00066 } // end namespace firevision
00067 
00068 #endif /* __FIREVISION_FVUTILS_STATISTICAL_HISTOGRAM_FILE_H_ */
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends