Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
RegionGenerator Class Reference#include <RegionGenerator.h>
Inheritance diagram for RegionGenerator:
![]() Detailed DescriptionConnects regions of CMVision format runs in RLEGenerator.Uses the CMVision library for main processing. getImage() will return an array of RegionGenerator::region_stats - one entry per color. This will give you some statistics on colors present, as well as the head of a linked list through regions of each color in the image. Uses fields in the RLEGenerator's runs to store region information. This means we don't have to make an extra copy of the data, but unfortunately also means these two stages are tightly coupled... Similarly, this also accesses the color information of the runs, so the events received must be a SegmentedColorFilterBankEvents so that it can interpret the color information. Some statistical information will then be stored in the color struct to report the min region area, max region area, and number of regions. Definition at line 30 of file RegionGenerator.h.
Member Typedef Documentationusing the CMVision library's color struct to store the region info
Definition at line 33 of file RegionGenerator.h.
use the same color info as SegmentedColorFilterBankEvent (since that's what's supplying the color info)
Definition at line 56 of file RegionGenerator.h.
Constructor & Destructor Documentation
don't call
Member Function Documentation
Gives a short description of what this class of behaviors does... you should override this (but don't have to). If you do override this, also consider overriding getDescription() to return it Reimplemented from BehaviorBase. Definition at line 44 of file RegionGenerator.h.
deletes storage of cached images and marks it invalid you should override this if the images cache pointer isn't actually an array of bytes... Don't forget to call it in your subclass's destructor or your version won't get called... Reimplemented from FilterBankGenerator. Definition at line 27 of file RegionGenerator.cc. Referenced by loadBuffer(), processEvent(), and ~RegionGenerator().
see class notes above for what data this can handle
Reimplemented from FilterBankGenerator. Definition at line 37 of file RegionGenerator.cc.
Calculates space needed to save - if you can't precisely add up the size, just make sure to overestimate and things will still work. getBinSize is used for reserving buffers during serialization, but does not necessarily determine the actual size of what is written -- the return value of saveBuffer() specifies that after the data actually has been written. If getBinSize overestimates, the extra memory allocation is only temporary, no extra filler bytes are actually stored.
Reimplemented from FilterBankGenerator. Definition at line 64 of file RegionGenerator.cc.
The loadBuffer() functions of the included subclasses aren't tested, so don't assume they'll work without a little debugging... Reimplemented from FilterBankGenerator. Definition at line 87 of file RegionGenerator.cc.
Save to a given buffer in memory.
Reimplemented from FilterBankGenerator. Definition at line 140 of file RegionGenerator.cc. Referenced by RegionCamBehavior::writeRegions().
resizes the filter bank information storage area, you should override this to do your setup and call it from your constructor In general, it isn't expected that FilterBankGenerator's should necessarily be dynamically resizeable (although it would be nice), which is why this isn't public. If yours is, just add some pubic accessor functions which call this. In general, the included subclasses should be able to handle being resized, but there's no reason to do so since the system won't be changing its available resolutions at run time. The default implementation is a no-op if(numLayers==nLayers && numChannels==nChannels) Reimplemented from FilterBankGenerator. Definition at line 182 of file RegionGenerator.cc. Referenced by RegionGenerator().
create new image data storage area for the cache - this called by getImage() only when the corresponding entry in images is NULL You should return the pointer you want stored in images to be returned by any calls to getFirstRow. Interpretation of the data it points to is dependant on the the generator which creates it Implements FilterBankGenerator. Definition at line 195 of file RegionGenerator.cc. Referenced by loadBuffer().
should calculate new image data, called by getImage() only when imageValids indicates the image being requested is dirty (and only after getImage() has already called createImageCache()) This is where you'll want to put your user-specific code for calculating the image data Implements FilterBankGenerator. Definition at line 210 of file RegionGenerator.cc.
deletes the arrays
Reimplemented from FilterBankGenerator. Definition at line 231 of file RegionGenerator.cc. Referenced by ~RegionGenerator().
don't call
Member Data Documentation
maximum number of regions, value is from historical Vision sources
Definition at line 57 of file RegionGenerator.h. Referenced by calcImage(), createImageCache(), getBinSize(), and loadBuffer().
number of colors available (from src->src, which should be SegmentedColorGenerator...)
Definition at line 64 of file RegionGenerator.h. Referenced by calcImage(), createImageCache(), getBinSize(), loadBuffer(), processEvent(), RegionGenerator(), and saveBuffer().
colors information (from src->src, which should be SegmentedColorGenerator...)
Definition at line 65 of file RegionGenerator.h. Referenced by createImageCache(), processEvent(), and RegionGenerator().
data storage for region information
Definition at line 66 of file RegionGenerator.h. Referenced by calcImage(), createImageCache(), destruct(), freeCaches(), loadBuffer(), and setNumImages().
The documentation for this class was generated from the following files: |
Tekkotsu v4.0 |
Generated Thu Nov 22 00:58:38 2007 by Doxygen 1.5.4 |