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

lti::labelAdjacencyMap Class Reference
[Visualization Tools]

Visualize a label mask in a color image. More...

#include <ltiLabelAdjacencyMap.h>

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

List of all members.

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
labelAdjacencyMapcopy (const labelAdjacencyMap &other)
labelAdjacencyMapoperator= (const labelAdjacencyMap &other)
virtual functorclone () const
const parametersgetParameters () 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

Detailed Description

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.


Constructor & Destructor Documentation

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

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

destructor


Member Function Documentation

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

bool lti::labelAdjacencyMap::apply ( const matrix< int > &  src,
image dest 
) const

operates on a copy of the given parameters.

Parameters:
src matrix<int> with the source data.
dest image where the result will be left.
Returns:
true if apply successful or false otherwise.
bool lti::labelAdjacencyMap::apply ( const matrix< ubyte > &  src,
image dest 
) const

operates on a copy of the given parameters.

Parameters:
src channel8 with the source data.
dest image where the result will be left.
Returns:
true if apply successful or false otherwise.
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.

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

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  ) 

alias for copy member

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

Reimplemented from lti::functor.


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

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