CVR-Lib last update 20 Sep 2009

cvr::colorQuantization Class Reference
[Color Quantization]

Abstract parent class for all color quantization algorithms. More...

#include <cvrColorQuantization.h>

Inheritance diagram for cvr::colorQuantization:

Inheritance graph
[legend]
Collaboration diagram for cvr::colorQuantization:

Collaboration graph
[legend]

List of all members.

Classes

class  parameters
 The parameters for the class colorQuantization. More...

Public Member Functions

 colorQuantization ()
 colorQuantization (const colorQuantization &other)
virtual ~colorQuantization ()
virtual const std::string & name () const
colorQuantizationcopy (const colorQuantization &other)
virtual colorQuantizationclone () const =0
virtual colorQuantizationnewInstance () const =0
const parametersgetParameters () const
virtual bool apply (const image &src, matrix< ubyte > &dest, palette &thePalette) const =0
virtual bool apply (const image &src, matrix< int32 > &dest, palette &thePalette) const =0
virtual bool apply (image &srcdest) const
virtual bool apply (const image &src, image &dest) const


Detailed Description

Abstract parent class for all color quantization algorithms.

All color quantization functors must overload the apply-methods defined here (see colorQuantization::apply())

The final quantized color image can be generated using the cvr::usePalette functor.


Constructor & Destructor Documentation

cvr::colorQuantization::colorQuantization (  ) 

Default constructor.

cvr::colorQuantization::colorQuantization ( const colorQuantization other  ) 

Copy constructor.

Parameters:
other the object to be copied

virtual cvr::colorQuantization::~colorQuantization (  )  [virtual]

Destructor.


Member Function Documentation

virtual bool cvr::colorQuantization::apply ( const image src,
image dest 
) const [virtual]

Quantize the colors of the given src image and leave the result in dest.

Parameters:
src image with the source data.
dest image with only the number of colors specified in the parameters
Returns:
true if apply successful or false otherwise.

Reimplemented in cvr::kMColorQuantization.

virtual bool cvr::colorQuantization::apply ( image srcdest  )  const [virtual]

Quantize the colors of the given image.

Parameters:
srcdest image with the source data. The result will be left here too.
Returns:
true if apply successful or false otherwise.

Reimplemented in cvr::kMColorQuantization.

virtual bool cvr::colorQuantization::apply ( const image src,
matrix< int32 > &  dest,
palette thePalette 
) const [pure virtual]

Quantize the colors of src and leave the labels for the quantized colors in dest, and in the palette entries corresponding to the labels the mean colors for each label.

Parameters:
src original image with the true-color data
dest channel8 where the indexes of the also calculated palette will be.
thePalette the color palette used by the channel.
Returns:
true if apply successful or false otherwise.

virtual bool cvr::colorQuantization::apply ( const image src,
matrix< ubyte > &  dest,
palette thePalette 
) const [pure virtual]

Quantize the colors of src and leave the labels for the quantized colors in dest, and in the palette entries corresponding to the labels the mean colors for each label.

Parameters:
src original image with the true-color data
dest channel8 where the indexes of the also calculated palette will be.
thePalette the color palette used by the channel.
Returns:
true if apply successful or false otherwise.

Implemented in cvr::kMColorQuantization.

virtual colorQuantization* cvr::colorQuantization::clone (  )  const [pure virtual]

Returns a pointer to a clone of this functor.

Implements cvr::functor.

Implemented in cvr::kMColorQuantization.

colorQuantization& cvr::colorQuantization::copy ( const colorQuantization other  ) 

Copy data of "other" functor.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

const parameters& cvr::colorQuantization::getParameters (  )  const

Returns used parameters.

Reimplemented from cvr::parametersManager.

Reimplemented in cvr::kMColorQuantization.

virtual const std::string& cvr::colorQuantization::name (  )  const [virtual]

Returns the name of this type.

Implements cvr::functor.

Reimplemented in cvr::kMColorQuantization.

virtual colorQuantization* cvr::colorQuantization::newInstance (  )  const [pure virtual]

Returns a pointer to a clone of this functor.

Implements cvr::functor.

Implemented in cvr::kMColorQuantization.


The documentation for this class was generated from the following file:

Generated on Sun Sep 20 22:08:44 2009 for CVR-Lib by Doxygen 1.5.8