latest version v1.9 - last update 10 Apr 2010 |
Visualize a label mask in a color image. More...
#include <ltiLabelAdjacencyMap.h>
Classes | |
class | parameters |
the parameters for the class labelAdjacencyMap More... | |
Public Member Functions | |
labelAdjacencyMap () | |
labelAdjacencyMap (const parameters &par) | |
labelAdjacencyMap (const labelAdjacencyMap &other) | |
virtual | ~labelAdjacencyMap () |
virtual const char * | getTypeName () const |
bool | apply (const matrix< ubyte > &src, image &dest) const |
bool | apply (const matrix< int > &src, image &dest) const |
labelAdjacencyMap & | copy (const labelAdjacencyMap &other) |
labelAdjacencyMap & | operator= (const labelAdjacencyMap &other) |
virtual functor * | clone () const |
const parameters & | getParameters () const |
bool | adjacency (const matrix< ubyte > &mask, sparseMatrix< int > &dest) const |
bool | adjacency (const matrix< int > &mask, sparseMatrix< int > &dest) const |
bool | computeMinPalette (const sparseMatrix< int > &adj, palette &pal) const |
bool | computeMaxPalette (const sparseMatrix< int > &adj, palette &pal) const |
Visualize a label mask in a color image.
This class draws a color image using as input a labeled mask. The colors used for each label are chosen based on the adjacency, so that two neighbor labels never get the same color.
You can choose the kind of neighborhood used (4 or 8 neighborhood) and the number of colors you want to use.
lti::labelAdjacencyMap::labelAdjacencyMap | ( | ) |
default constructor
lti::labelAdjacencyMap::labelAdjacencyMap | ( | const parameters & | par | ) |
Construct a functor using the given parameters.
lti::labelAdjacencyMap::labelAdjacencyMap | ( | const labelAdjacencyMap & | other | ) |
copy constructor
other | the object to be copied |
virtual lti::labelAdjacencyMap::~labelAdjacencyMap | ( | ) | [virtual] |
destructor
bool lti::labelAdjacencyMap::adjacency | ( | const matrix< int > & | mask, | |
sparseMatrix< int > & | dest | |||
) | const |
compute the adjacency of the labels of a given label mask
bool lti::labelAdjacencyMap::adjacency | ( | const matrix< ubyte > & | mask, | |
sparseMatrix< int > & | dest | |||
) | const |
compute the adjacency of the labels of a given label mask
operates on a copy of the given parameters.
src | matrix<int> with the source data. | |
dest | image where the result will be left. |
virtual functor* lti::labelAdjacencyMap::clone | ( | ) | const [virtual] |
returns a pointer to a clone of this functor.
Implements lti::functor.
bool lti::labelAdjacencyMap::computeMaxPalette | ( | const sparseMatrix< int > & | adj, | |
palette & | pal | |||
) | const |
compute the palette required, using all colors in the parameters if possible
bool lti::labelAdjacencyMap::computeMinPalette | ( | const sparseMatrix< int > & | adj, | |
palette & | pal | |||
) | const |
compute the minimum palette required
labelAdjacencyMap& lti::labelAdjacencyMap::copy | ( | const labelAdjacencyMap & | other | ) |
copy data of "other" functor.
other | the functor to be copied |
Reimplemented from lti::functor.
const parameters& lti::labelAdjacencyMap::getParameters | ( | ) | const |
returns used parameters
Reimplemented from lti::functor.
virtual const char* lti::labelAdjacencyMap::getTypeName | ( | ) | const [virtual] |
returns the name of this type ("labelAdjacencyMap")
Reimplemented from lti::functor.
labelAdjacencyMap& lti::labelAdjacencyMap::operator= | ( | const labelAdjacencyMap & | other | ) |