LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::medianCut Class Reference

This class does color quantization with median-cut-algorithm (Heckbert, MIT 1980). More...

#include <ltiMedianCut.h>

Inheritance diagram for lti::medianCut:
Inheritance graph
[legend]
Collaboration diagram for lti::medianCut:
Collaboration graph
[legend]

List of all members.

Classes

class  parameters
 the parameters for the class medianCut More...

Public Member Functions

 medianCut ()
 medianCut (const medianCut &other)
virtual ~medianCut ()
virtual const char * getTypeName () const
bool apply (const image &src, channel8 &dest) const
bool apply (const image &src, channel8 &dest, palette &thePalette) const
bool apply (image &srcdest) const
bool apply (const image &src, image &dest) const
bool apply (const image &src, image &dest, palette &thePalette) const
medianCutcopy (const medianCut &other)
virtual functorclone () const
const parametersgetParameters () const

Detailed Description

This class does color quantization with median-cut-algorithm (Heckbert, MIT 1980).

Description of the algorithm: http://www-lehre.informatik.uni-osnabrueck.de/~cg/2000/skript/10_7_Erzeugung_einer.html


Constructor & Destructor Documentation

lti::medianCut::medianCut (  ) 

default constructor

lti::medianCut::medianCut ( const medianCut other  ) 

copy constructor

Parameters:
other the object to be copied
virtual lti::medianCut::~medianCut (  )  [virtual]

destructor


Member Function Documentation

bool lti::medianCut::apply ( const image src,
image dest,
palette thePalette 
) const

This apply method calculates a a quantized image and respective palette.

Parameters:
src image with the source data.
dest color quantized image
thePalette color palette used
bool lti::medianCut::apply ( const image src,
image dest 
) const [virtual]

This apply method calculates a quantized image (on copy).

Parameters:
src image with the source data.
dest image where the result will be left.
Returns:
true if successful, false otherwise

Reimplemented from lti::colorQuantization.

bool lti::medianCut::apply ( image srcdest  )  const [virtual]

This apply method calculates a quantized image (on place).

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

Reimplemented from lti::colorQuantization.

bool lti::medianCut::apply ( const image src,
channel8 dest,
palette thePalette 
) const [virtual]

This apply method calculates a channel8, containing the indices of the quantized colors AND the palette.

Will deliver empty channel8, if more than 256 colors!! But palette will be O.K.

Parameters:
src image with the source data.
dest channel8 where the result will be left.
thePalette palette appendant to dest.
Returns:
true if successful, false otherwise

Implements lti::colorQuantization.

bool lti::medianCut::apply ( const image src,
channel8 dest 
) const

This apply method calculates a channel8, containing the indices of the quantized colors.

Will deliver empty channel8, if more than 256 colors!!

Parameters:
src image with the source data.
dest channel8 where the result will be left.
Returns:
true if successful, false otherwise
virtual functor* lti::medianCut::clone (  )  const [virtual]

returns a pointer to a clone of this functor.

Implements lti::colorQuantization.

medianCut& lti::medianCut::copy ( const medianCut other  ) 

copy data of "other" functor.

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

Reimplemented from lti::colorQuantization.

const parameters& lti::medianCut::getParameters (  )  const

returns used parameters

Reimplemented from lti::colorQuantization.

virtual const char* lti::medianCut::getTypeName (  )  const [virtual]

returns the name of this type ("medianCut")

Reimplemented from lti::colorQuantization.


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

Generated on Sat Apr 10 15:27:34 2010 for LTI-Lib by Doxygen 1.6.1