ImageCacheMinMax< T > Class Template Reference

image cache to compute a running min/max More...

#include <Image/ImageCache.H>

Inheritance diagram for ImageCacheMinMax< T >:
Inheritance graph
[legend]
Collaboration diagram for ImageCacheMinMax< T >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ImageCacheMinMax ()
 Uninitialized constructor.
 ImageCacheMinMax (uint maxSize)
 Constructor.
Image< T > getMax () const
 return the max of the images currently in the cache
Image< T > getMin () const
 return the max of the images currently in the cache

Protected Member Functions

virtual void doWhenAdd (const Image< T > &img)
 called when an image is added - here it's a nop-op
virtual void doWhenRemove (const Image< T > &img)
 called when an image is removed - here it's a no-op

Detailed Description

template<class T>
class ImageCacheMinMax< T >

image cache to compute a running min/max

In this implementation, all the computations are done when getMax() or getMin() are called. That is, the cache is fairly dump and does not attempt to keep an updated min and max image as new images get added or removed. This differs substantially from the ImageCacheAvg implementation, where all computations are done as images are added/removed and getting the mean is a very cheap operation.

Definition at line 173 of file ImageCache.H.


Constructor & Destructor Documentation

template<class T >
ImageCacheMinMax< T >::ImageCacheMinMax (  )  [inline]

Uninitialized constructor.

By default, cache size is not limited. A limit can be set later using setMaxSize().

Definition at line 236 of file ImageCache.C.

template<class T >
ImageCacheMinMax< T >::ImageCacheMinMax ( uint  maxSize  )  [inline]

Constructor.

Parameters:
maxSize the maximum size of the cache. If this size is exceeded, images are popped off the front of the cache and disregarded for the computation of the mean. If maxSize = 0, the cache is not limited.

Definition at line 242 of file ImageCache.C.


Member Function Documentation

template<class T>
void ImageCacheMinMax< T >::doWhenAdd ( const Image< T > &  img  )  [inline, protected, virtual]

called when an image is added - here it's a nop-op

Reimplemented from ImageCache< T >.

Definition at line 272 of file ImageCache.C.

template<class T>
void ImageCacheMinMax< T >::doWhenRemove ( const Image< T > &  img  )  [inline, protected, virtual]

called when an image is removed - here it's a no-op

Reimplemented from ImageCache< T >.

Definition at line 277 of file ImageCache.C.

template<class T >
Image< T > ImageCacheMinMax< T >::getMax (  )  const [inline]

return the max of the images currently in the cache

Definition at line 248 of file ImageCache.C.

References ImageCache< T >::itsCache, and takeMax().

Referenced by SimulationViewerEyeHand::getTraj(), SimulationViewerEyeRegion::getTraj(), and SimulationViewerEyeMvt::getTraj().

template<class T >
Image< T > ImageCacheMinMax< T >::getMin (  )  const [inline]

return the max of the images currently in the cache

Definition at line 260 of file ImageCache.C.

References ImageCache< T >::itsCache, and takeMin().

Referenced by TaskRelevanceMapKillN::integrate().


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:22:18 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3