|
Fawkes API
Fawkes Development Version
|
This class defines a file block for histograms. More...
#include <>>

Public Member Functions | |
| HistogramBlock (histogram_block_type_t type, hint_t object_type, uint16_t width, uint16_t height, uint16_t depth=0) | |
| Constructor. | |
| HistogramBlock (FireVisionDataFileBlock *block) | |
| Copy constructor. | |
| virtual | ~HistogramBlock () |
| Destructor. | |
| uint16_t | width () const |
| Returns the the width of the histogram. | |
| uint16_t | height () const |
| Returns the the height of the histogram. | |
| uint16_t | depth () const |
| Returns the the depth of the histogram. | |
| hint_t | object_type () const |
| Returns the type of the object the histogram is associated with. | |
| void | set_object_type (hint_t object_type) |
| Set the type of the object the histogram is associated with. | |
| void | set_data (uint32_t *data) |
| Directly set the histogram data. | |
| 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 | set_value (uint16_t x, uint16_t y, uint16_t z, uint32_t val) |
| Store a value in a certain cell of a 3-dimensional histogram. | |
| uint32_t | get_value (uint16_t x, uint16_t y) |
| Obtain a certain value from a 2-dimensional histogram. | |
| uint32_t | get_value (uint16_t x, uint16_t y, uint16_t z) |
| Obtain a certain value from a 3-dimensional histogram. | |
| void | reset () |
| Reset the histogram. | |
Public Member Functions inherited from firevision::FireVisionDataFileBlock | |
| FireVisionDataFileBlock (unsigned int type, size_t data_size, void *spec_header, size_t spec_header_size) | |
| Constructor. | |
| FireVisionDataFileBlock (unsigned int type, size_t data_size, size_t spec_header_size) | |
| Constructor. | |
| FireVisionDataFileBlock (unsigned int type, size_t data_size) | |
| Constructor. | |
| FireVisionDataFileBlock (FireVisionDataFileBlock *block) | |
| Shallow copy constructor. | |
| virtual | ~FireVisionDataFileBlock () |
| Destructor. | |
| unsigned int | type () const |
| Get block type. | |
| void * | block_memptr () const |
| Pointer to the whole block. | |
| size_t | block_size () const |
| Size of blocks. | |
| void * | data_ptr () const |
| Get data pointer. | |
| size_t | data_size () const |
| Size of data chunk. | |
Additional Inherited Members | |
Protected Member Functions inherited from firevision::FireVisionDataFileBlock | |
| void | set_spec_header (void *spec_header, size_t spec_header_size) |
| Set content-specific header. | |
Protected Attributes inherited from firevision::FireVisionDataFileBlock | |
| void * | _data |
| Pointer to the internal data segment. | |
| size_t | _data_size |
| Size of _data in bytes. | |
| void * | _spec_header |
| Pointer to the content specific block header. | |
This class defines a file block for histograms.
Additionally, the very basic routines to acccess and manipulate data in the histograms are provided.
Definition at line 55 of file histogram_block.h.
| firevision::HistogramBlock::HistogramBlock | ( | histogram_block_type_t | type, |
| hint_t | object_type, | ||
| uint16_t | width, | ||
| uint16_t | height, | ||
| uint16_t | depth = 0 |
||
| ) |
Constructor.
| type | the type of the histogram block |
| object_type | the object type this histogram is meant for (e.g, ball) |
| width | the width of the histogram |
| height | the height of the histogram |
| depth | the depth of the histogram |
Definition at line 49 of file histogram_block.cpp.
References firevision::FireVisionDataFileBlock::_data, firevision::FireVisionDataFileBlock::_spec_header, firevision::_histogram_block_header_t::depth, depth(), firevision::_histogram_block_header_t::height, height(), firevision::_histogram_block_header_t::object_type, object_type(), firevision::_histogram_block_header_t::width, and width().
| firevision::HistogramBlock::HistogramBlock | ( | FireVisionDataFileBlock * | block | ) |
Copy constructor.
| block | another block |
Definition at line 66 of file histogram_block.cpp.
References firevision::FireVisionDataFileBlock::_data, and firevision::FireVisionDataFileBlock::_spec_header.
|
virtual |
Destructor.
Definition at line 74 of file histogram_block.cpp.
| uint16_t firevision::HistogramBlock::depth | ( | ) | const |
Returns the the depth of the histogram.
Definition at line 100 of file histogram_block.cpp.
References firevision::_histogram_block_header_t::depth.
Referenced by firevision::Histogram::Histogram(), HistogramBlock(), and firevision::BayesColormapGenerator::load_histograms().
| uint32_t firevision::HistogramBlock::get_value | ( | uint16_t | x, |
| uint16_t | y | ||
| ) |
Obtain a certain value from a 2-dimensional histogram.
| x | the x-coordinate |
| y | the y-coordinate |
Definition at line 195 of file histogram_block.cpp.
References firevision::_histogram_block_header_t::depth, firevision::_histogram_block_header_t::height, and firevision::_histogram_block_header_t::width.
Referenced by firevision::Histogram::get_value().
| uint32_t firevision::HistogramBlock::get_value | ( | uint16_t | x, |
| uint16_t | y, | ||
| uint16_t | z | ||
| ) |
Obtain a certain value from a 3-dimensional histogram.
| x | the x-coordinate |
| y | the y-coordinate |
| z | the z-coordinate |
Definition at line 222 of file histogram_block.cpp.
References firevision::_histogram_block_header_t::depth, firevision::_histogram_block_header_t::height, and firevision::_histogram_block_header_t::width.
| uint16_t firevision::HistogramBlock::height | ( | ) | const |
Returns the the height of the histogram.
Definition at line 91 of file histogram_block.cpp.
References firevision::_histogram_block_header_t::height.
Referenced by firevision::Histogram::Histogram(), HistogramBlock(), and firevision::BayesColormapGenerator::load_histograms().
| hint_t firevision::HistogramBlock::object_type | ( | ) | const |
Returns the type of the object the histogram is associated with.
Definition at line 109 of file histogram_block.cpp.
References firevision::_histogram_block_header_t::object_type.
Referenced by firevision::HistogramFile::add_histogram_block(), HistogramBlock(), and set_object_type().
| void firevision::HistogramBlock::reset | ( | void | ) |
Reset the histogram.
Definition at line 247 of file histogram_block.cpp.
References firevision::FireVisionDataFileBlock::_data_size.
| void firevision::HistogramBlock::set_data | ( | uint32_t * | data | ) |
Directly set the histogram data.
Note: You are reponsible that the data has the right size and format!
| data | pointer to the histogram data |
Definition at line 128 of file histogram_block.cpp.
References firevision::FireVisionDataFileBlock::_data, and firevision::FireVisionDataFileBlock::_data_size.
| void firevision::HistogramBlock::set_object_type | ( | hint_t | object_type | ) |
Set the type of the object the histogram is associated with.
| object_type | the new type of the object |
Definition at line 118 of file histogram_block.cpp.
References firevision::_histogram_block_header_t::object_type, and object_type().
Referenced by firevision::BayesColormapGenerator::save_histograms().
| void firevision::HistogramBlock::set_value | ( | uint16_t | x, |
| uint16_t | y, | ||
| uint32_t | val | ||
| ) |
Store a value in a certain cell of a 2-dimensional histogram.
| x | the x-coordinate |
| y | the y-coordinate |
| val | the new value |
Definition at line 139 of file histogram_block.cpp.
References firevision::_histogram_block_header_t::depth, firevision::_histogram_block_header_t::height, and firevision::_histogram_block_header_t::width.
| void firevision::HistogramBlock::set_value | ( | uint16_t | x, |
| uint16_t | y, | ||
| uint16_t | z, | ||
| uint32_t | val | ||
| ) |
Store a value in a certain cell of a 3-dimensional histogram.
| x | the x-coordinate |
| y | the y-coordinate |
| z | the z-coordinate |
| val | the new value |
Definition at line 166 of file histogram_block.cpp.
References firevision::_histogram_block_header_t::depth, firevision::_histogram_block_header_t::height, and firevision::_histogram_block_header_t::width.
| uint16_t firevision::HistogramBlock::width | ( | ) | const |
Returns the the width of the histogram.
Definition at line 82 of file histogram_block.cpp.
References firevision::_histogram_block_header_t::width.
Referenced by firevision::Histogram::Histogram(), HistogramBlock(), and firevision::BayesColormapGenerator::load_histograms().