generator.h

00001
00002 /**************************************************************************
00003  *  generator.h - interface for generating arbitrary colormaps
00004  *
00005  *  Created: Wed Mar 01 13:51:39 2006
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_GENERATOR_H__
00025 #define __FIREVISION_FVUTILS_COLORMAP_GENERATOR_H__
00026 
00027 #include <fvutils/base/roi.h>
00028 #include <string>
00029 #include <map>
00030
00031 class YuvColormap;
00032 class Histogram;
00033
00034 class ColormapGenerator
00035 {
00036
00037  public:
00038
00039   virtual ~ColormapGenerator();
00040
00041   virtual void           set_buffer(unsigned char *buffer,
00042                                     unsigned int width, unsigned int height) = 0;
00043   virtual YuvColormap *  get_current()                                       = 0;
00044
00045   virtual void           consider()                                          = 0;
00046   virtual void           calc()                                              = 0;
00047   virtual void           undo()                                              = 0;
00048   virtual void           reset()                                             = 0;
00049   virtual void           reset_undo()                                        = 0;
00050
00051   virtual bool           has_histograms()                                    = 0;
00052   virtual std::map< hint_t, Histogram *> *  get_histograms()                 = 0;
00053 };
00054
00055
00056 #endif