Homepage | Demos | Overview | Downloads | Tutorials | Reference | Credits |
FilterBankEvent.hGo to the documentation of this file.00001 //-*-c++-*- 00002 #ifndef INCLUDED_FilterBankEvent_h_ 00003 #define INCLUDED_FilterBankEvent_h_ 00004 00005 #include "Events/EventBase.h" 00006 #include "Vision/FilterBankGenerator.h" 00007 00008 //! This event gives access to a set of image channels at different resolutions, see FilterBankGenerator 00009 class FilterBankEvent : public EventBase { 00010 public: 00011 //! constructor 00012 FilterBankEvent(FilterBankGenerator* creator,EventBase::EventGeneratorID_t gid,unsigned int sid) 00013 : EventBase(gid,sid,EventBase::statusETID), src(creator) 00014 {} 00015 00016 //! Gives access to underlying generator 00017 inline FilterBankGenerator* getSource() const { return src; } 00018 00019 //! returns the number of image layers (e.g. different resolutions available) 00020 inline unsigned int getNumLayers() const { return src->getNumLayers(); } 00021 00022 //! returns the number of channels per image (e.g. Y, U, or V components) 00023 inline unsigned int getNumChannels() const { return src->getNumChannels(); } 00024 00025 //! returns pointer to the beginning of the image data for the specified layer and channel 00026 /*! this will cause the data to be calculated and cached if it's not already available */ 00027 inline unsigned char * getImage(unsigned int layer, unsigned int channel) const { return src->getImage(layer,channel); } 00028 00029 //! returns width of the image in a given layer 00030 inline unsigned int getWidth(unsigned int layer) const { return src->getWidth(layer); } 00031 //! returns height of the image in a given layer 00032 inline unsigned int getHeight(unsigned int layer) const { return src->getHeight(layer); } 00033 //! returns the bytes to skip from the one-past-end of a row to get the beginning of the next 00034 inline unsigned int getSkip(unsigned int layer) const { return src->getSkip(layer); } 00035 //! returns the bytes to skip from the beginning of one row to get the beginning of the next 00036 /*! This is just for convenience; the stride is just the skip plus the width, but it's precomputed for you for speed and clarity */ 00037 inline unsigned int getStride(unsigned int layer) const { return src->getStride(layer); } 00038 //! returns the increment to use to go from one sample to the next 00039 inline unsigned int getIncrement(unsigned int layer) const { return src->getIncrement(layer); } 00040 00041 //! returns the frame number, see FilterBankGenerator::frameNumber 00042 inline unsigned int getFrameNumber() const { return src->getFrameNumber(); } 00043 //! returns the number of frames processed by the generator, see FilterBankGenerator::framesProcessed 00044 inline unsigned int getFramesProcessed() const { return src->getFramesProcessed(); } 00045 00046 protected: 00047 //! pointer to generator which created this event 00048 /*! the generator holds all the actual image data to be more memory efficient */ 00049 FilterBankGenerator* src; 00050 00051 private: 00052 FilterBankEvent(const FilterBankEvent& fbk); //!< don't call 00053 const FilterBankEvent& operator=(const FilterBankEvent& fbk); //!< don't call 00054 }; 00055 00056 /*! @file 00057 * @brief Defines FilterBankEvent, an event for distributing raw image data 00058 * @author ejt (Creator) 00059 * 00060 * $Author: ejt $ 00061 * $Name: tekkotsu-2_2_1 $ 00062 * $Revision: 1.8 $ 00063 * $State: Exp $ 00064 * $Date: 2004/01/18 10:16:57 $ 00065 */ 00066 00067 #endif |
Tekkotsu v2.2.1 |
Generated Tue Nov 23 16:36:38 2004 by Doxygen 1.3.9.1 |