Fawkes API
Fawkes Development Version
|
00001 00002 /************************************************************************** 00003 * colormap.h - colormap interface 00004 * 00005 * Created: Sat Mar 29 12:45:29 2008 00006 * Copyright 2005-2008 Tim Niemueller [www.niemueller.de] 00007 * 00008 ***************************************************************************/ 00009 00010 /* This program is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. A runtime exception applies to 00014 * this software (see LICENSE.GPL_WRE file mentioned below for details). 00015 * 00016 * This program is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Library General Public License for more details. 00020 * 00021 * Read the full text in the LICENSE.GPL_WRE file in the doc directory. 00022 */ 00023 00024 #ifndef __FIREVISION_FVUTILS_COLORMAP_COLORMAP_H_ 00025 #define __FIREVISION_FVUTILS_COLORMAP_COLORMAP_H_ 00026 00027 #include <fvutils/base/types.h> 00028 #include <sys/types.h> 00029 #include <list> 00030 00031 namespace firevision { 00032 #if 0 /* just to make Emacs auto-indent happy */ 00033 } 00034 #endif 00035 00036 class ColormapFileBlock; 00037 00038 class Colormap 00039 { 00040 public: 00041 virtual ~Colormap(); 00042 00043 virtual color_t determine(unsigned int y, unsigned int u, unsigned int v) const = 0; 00044 virtual void set(unsigned int y, unsigned int u, unsigned int v, color_t c) = 0; 00045 00046 virtual void reset() = 0; 00047 virtual void set(unsigned char *buffer) = 0; 00048 00049 virtual size_t size() = 0; 00050 virtual void to_image(unsigned char *yuv422_planar_buffer, 00051 unsigned int level = 0); 00052 virtual unsigned int image_height() const; 00053 virtual unsigned int image_width() const; 00054 00055 virtual unsigned char * get_buffer() const = 0; 00056 00057 virtual Colormap & operator+=(const Colormap & cmlt) = 0; 00058 virtual Colormap & operator+=(const char *filename) = 0; 00059 00060 virtual unsigned int width() const = 0; 00061 virtual unsigned int height() const = 0; 00062 virtual unsigned int depth() const = 0; 00063 virtual unsigned int deepness() const = 0; 00064 00065 virtual std::list<ColormapFileBlock *> get_blocks() = 0; 00066 }; 00067 00068 } // end namespace firevision 00069 00070 #endif