Homepage Demos Overview Downloads Tutorials Reference
Credits

SegmentedColorFilterBankEvent Class Reference

#include <SegmentedColorFilterBankEvent.h>

Inheritance diagram for SegmentedColorFilterBankEvent:

Inheritance graph
[legend]
List of all members.

Detailed Description

This event provides some additional color information over its superclass for image banks made up of indexed colors.

The color information is stored using the CMVision library's data structures

Don't bother trying to access the region information which is also held in the color_class_state structures. The RegionGenerator, doesn't fill in the global color information because each layer and channel is going to need its own region processing, so a single global structure only makes sense for the colors.

Definition at line 18 of file SegmentedColorFilterBankEvent.h.

Public Types

typedef CMVision::color_class_state color_class_state
 use CMVision's color structure

typedef __gnu_cxx::hash_map<
const char *, unsigned int,
__gnu_cxx::hash< const char * >,
hashcmp_eqstr > 
hashmap
 a shorthand for the hash structure that CMVision expects for the color lookups


Public Member Functions

 SegmentedColorFilterBankEvent (FilterBankGenerator *creator, EventBase::EventGeneratorID_t gid, unsigned int sid, FilterBankGenerator *segColorSrc, unsigned int nColors, color_class_state *colorInfos, const hashmap *clrNames)
 constructor, to be used when first segmented, later stages should use the other constructor

 SegmentedColorFilterBankEvent (FilterBankGenerator *creator, EventBase::EventGeneratorID_t gid, unsigned int sid, const SegmentedColorFilterBankEvent &segevt)
 constructor, allows you to pass along color information to later stages

FilterBankGeneratorgetSegmentedColorSource () const
 Gives access to underlying generator.

unsigned int getNumColors () const
 returns the number of different colors available

color_class_stategetColors () const
 gives direct access to the color information

color_class_stategetColor (unsigned int i) const
 gives direct access to the color information

unsigned int getColorIndex (const char *name) const
 returns index of color corresponding to a string (uses a fast hash lookup)

unsigned int getColorIndex (const std::string &name) const
 returns index of color corresponding to a string (uses a fast hash lookup)


Protected Attributes

FilterBankGeneratorsegsrc
 pointer to generator which did the segmentation and therefore holds the color information

const unsigned int numColors
 number of available colors

color_class_state *const  colors
 array of available colors

const hashmap *const  colorNames
 hash map to look up index from name


Private Member Functions

 SegmentedColorFilterBankEvent (const SegmentedColorFilterBankEvent &fbk)
 don't call

const SegmentedColorFilterBankEventoperator= (const SegmentedColorFilterBankEvent &fbk)
 don't call


Member Typedef Documentation

typedef CMVision::color_class_state SegmentedColorFilterBankEvent::color_class_state
 

use CMVision's color structure

Definition at line 20 of file SegmentedColorFilterBankEvent.h.

Referenced by getColor(), getColors(), and SegmentedColorFilterBankEvent().

typedef __gnu_cxx::hash_map<const char*, unsigned int, __gnu_cxx::hash<const char*>, hashcmp_eqstr> SegmentedColorFilterBankEvent::hashmap
 

a shorthand for the hash structure that CMVision expects for the color lookups

Definition at line 21 of file SegmentedColorFilterBankEvent.h.

Referenced by SegmentedColorFilterBankEvent().


Constructor & Destructor Documentation

SegmentedColorFilterBankEvent::SegmentedColorFilterBankEvent FilterBankGenerator creator,
EventBase::EventGeneratorID_t  gid,
unsigned int  sid,
FilterBankGenerator segColorSrc,
unsigned int  nColors,
color_class_state colorInfos,
const hashmap clrNames
[inline]
 

constructor, to be used when first segmented, later stages should use the other constructor

Definition at line 24 of file SegmentedColorFilterBankEvent.h.

SegmentedColorFilterBankEvent::SegmentedColorFilterBankEvent FilterBankGenerator creator,
EventBase::EventGeneratorID_t  gid,
unsigned int  sid,
const SegmentedColorFilterBankEvent segevt
[inline]
 

constructor, allows you to pass along color information to later stages

Definition at line 29 of file SegmentedColorFilterBankEvent.h.

SegmentedColorFilterBankEvent::SegmentedColorFilterBankEvent const SegmentedColorFilterBankEvent fbk  )  [private]
 

don't call


Member Function Documentation

color_class_state& SegmentedColorFilterBankEvent::getColor unsigned int  i  )  const [inline]
 

gives direct access to the color information

Definition at line 43 of file SegmentedColorFilterBankEvent.h.

unsigned int SegmentedColorFilterBankEvent::getColorIndex const std::string &  name  )  const [inline]
 

returns index of color corresponding to a string (uses a fast hash lookup)

Definition at line 53 of file SegmentedColorFilterBankEvent.h.

unsigned int SegmentedColorFilterBankEvent::getColorIndex const char *  name  )  const [inline]
 

returns index of color corresponding to a string (uses a fast hash lookup)

Definition at line 46 of file SegmentedColorFilterBankEvent.h.

Referenced by getColorIndex().

color_class_state* SegmentedColorFilterBankEvent::getColors  )  const [inline]
 

gives direct access to the color information

Definition at line 40 of file SegmentedColorFilterBankEvent.h.

Referenced by RegionGenerator::processEvent().

unsigned int SegmentedColorFilterBankEvent::getNumColors  )  const [inline]
 

returns the number of different colors available

Definition at line 37 of file SegmentedColorFilterBankEvent.h.

Referenced by RegionGenerator::processEvent().

FilterBankGenerator* SegmentedColorFilterBankEvent::getSegmentedColorSource  )  const [inline]
 

Gives access to underlying generator.

Definition at line 34 of file SegmentedColorFilterBankEvent.h.

const SegmentedColorFilterBankEvent& SegmentedColorFilterBankEvent::operator= const SegmentedColorFilterBankEvent fbk  )  [private]
 

don't call


Member Data Documentation

const hashmap* const SegmentedColorFilterBankEvent::colorNames [protected]
 

hash map to look up index from name

Definition at line 60 of file SegmentedColorFilterBankEvent.h.

Referenced by getColorIndex(), and SegmentedColorFilterBankEvent().

color_class_state* const SegmentedColorFilterBankEvent::colors [protected]
 

array of available colors

Definition at line 59 of file SegmentedColorFilterBankEvent.h.

Referenced by getColor(), getColors(), and SegmentedColorFilterBankEvent().

const unsigned int SegmentedColorFilterBankEvent::numColors [protected]
 

number of available colors

Definition at line 58 of file SegmentedColorFilterBankEvent.h.

Referenced by getNumColors(), and SegmentedColorFilterBankEvent().

FilterBankGenerator* SegmentedColorFilterBankEvent::segsrc [protected]
 

pointer to generator which did the segmentation and therefore holds the color information

Definition at line 57 of file SegmentedColorFilterBankEvent.h.

Referenced by getSegmentedColorSource(), and SegmentedColorFilterBankEvent().


The documentation for this class was generated from the following file:
Tekkotsu v2.0
Generated Wed Jan 21 03:23:25 2004 by Doxygen 1.3.4