Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

FilterBankEvent Class Reference

This event gives access to a set of image channels at different resolutions, see FilterBankGenerator. More...

#include <FilterBankEvent.h>

Inheritance diagram for FilterBankEvent:

Detailed Description

This event gives access to a set of image channels at different resolutions, see FilterBankGenerator.

Definition at line 10 of file FilterBankEvent.h.

List of all members.

Public Member Functions

 FilterBankEvent (FilterBankGenerator *creator, EventBase::EventGeneratorID_t gid, size_t sid, EventBase::EventTypeID_t tid)
 constructor
 FilterBankEvent (const FilterBankEvent &fbk)
 copy constructor (shallow copy -- the generator shouldn't be going anywhere)
const FilterBankEventoperator= (const FilterBankEvent &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
FilterBankGeneratorgetSource () const
 Gives access to underlying generator.
unsigned int getNumLayers () const
 returns the number of image layers (e.g. different resolutions available)
unsigned int getNumChannels () const
 returns the number of channels per image (e.g. Y, U, or V components)
unsigned char * getImage (unsigned int layer, unsigned int channel) const
 returns pointer to the beginning of the image data for the specified layer and channel
virtual size_t getImageSize (unsigned int layer, unsigned int chan) const
 returns the number of bytes used for the data returned by getImage() - if the data varies in size (e.g. jpeg compression), will return 0 if the image hasn't been calculated yet (so call it after getImage())
unsigned int getWidth (unsigned int layer) const
 returns width of the image in a given layer
unsigned int getHeight (unsigned int layer) const
 returns height of the image in a given layer
unsigned int getSkip (unsigned int layer) const
 returns the bytes to skip from the one-past-end of a row to get the beginning of the next
unsigned int getStride (unsigned int layer) const
 returns the bytes to skip from the beginning of one row to get the beginning of the next
unsigned int getIncrement (unsigned int layer) const
 returns the increment to use to go from one sample to the next
unsigned int getFrameNumber () const
 returns the frame number, see FilterBankGenerator::frameNumber
unsigned int getFramesProcessed () const
 returns the number of frames processed by the generator, see FilterBankGenerator::framesProcessed
virtual classTypeID_t getClassTypeID () const
 All subclasses should override this and return a unique ID for their class.

Protected Member Functions

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

Protected Attributes

FilterBankGeneratorsrc
 pointer to generator which created this event

Static Protected Attributes

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

Friends

struct Factory0Arg< EventBase >::Factory< FilterBankEvent >

Constructor & Destructor Documentation

FilterBankEvent::FilterBankEvent ( FilterBankGenerator creator,
EventBase::EventGeneratorID_t  gid,
size_t  sid,
EventBase::EventTypeID_t  tid 
)

constructor

Definition at line 13 of file FilterBankEvent.h.

FilterBankEvent::FilterBankEvent ( const FilterBankEvent fbk  ) 

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

Definition at line 18 of file FilterBankEvent.h.

FilterBankEvent::FilterBankEvent (  )  [protected]

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

Definition at line 73 of file FilterBankEvent.h.

Referenced by clone().


Member Function Documentation

virtual EventBase* FilterBankEvent::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 EventBase.

Reimplemented in SegmentedColorFilterBankEvent.

Definition at line 23 of file FilterBankEvent.h.

virtual classTypeID_t FilterBankEvent::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 EventBase.

Reimplemented in SegmentedColorFilterBankEvent.

Definition at line 61 of file FilterBankEvent.h.

unsigned int FilterBankEvent::getFrameNumber (  )  const

returns the frame number, see FilterBankGenerator::frameNumber

Definition at line 57 of file FilterBankEvent.h.

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

unsigned int FilterBankEvent::getFramesProcessed (  )  const

returns the number of frames processed by the generator, see FilterBankGenerator::framesProcessed

Definition at line 59 of file FilterBankEvent.h.

unsigned int FilterBankEvent::getHeight ( unsigned int  layer  )  const

returns height of the image in a given layer

Definition at line 47 of file FilterBankEvent.h.

Referenced by BallDetectionGenerator::doEvent().

unsigned char* FilterBankEvent::getImage ( unsigned int  layer,
unsigned int  channel 
) const

returns pointer to the beginning of the image data for the specified layer and channel

this will cause the data to be calculated and cached if it's not already available

Definition at line 39 of file FilterBankEvent.h.

Referenced by BallDetectionGenerator::doEvent().

virtual size_t FilterBankEvent::getImageSize ( unsigned int  layer,
unsigned int  chan 
) const [virtual]

returns the number of bytes used for the data returned by getImage() - if the data varies in size (e.g. jpeg compression), will return 0 if the image hasn't been calculated yet (so call it after getImage())

Definition at line 42 of file FilterBankEvent.h.

unsigned int FilterBankEvent::getIncrement ( unsigned int  layer  )  const

returns the increment to use to go from one sample to the next

Definition at line 54 of file FilterBankEvent.h.

unsigned int FilterBankEvent::getNumChannels (  )  const

returns the number of channels per image (e.g. Y, U, or V components)

Definition at line 35 of file FilterBankEvent.h.

Referenced by BallDetectionGenerator::doEvent().

unsigned int FilterBankEvent::getNumLayers (  )  const

returns the number of image layers (e.g. different resolutions available)

Definition at line 32 of file FilterBankEvent.h.

Referenced by BallDetectionGenerator::doEvent(), RawCam::drawShapesIntoBuffer(), and BallDetectionGenerator::testSendEvent().

unsigned int FilterBankEvent::getSkip ( unsigned int  layer  )  const

returns the bytes to skip from the one-past-end of a row to get the beginning of the next

Definition at line 49 of file FilterBankEvent.h.

unsigned int FilterBankEvent::getStride ( unsigned int  layer  )  const

returns the bytes to skip from the beginning of one row to get the beginning of the next

This is just for convenience; the stride is just the skip plus the width, but it's precomputed for you for speed and clarity

Definition at line 52 of file FilterBankEvent.h.

unsigned int FilterBankEvent::getWidth ( unsigned int  layer  )  const

returns width of the image in a given layer

Definition at line 45 of file FilterBankEvent.h.

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

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

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

Definition at line 21 of file FilterBankEvent.h.


Friends And Related Function Documentation

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

Definition at line 74 of file FilterBankEvent.h.


Member Data Documentation

const EventBase::classTypeID_t FilterBankEvent::autoRegisterFilterBankEvent = getTypeRegistry().registerType<FilterBankEvent>(makeClassTypeID("FBKE")) [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 70 of file FilterBankEvent.h.

Referenced by getClassTypeID().

pointer to generator which created this event

the generator holds all the actual image data to be more memory efficient

Definition at line 66 of file FilterBankEvent.h.

Referenced by getFrameNumber(), getFramesProcessed(), getHeight(), getImage(), getImageSize(), getIncrement(), getNumChannels(), getNumLayers(), getSkip(), getSource(), getStride(), getWidth(), and operator=().


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

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