Fawkes API  Fawkes Development Version
generator.h
1 
2 /**************************************************************************
3  * generator.h - interface for generating arbitrary colormaps
4  *
5  * Created: Wed Mar 01 13:51:39 2006
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_GENERATOR_H__
25 #define __FIREVISION_FVUTILS_COLORMAP_GENERATOR_H__
26 
27 #include <fvutils/base/roi.h>
28 #include <string>
29 #include <map>
30 
31 namespace firevision {
32 #if 0 /* just to make Emacs auto-indent happy */
33 }
34 #endif
35 
36 class YuvColormap;
37 class Histogram;
38 
40 {
41 
42  public:
43 
44  virtual ~ColormapGenerator();
45 
46  virtual void set_buffer(unsigned char *buffer,
47  unsigned int width, unsigned int height) = 0;
48  virtual YuvColormap * get_current() = 0;
49 
50  virtual void consider() = 0;
51  virtual void calc() = 0;
52  virtual void undo() = 0;
53  virtual void reset() = 0;
54  virtual void reset_undo() = 0;
55 
56  virtual bool has_histograms() = 0;
57  virtual std::map< hint_t, Histogram *> * get_histograms() = 0;
58 };
59 
60 } // end namespace firevision
61 
62 #endif
virtual void set_buffer(unsigned char *buffer, unsigned int width, unsigned int height)=0
Set image buffer.
virtual void calc()=0
Calculate LUT.
virtual void reset_undo()=0
Reset undo buffer.
virtual void reset()=0
Reset the generator.
virtual std::map< hint_t, Histogram * > * get_histograms()=0
Get histograms.
YUV Colormap.
Definition: yuvcm.h:39
virtual void consider()=0
Considers the given buffer and extracts the needed information.
virtual bool has_histograms()=0
Check if this generator has histograms.
virtual YuvColormap * get_current()=0
Get the current colormap.
virtual ~ColormapGenerator()
Virtual empty destructor.
Definition: generator.cpp:83
Interface for colormap generators.
Definition: generator.h:39
virtual void undo()=0
Undo last calls to consider().