Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

SegmentedColorFilterBankEvent Class Reference

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

#include <SegmentedColorFilterBankEvent.h>

Inheritance diagram for SegmentedColorFilterBankEvent:

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 17 of file SegmentedColorFilterBankEvent.h.

List of all members.

Public Types

typedef CMVision::color_class_state color_class_state
 use CMVision's color structure
typedef CMVision::color_name_map color_name_map
 shorthand for CMVision's color name lookup data structure

Public Member Functions

 SegmentedColorFilterBankEvent (FilterBankGenerator *creator, EventBase::EventGeneratorID_t gid, size_t sid, EventBase::EventTypeID_t tid, FilterBankGenerator *segColorSrc, unsigned int nColors, color_class_state *colorInfos, const color_name_map *clrNames)
 constructor, to be used when first segmented, later stages should use the other constructor
 SegmentedColorFilterBankEvent (FilterBankGenerator *creator, EventBase::EventGeneratorID_t gid, size_t sid, EventBase::EventTypeID_t tid, const SegmentedColorFilterBankEvent &segevt)
 constructor, allows you to pass along color information to later stages
 SegmentedColorFilterBankEvent (const SegmentedColorFilterBankEvent &fbk)
 copy constructor (shallow copy -- the generator shouldn't be going anywhere)
const
SegmentedColorFilterBankEvent
operator= (const SegmentedColorFilterBankEvent &fbk)
 assignment operator (shallow copy -- the generator shouldn't be going anywhere)
virtual EventBaseclone () const
 allows a copy to be made of an event, supporting polymorphism
FilterBankGeneratorgetSegmentedColorSource () const
 Gives access to underlying generator.
unsigned int getNumColors () const
 returns the number of different colors available
const color_class_stategetColors () const
 gives direct access to the color information
const 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
unsigned int getColorIndex (const std::string &name) const
 returns index of color corresponding to a string
virtual classTypeID_t getClassTypeID () const
 All subclasses should override this and return a unique ID for their class.

Protected Member Functions

 SegmentedColorFilterBankEvent ()
 default constructor, only intended to be called from the FamilyFactory, followed by a loadXML...

Protected Attributes

FilterBankGeneratorsegsrc
 pointer to generator which did the segmentation and therefore holds the color information
unsigned int numColors
 number of available colors
const color_class_statecolors
 array of available colors
const color_name_mapcolorNames
 look up index from name

Static Protected Attributes

static const
EventBase::classTypeID_t 
autoRegisterSegmentedColorFilterBankEvent = getTypeRegistry().registerType<SegmentedColorFilterBankEvent>(makeClassTypeID("SFBK"))
 causes class type id to automatically be regsitered with EventBase's FamilyFactory (getTypeRegistry())

Friends

struct Factory0Arg< EventBase >::Factory< SegmentedColorFilterBankEvent >

Member Typedef Documentation

use CMVision's color structure

Definition at line 19 of file SegmentedColorFilterBankEvent.h.

shorthand for CMVision's color name lookup data structure

Definition at line 20 of file SegmentedColorFilterBankEvent.h.


Constructor & Destructor Documentation

SegmentedColorFilterBankEvent::SegmentedColorFilterBankEvent ( FilterBankGenerator creator,
EventBase::EventGeneratorID_t  gid,
size_t  sid,
EventBase::EventTypeID_t  tid,
FilterBankGenerator segColorSrc,
unsigned int  nColors,
color_class_state colorInfos,
const color_name_map clrNames 
)

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

Definition at line 23 of file SegmentedColorFilterBankEvent.h.

SegmentedColorFilterBankEvent::SegmentedColorFilterBankEvent ( FilterBankGenerator creator,
EventBase::EventGeneratorID_t  gid,
size_t  sid,
EventBase::EventTypeID_t  tid,
const SegmentedColorFilterBankEvent segevt 
)

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

Definition at line 28 of file SegmentedColorFilterBankEvent.h.

SegmentedColorFilterBankEvent::SegmentedColorFilterBankEvent ( const SegmentedColorFilterBankEvent fbk  ) 

copy constructor (shallow copy -- the generator shouldn't be going anywhere)

Definition at line 33 of file SegmentedColorFilterBankEvent.h.

SegmentedColorFilterBankEvent::SegmentedColorFilterBankEvent (  )  [protected]

default constructor, only intended to be called from the FamilyFactory, followed by a loadXML...

Definition at line 86 of file SegmentedColorFilterBankEvent.h.

Referenced by clone().


Member Function Documentation

virtual EventBase* SegmentedColorFilterBankEvent::clone (  )  const [virtual]

allows a copy to be made of an event, supporting polymorphism

Must be overridden by all subclasses to allow this to happen

I would like to switch this over to the cloneable interface once the compiler gets updated out of the 3.3 branch... see Cloneable::clone() for a discussion of the issue and implementation notes.

Reimplemented from FilterBankEvent.

Definition at line 46 of file SegmentedColorFilterBankEvent.h.

virtual classTypeID_t SegmentedColorFilterBankEvent::getClassTypeID (  )  const [virtual]

All subclasses should override this and return a unique ID for their class.

All IDs corresponding to all-capital letters are reserved for future framework expansion. (Thus, user subclasses should contain at least one lower-case letter.) This code can be used when serializing to allow quick identification of the class type by the receiver.

Reimplemented from FilterBankEvent.

Definition at line 72 of file SegmentedColorFilterBankEvent.h.

const color_class_state& SegmentedColorFilterBankEvent::getColor ( unsigned int  i  )  const

gives direct access to the color information

Definition at line 61 of file SegmentedColorFilterBankEvent.h.

unsigned int SegmentedColorFilterBankEvent::getColorIndex ( const std::string &  name  )  const

returns index of color corresponding to a string

Definition at line 70 of file SegmentedColorFilterBankEvent.h.

Referenced by getColorIndex().

unsigned int SegmentedColorFilterBankEvent::getColorIndex ( const char *  name  )  const

returns index of color corresponding to a string

Definition at line 64 of file SegmentedColorFilterBankEvent.h.

const color_class_state* SegmentedColorFilterBankEvent::getColors (  )  const

gives direct access to the color information

Definition at line 58 of file SegmentedColorFilterBankEvent.h.

Referenced by RegionGenerator::doEvent().

unsigned int SegmentedColorFilterBankEvent::getNumColors (  )  const

returns the number of different colors available

Definition at line 55 of file SegmentedColorFilterBankEvent.h.

Referenced by RegionGenerator::doEvent(), and BallDetectionGenerator::doEvent().

FilterBankGenerator* SegmentedColorFilterBankEvent::getSegmentedColorSource (  )  const

Gives access to underlying generator.

Definition at line 52 of file SegmentedColorFilterBankEvent.h.

const SegmentedColorFilterBankEvent& SegmentedColorFilterBankEvent::operator= ( const SegmentedColorFilterBankEvent fbk  ) 

assignment operator (shallow copy -- the generator shouldn't be going anywhere)

Definition at line 39 of file SegmentedColorFilterBankEvent.h.


Friends And Related Function Documentation

friend struct Factory0Arg< EventBase >::Factory< SegmentedColorFilterBankEvent > [friend]

Definition at line 87 of file SegmentedColorFilterBankEvent.h.


Member Data Documentation

const EventBase::classTypeID_t SegmentedColorFilterBankEvent::autoRegisterSegmentedColorFilterBankEvent = getTypeRegistry().registerType<SegmentedColorFilterBankEvent>(makeClassTypeID("SFBK")) [static, protected]

causes class type id to automatically be regsitered with EventBase's FamilyFactory (getTypeRegistry())

This is instantiated in EventBase.cc to save on file bloat

Definition at line 83 of file SegmentedColorFilterBankEvent.h.

Referenced by getClassTypeID().

look up index from name

Definition at line 79 of file SegmentedColorFilterBankEvent.h.

Referenced by getColorIndex(), and operator=().

array of available colors

Definition at line 78 of file SegmentedColorFilterBankEvent.h.

Referenced by getColor(), getColors(), and operator=().

unsigned int SegmentedColorFilterBankEvent::numColors [protected]

number of available colors

Definition at line 77 of file SegmentedColorFilterBankEvent.h.

Referenced by getNumColors(), and operator=().

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

Definition at line 76 of file SegmentedColorFilterBankEvent.h.

Referenced by getSegmentedColorSource(), and operator=().


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

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:15 2016 by Doxygen 1.6.3