24#ifndef _FIREVISIONE_FVUTILS_STATISTICAL_HISTOGRAM_BLOCK_H_
25#define _FIREVISIONE_FVUTILS_STATISTICAL_HISTOGRAM_BLOCK_H_
27#include <fvutils/base/roi.h>
28#include <fvutils/fileformat/fvfile_block.h>
44typedef enum _histogram_block_type_t {
45 FIREVISION_HISTOGRAM_TYPE_16 = 0,
46 FIREVISION_HISTOGRAM_TYPE_32 = 1
47} histogram_block_type_t;
61 uint16_t
width()
const;
63 uint16_t
depth()
const;
70 void set_value(uint16_t x, uint16_t y, uint32_t val);
71 void set_value(uint16_t x, uint16_t y, uint16_t z, uint32_t val);
73 uint32_t
get_value(uint16_t x, uint16_t y);
74 uint32_t
get_value(uint16_t x, uint16_t y, uint16_t z);
80 uint32_t * _histogram_data;
FireVision File Format data block.
unsigned int type() const
Get block type.
This class defines a file block for histograms.
uint16_t height() const
Returns the the height of the histogram.
hint_t object_type() const
Returns the type of the object the histogram is associated with.
void set_data(uint32_t *data)
Directly set the histogram data.
uint32_t get_value(uint16_t x, uint16_t y)
Obtain a certain value from a 2-dimensional histogram.
uint16_t depth() const
Returns the the depth of the histogram.
HistogramBlock(histogram_block_type_t type, hint_t object_type, uint16_t width, uint16_t height, uint16_t depth=0)
Constructor.
uint16_t width() const
Returns the the width of the histogram.
void set_value(uint16_t x, uint16_t y, uint32_t val)
Store a value in a certain cell of a 2-dimensional histogram.
void reset()
Reset the histogram.
virtual ~HistogramBlock()
Destructor.
void set_object_type(hint_t object_type)
Set the type of the object the histogram is associated with.