LevelSpec Class Reference

A utility class for use with SingleChannel. More...

#include <Image/LevelSpec.H>

List of all members.

Public Member Functions

 LevelSpec ()
 Unitialized constructor, all internal values to 0.
 LevelSpec (const uint levmin, const uint levmax, const uint deltmin, const uint deltmax, const uint maplevel)
 Constructor.
void init (const uint levmin, const uint levmax, const uint deltmin, const uint deltmax, const uint maplevel)
 (re-)initialization
uint levMin () const
 Get the minimum center level (inclusive).
uint levMax () const
 Get the maximum center level (inclusive).
uint delMin () const
 Get the minimum surround minus center level difference (inclusive).
uint delMax () const
 Get the maximum surround minus center level difference (inclusive).
uint mapLevel () const
 Get the level at which the feature map is built.
uint maxIndex () const
 Get the maximum index that can be returned from csToIndex().
uint maxDepth () const
 Get the maximum surround level that will be used.
bool indexOK (uint index) const
 Query if the given array index is valid for this object.
bool clevOK (uint centerlev) const
 Query if the given center level is valid for this object.
bool slevOK (uint surroundlev) const
 Query if the given surround level is valid for this object.
bool delOK (uint delta) const
 Query if the given surround-center delta is valid for this object.
bool csOK (uint centerlev, uint surroundlev) const
 Query if the given center/surround levels are valid for this object.
uint csToIndex (uint centerlev, uint surroundlev) const
 Compute an array index for a given center/surround pairing.
void indexToCS (uint index, uint &centerlev, uint &surroundlev) const
 Compute the center/surround pairing corresponding to an array index.
bool operator== (const LevelSpec &that) const
 Equality operator.
bool operator!= (const LevelSpec &that) const
 Inequality operator.

Detailed Description

A utility class for use with SingleChannel.

LevelSpec specifies a set of center/surround pairings, by tracking two min/max ranges: one for levels, and one for deltas. Note that both of these ranges are inclusive ranges; both the min and max values are valid elements. The levels refer to depth levels in a Pyramid, and the deltas refer to differences between the center and surround levels in a centerSurround() operation. LevelSpec also maps these ranges into a singe range 0..maxIndex(), so that all pairings of level/delta can be accessed in a 1-D array, for example.

Definition at line 55 of file LevelSpec.H.


Constructor & Destructor Documentation

LevelSpec::LevelSpec (  ) 

Unitialized constructor, all internal values to 0.

Definition at line 54 of file LevelSpec.C.

LevelSpec::LevelSpec ( const uint  levmin,
const uint  levmax,
const uint  deltmin,
const uint  deltmax,
const uint  maplevel 
)

Constructor.

Definition at line 60 of file LevelSpec.C.

References ASSERT.


Member Function Documentation

bool LevelSpec::clevOK ( uint  centerlev  )  const

Query if the given center level is valid for this object.

Definition at line 120 of file LevelSpec.C.

Referenced by csOK().

bool LevelSpec::csOK ( uint  centerlev,
uint  surroundlev 
) const

Query if the given center/surround levels are valid for this object.

The "cs" prefix is a mnemonic to indicate that the center argument precedes the surround argument.

Definition at line 135 of file LevelSpec.C.

References clevOK(), delOK(), and slevOK().

Referenced by SingleOpponentChannel::centerSurround(), SingleChannel::centerSurround(), DummyChannel::centerSurround(), csToIndex(), and indexToCS().

uint LevelSpec::csToIndex ( uint  centerlev,
uint  surroundlev 
) const

Compute an array index for a given center/surround pairing.

Return the array index in 0..maxIndex that corresponds to the given center/surround levels. The "cs" prefix is a mnemonic to indicate that the center argument precedes the surround argument.

Definition at line 148 of file LevelSpec.C.

References ASSERT, and csOK().

Referenced by IntegerSimpleChannel::csToIndex(), ChannelFacetScalarSingle::getVal(), and ChannelFacetScalarSingle::setVal().

uint LevelSpec::delMax (  )  const
uint LevelSpec::delMin (  )  const
bool LevelSpec::delOK ( uint  delta  )  const

Query if the given surround-center delta is valid for this object.

Definition at line 131 of file LevelSpec.C.

Referenced by csOK().

bool LevelSpec::indexOK ( uint  index  )  const
void LevelSpec::indexToCS ( uint  index,
uint centerlev,
uint surroundlev 
) const
void LevelSpec::init ( const uint  levmin,
const uint  levmax,
const uint  deltmin,
const uint  deltmax,
const uint  maplevel 
)

(re-)initialization

Definition at line 75 of file LevelSpec.C.

References ASSERT.

Referenced by convertFromString().

uint LevelSpec::levMax (  )  const
uint LevelSpec::levMin (  )  const
uint LevelSpec::mapLevel (  )  const
uint LevelSpec::maxDepth (  )  const
uint LevelSpec::maxIndex (  )  const
bool LevelSpec::operator!= ( const LevelSpec that  )  const [inline]

Inequality operator.

Definition at line 120 of file LevelSpec.H.

bool LevelSpec::operator== ( const LevelSpec that  )  const

Equality operator.

Definition at line 172 of file LevelSpec.C.

bool LevelSpec::slevOK ( uint  surroundlev  )  const

Query if the given surround level is valid for this object.

Definition at line 124 of file LevelSpec.C.

Referenced by csOK().


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