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

lti::locationSelector Class Reference

This functor adjust the given list of locations by a given mask. More...

#include <ltiLocationSelector.h>

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

List of all members.

Classes

class  parameters
 the parameters for the class locationSelector More...

Public Member Functions

 locationSelector ()
 locationSelector (const locationSelector &other)
virtual ~locationSelector ()
virtual const char * getTypeName () const
bool apply (const channel8 &mask, std::list< location > &locs) const
bool apply (const matrix< int > &mask, const std::list< location > &locs, std::vector< std::list< location > > &filteredLocs) const
bool apply (const std::list< areaPoints > &objs, const std::list< location > &locs, std::vector< std::list< location > > &filteredLocs) const
locationSelectorcopy (const locationSelector &other)
locationSelectoroperator= (const locationSelector &other)
virtual functorclone () const
const parametersgetParameters () const

Detailed Description

This functor adjust the given list of locations by a given mask.

There are two modes for this functor. The first one will remove all locations of a given list, that are marked to be removed in a mask.

The second mode will separate a list of locations into a set of smaller lists, so that all locations in each sublist have the same label. This way, sublists of locations per object can be generated.


Constructor & Destructor Documentation

lti::locationSelector::locationSelector (  ) 

default constructor

lti::locationSelector::locationSelector ( const locationSelector other  ) 

copy constructor

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

destructor


Member Function Documentation

bool lti::locationSelector::apply ( const std::list< areaPoints > &  objs,
const std::list< location > &  locs,
std::vector< std::list< location > > &  filteredLocs 
) const

Separate the locations list "locs" into several smaller locations lists, each one having locations for one object in the list of areaPoints.

Parameters:
objs the list of objects. Each object is represented by an areaPoints object.
locs the complete location list.
filteredLocs a list, with a number of elements equal the number of objects in objs plus one, containing list of locations, one for each object. The first element of the vector will contain all locations assigned to the "background", ie. all locations that do not correspond to any object in the objs list.
Returns:
true if apply successful or false otherwise.
bool lti::locationSelector::apply ( const matrix< int > &  mask,
const std::list< location > &  locs,
std::vector< std::list< location > > &  filteredLocs 
) const

Separate the locations list "locs" into several smaller location lists, each one having locations for one corresponding label in the labeled mask.

Parameters:
mask the label mask to select locations.
locs the complete location list.
filteredLocs a vector, indexed by the label number in the mask, containing list of locations.
Returns:
true if apply successful or false otherwise.
bool lti::locationSelector::apply ( const channel8 mask,
std::list< location > &  locs 
) const

Remove all locations from the given list, for which the corresponding entry in the mask have the value getParameters().eraseEntry.

Parameters:
mask the decision-mask for the locations
locs location list. If for a location loc in the list holds mask.at(loc.position) == getParameters().eraseEntry, then the location will be removed from the list.
Returns:
true if apply successful or false otherwise.
virtual functor* lti::locationSelector::clone (  )  const [virtual]

returns a pointer to a clone of this functor.

Implements lti::functor.

locationSelector& lti::locationSelector::copy ( const locationSelector 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::locationSelector::getParameters (  )  const

returns used parameters

Reimplemented from lti::functor.

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

returns the name of this type ("locationSelector")

Reimplemented from lti::functor.

locationSelector& lti::locationSelector::operator= ( const locationSelector 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:32 2010 for LTI-Lib by Doxygen 1.6.1