Fawkes API  Fawkes Development Version
colormap.h
1 
2 /**************************************************************************
3  * colormap.h - colormap interface
4  *
5  * Created: Sat Mar 29 12:45:29 2008
6  * Copyright 2005-2008 Tim Niemueller [www.niemueller.de]
7  *
8  ***************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 #ifndef _FIREVISION_FVUTILS_COLORMAP_COLORMAP_H_
25 #define _FIREVISION_FVUTILS_COLORMAP_COLORMAP_H_
26 
27 #include <fvutils/base/types.h>
28 #include <sys/types.h>
29 
30 #include <list>
31 
32 namespace firevision {
33 
34 class ColormapFileBlock;
35 
36 class Colormap
37 {
38 public:
39  virtual ~Colormap();
40 
41  virtual color_t determine(unsigned int y, unsigned int u, unsigned int v) const = 0;
42  virtual void set(unsigned int y, unsigned int u, unsigned int v, color_t c) = 0;
43 
44  virtual void reset() = 0;
45  virtual void set(unsigned char *buffer) = 0;
46 
47  virtual size_t size() = 0;
48  virtual void to_image(unsigned char *yuv422_planar_buffer, unsigned int level = 0);
49  virtual unsigned int image_height() const;
50  virtual unsigned int image_width() const;
51 
52  virtual unsigned char *get_buffer() const = 0;
53 
54  virtual Colormap &operator+=(const Colormap &cmlt) = 0;
55  virtual Colormap &operator+=(const char *filename) = 0;
56 
57  virtual unsigned int width() const = 0;
58  virtual unsigned int height() const = 0;
59  virtual unsigned int depth() const = 0;
60  virtual unsigned int deepness() const = 0;
61 
62  virtual std::list<ColormapFileBlock *> get_blocks() = 0;
63 };
64 
65 } // end namespace firevision
66 
67 #endif
firevision::Colormap::determine
virtual color_t determine(unsigned int y, unsigned int u, unsigned int v) const =0
firevision::Colormap::size
virtual size_t size()=0
firevision::Colormap::set
virtual void set(unsigned int y, unsigned int u, unsigned int v, color_t c)=0
firevision::Colormap::operator+=
virtual Colormap & operator+=(const Colormap &cmlt)=0
firevision::Colormap::height
virtual unsigned int height() const =0
firevision::Colormap::depth
virtual unsigned int depth() const =0
firevision::Colormap::get_blocks
virtual std::list< ColormapFileBlock * > get_blocks()=0
firevision::Colormap::to_image
virtual void to_image(unsigned char *yuv422_planar_buffer, unsigned int level=0)
Create image from LUT.
Definition: colormap.cpp:132
firevision::Colormap::deepness
virtual unsigned int deepness() const =0
firevision::Colormap::get_buffer
virtual unsigned char * get_buffer() const =0
firevision::Colormap::image_width
virtual unsigned int image_width() const
Width of conversion image.
Definition: colormap.cpp:179
firevision::Colormap::reset
virtual void reset()=0
firevision::Colormap
Definition: colormap.h:42
firevision::Colormap::image_height
virtual unsigned int image_height() const
Height of conversion image.
Definition: colormap.cpp:189
firevision::Colormap::~Colormap
virtual ~Colormap()
Virtual empty destructor.
Definition: colormap.cpp:114
firevision::Colormap::width
virtual unsigned int width() const =0