SegmentedColorFilterBankEvent Class Reference#include <SegmentedColorFilterBankEvent.h>
Inheritance diagram for SegmentedColorFilterBankEvent:
[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, EventBase::EventTypeID_t tid, 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, 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 EventBase * | clone () const |
| allows a copy to be made of an event, supporting polymorphism
|
FilterBankGenerator * | getSegmentedColorSource () const |
| Gives access to underlying generator.
|
unsigned int | getNumColors () const |
| returns the number of different colors available
|
const color_class_state * | getColors () const |
| gives direct access to the color information
|
const color_class_state & | getColor (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 |
FilterBankGenerator * | segsrc |
| pointer to generator which did the segmentation and therefore holds the color information
|
unsigned int | numColors |
| number of available colors
|
const color_class_state * | colors |
| array of available colors
|
const hashmap * | colorNames |
| hash map to look up index from name
|
Member Typedef Documentation
Constructor & Destructor Documentation
Member Function Documentation
virtual EventBase* SegmentedColorFilterBankEvent::clone |
( |
|
) |
const [inline, 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 47 of file SegmentedColorFilterBankEvent.h. |
const color_class_state& SegmentedColorFilterBankEvent::getColor |
( |
unsigned int |
i |
) |
const [inline] |
|
unsigned int SegmentedColorFilterBankEvent::getColorIndex |
( |
const std::string & |
name |
) |
const [inline] |
|
unsigned int SegmentedColorFilterBankEvent::getColorIndex |
( |
const char * |
name |
) |
const [inline] |
|
unsigned int SegmentedColorFilterBankEvent::getNumColors |
( |
|
) |
const [inline] |
|
Member Data Documentation
The documentation for this class was generated from the following file:
|