latest version v1.9 - last update 10 Apr 2010 |
the parameters for the class usePalette More...
#include <ltiUsePalette.h>
Public Member Functions | |
parameters () | |
parameters (const parameters &other) | |
~parameters () | |
const char * | getTypeName () const |
parameters & | copy (const parameters &other) |
parameters & | operator= (const parameters &other) |
virtual functor::parameters * | clone () const |
virtual bool | write (ioHandler &handler, const bool complete=true) const |
virtual bool | read (ioHandler &handler, const bool complete=true) |
Public Attributes | |
palette | colors |
bool | linearSearch |
bool | kdTreeOnDemand |
int | bucketSize |
the parameters for the class usePalette
lti::usePalette::parameters::parameters | ( | ) |
default constructor
Reimplemented from lti::functor::parameters.
lti::usePalette::parameters::parameters | ( | const parameters & | other | ) |
copy constructor
other | the parameters object to be copied |
lti::usePalette::parameters::~parameters | ( | ) | [virtual] |
destructor
Reimplemented from lti::functor::parameters.
virtual functor::parameters* lti::usePalette::parameters::clone | ( | ) | const [virtual] |
returns a pointer to a clone of the parameters
Implements lti::functor::parameters.
parameters& lti::usePalette::parameters::copy | ( | const parameters & | other | ) |
copy the contents of a parameters object
other | the parameters object to be copied |
const char* lti::usePalette::parameters::getTypeName | ( | ) | const [virtual] |
returns name of this type
Reimplemented from lti::functor::parameters.
parameters& lti::usePalette::parameters::operator= | ( | const parameters & | other | ) |
copy the contents of a parameters object
other | the parameters object to be copied |
virtual bool lti::usePalette::parameters::read | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | [virtual] |
write the parameters in the given ioHandler
handler | the ioHandler to be used | |
complete | if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written. |
Reimplemented from lti::functor::parameters.
virtual bool lti::usePalette::parameters::write | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | const [virtual] |
write the parameters in the given ioHandler
handler | the ioHandler to be used | |
complete | if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written. |
Reimplemented from lti::functor::parameters.
Each leaf node of the k-d Tree can contain a number of palette entries greater than one.
A linear search method takes place on sets of maximal this size.
Default value: 16
For those apply methods that get directly a palette or k-d Tree, this parameter will be ignored.
For all other methods that use the color entries in the colors
attribute this parameter determines when to compute the k-d Tree (only if linearSearch is set to false):
If you want to apply the same palette to many different images, set this parameter to false in order to force the computation of the k-d Tree off-line.
Default value: false
To efficiently get the best entry in a palette, other techniques besides the "brute force" linear search exist.
This functor can also use k-d trees.
This makes only sense if the same palette is going to be used with different images, or if the images are big enough to compensate the overhead of generating the k-d tree, task which only depends on the size of the color palette.
If this attribute is set to true, the linear search will be used, avoiding the computation of the k-d Tree.
If set to false, a k-d Tree will be computed from the colors
attribute at a time determined by the attribute kdTreeOnDemand
.
Default value: false (i.e. use k-d trees)