24 #include <fvmodels/color/lookuptable.h> 26 #include <fvutils/color/yuv.h> 27 #include <fvutils/colormap/yuvcm.h> 28 #include <fvutils/colormap/cmfile.h> 29 #include <fvutils/ipc/shm_lut.h> 31 #include <core/exceptions/software.h> 32 #include <core/exceptions/system.h> 35 #include <sys/utsname.h> 38 #include <sys/types.h> 64 ColorModelLookupTable::ColorModelLookupTable(
YuvColormap *colormap)
66 __colormap = colormap;
73 ColorModelLookupTable::ColorModelLookupTable(
const char *lut_id,
bool destroy_on_free)
75 __colormap =
new YuvColormap(lut_id, destroy_on_free);
84 ColorModelLookupTable::ColorModelLookupTable(
unsigned int depth,
85 const char *lut_id,
bool destroy_on_free)
87 __colormap =
new YuvColormap(lut_id, destroy_on_free, depth);
96 ColorModelLookupTable::ColorModelLookupTable(
const char *file,
97 const char *lut_id,
bool destroy_on_free)
107 __colormap =
new YuvColormap(tycm, lut_id, destroy_on_free);
115 ColorModelLookupTable::ColorModelLookupTable(
const char *file)
121 if ( ! __colormap ) {
129 ColorModelLookupTable::~ColorModelLookupTable()
135 ColorModelLookupTable::determine(
unsigned int y,
unsigned int u,
unsigned int v)
const 137 return __colormap->determine(y, u, v);
141 ColorModelLookupTable::get_name()
143 return "ColorModelLookupTable";
150 ColorModelLookupTable::get_colormap()
const 171 ColorModelLookupTable::load(
const char *filename)
194 *__colormap += *(cmlt.__colormap);
201 ColorModelLookupTable::reset()
212 ColorModelLookupTable::compose_filename(
const std::string format)
214 return ColormapFile::compose_filename(format);
Fawkes library namespace.
void reset()
Reset colormap.
Color model based on a lookup table.
Colormap * get_colormap()
Get a freshly generated colormap based on current file content.
virtual void read(const char *file_name)
Read file.