#include <>>

Classes | |
| class | ColormapBlockVector |
| Vector of colormap blocks. More... | |
Public Member Functions | |
| ColormapFile () | |
| Constructor. | |
| ColormapFile (uint16_t depth, uint16_t width, uint16_t height) | |
| Constructor. | |
| void | add_colormap (Colormap *colormap) |
| Add colormap. | |
| ColormapBlockVector * | colormap_blocks () |
| Get colormap blocks. | |
| Colormap * | get_colormap () |
| Get a freshly generated colormap based on current file content. | |
| uint16_t | get_depth () |
| Get depth of colormap. | |
| uint16_t | get_width () |
| Get width of colormap. | |
| uint16_t | get_height () |
| Get height of colormap. | |
| virtual void | clear () |
| Clear internal storage. | |
Static Public Member Functions | |
| static bool | is_colormap_file (const char *filename) |
| Check if given file is a colormap file. | |
| static std::string | compose_filename (const std::string format) |
| Compose filename. | |
Colormap file.
This class implements a FireVision data file format for colormaps.
Definition at line 55 of file cmfile.h.
| firevision::ColormapFile::ColormapFile | ( | ) |
| firevision::ColormapFile::ColormapFile | ( | uint16_t | depth, | |
| uint16_t | width, | |||
| uint16_t | height | |||
| ) |
Constructor.
Creates a plain empty colormap file with given dimensions.
| depth | depth of colormap | |
| width | width of colormap | |
| height | height of colormap |
Definition at line 69 of file cmfile.cpp.
References firevision::FireVisionDataFile::_spec_header, firevision::FireVisionDataFile::_spec_header_size, firevision::cmfile_header_t::depth, firevision::cmfile_header_t::height, and firevision::cmfile_header_t::width.
| void firevision::ColormapFile::add_colormap | ( | Colormap * | colormap | ) |
Add colormap.
This will add the given colormap to this file. It will query the colormap for a number of blocks that shall be added to the file. Note that for now only a single colormap per file is supported, though not enforced.
| colormap | colormap to add |
Definition at line 98 of file cmfile.cpp.
References firevision::FireVisionDataFile::_spec_header, firevision::FireVisionDataFile::_spec_header_size, firevision::FireVisionDataFile::add_block(), firevision::FireVisionDataFile::blocks(), firevision::Colormap::depth(), firevision::cmfile_header_t::depth, firevision::Colormap::get_blocks(), firevision::Colormap::height(), firevision::cmfile_header_t::height, firevision::Colormap::width(), and firevision::cmfile_header_t::width.
Referenced by firevision::BayesHistosToLut::save(), and firevision::BayesHistosToLut::saveLut().
| void firevision::ColormapFile::clear | ( | ) | [virtual] |
Clear internal storage.
All internal data is deleted.
Reimplemented from firevision::FireVisionDataFile.
Definition at line 237 of file cmfile.cpp.
| ColormapFile::ColormapBlockVector * firevision::ColormapFile::colormap_blocks | ( | ) |
Get colormap blocks.
Definition at line 134 of file cmfile.cpp.
References firevision::FireVisionDataFile::blocks().
| std::string firevision::ColormapFile::compose_filename | ( | const std::string | format | ) | [static] |
Compose filename.
In the format g is replaced with the hostname.
| format | format for the filename |
Definition at line 219 of file cmfile.cpp.
| Colormap * firevision::ColormapFile::get_colormap | ( | ) |
Get a freshly generated colormap based on current file content.
This returns an instance of a colormap that uses all current blocks of this instance. Currently it only supports file which contain a valid YuvColormap. This means that it has d blocks of YUV type. d is the depth and must fulfill d=2^n with n from [1,8]. It can throw any exception that the YuvColormap ctor can throw.
Definition at line 169 of file cmfile.cpp.
References firevision::FireVisionDataFile::blocks(), firevision::YuvColormap::copy_uvplane(), firevision::cmfile_header_t::depth, firevision::cmfile_header_t::height, firevision::YuvColormap::plane_size(), and firevision::cmfile_header_t::width.
Referenced by firevision::ColorModelLookupTable::ColorModelLookupTable(), firevision::ColorModelLookupTable::load(), ColorTrainWidget::load_colormap(), firevision::YuvColormap::operator+=(), and FireVisionNetworkTool::set_colormap().
| uint16_t firevision::ColormapFile::get_depth | ( | ) |
Get depth of colormap.
Definition at line 248 of file cmfile.cpp.
References firevision::cmfile_header_t::depth.
| uint16_t firevision::ColormapFile::get_height | ( | ) |
Get height of colormap.
Definition at line 268 of file cmfile.cpp.
References firevision::cmfile_header_t::height.
| uint16_t firevision::ColormapFile::get_width | ( | ) |
Get width of colormap.
Definition at line 258 of file cmfile.cpp.
References firevision::cmfile_header_t::width.
| bool firevision::ColormapFile::is_colormap_file | ( | const char * | filename | ) | [static] |
Check if given file is a colormap file.
| filename | name of file to check |
Definition at line 207 of file cmfile.cpp.
References firevision::FireVisionDataFile::has_magic_token().
1.7.1