JetSpec Class Reference

This class specifies the features, scales and indices represented in a Jet. More...

#include <Channels/Jet.H>

Collaboration diagram for JetSpec:
Collaboration graph
[legend]

List of all members.

Classes

struct  JF
 chained list element that holds JTF definitions for given feature
struct  JFT
 Chained list element that holds index range defs for given feature type.

Public Member Functions

Constructors, destructor and operators

 JetSpec ()
 Empty constructor; starts with an empty specification.
 JetSpec (const JetSpec &js)
 Copy constructor.
JetSpecoperator= (const JetSpec &js)
 Assignment operator.
void freeMem ()
 Free all allocated memory and un-initialize.
 ~JetSpec ()
 Destructor.
Build methods

bool addFeature (const VisualFeature f)
 Add a new feature; returns true on success.
bool addFeatureType (const VisualFeature f, const VisualFeatureType t)
 Add a new representation type for an existing feature; true on success.
bool addIndexRange (const VisualFeature f, const VisualFeatureType t, const int indexmin, const int indexmax)
 Add a new index range for existing feature and type; true on success.
Access methods

int getJetSize () const
 Get the number of components in a jet with our specs.
bool hasFeature (const VisualFeature f) const
 Query whether we have some representation for given feature.
bool hasFeatureType (const VisualFeature f, const VisualFeatureType t) const
 Query whether we have some representation for given feature/type.
int getIndexBase (const VisualFeature f, const VisualFeatureType t, int &siz) const
 Get index of first Jet element for given feature & type.
int getNbIndexRanges (const VisualFeature f, const VisualFeatureType t) const
 Get number of index ranges.
bool getIndexRange (const VisualFeature f, const VisualFeatureType t, const int idxnum, int &idxmin, int &idxmax) const
 Get an index range; true if range exists in JetSpec.
void print () const
 Debugging printout to stdout.
Jet data access methods

int getIndex (const VisualFeature f, const VisualFeatureType t,...) const
 Get index in Jet array data for given feature, type and set of indices.
int getIndexA (const VisualFeature f, const VisualFeatureType t, va_list &a) const
 getIndex() with va_list parameters
int getIndexV (const VisualFeature f, const VisualFeatureType t, const std::vector< int > &v) const
 getIndex() with vector of parameters

Detailed Description

This class specifies the features, scales and indices represented in a Jet.

A Jet object requires a valid JetSpec object at construction

Definition at line 55 of file Jet.H.


Constructor & Destructor Documentation

JetSpec::JetSpec (  ) 

Empty constructor; starts with an empty specification.

Definition at line 47 of file Jet.C.

References freeMem().

JetSpec::JetSpec ( const JetSpec js  ) 

Copy constructor.

Definition at line 51 of file Jet.C.

References freeMem().

JetSpec::~JetSpec (  ) 

Destructor.

Definition at line 95 of file Jet.C.

References freeMem().


Member Function Documentation

bool JetSpec::addFeature ( const VisualFeature  f  ) 

Add a new feature; returns true on success.

Definition at line 99 of file Jet.C.

References featureName().

Referenced by addFeatureType(), addIndexRange(), and operator=().

bool JetSpec::addFeatureType ( const VisualFeature  f,
const VisualFeatureType  t 
)

Add a new representation type for an existing feature; true on success.

Definition at line 116 of file Jet.C.

References addFeature(), featureName(), featureTypeName(), hasFeature(), and hasFeatureType().

Referenced by addIndexRange(), and operator=().

bool JetSpec::addIndexRange ( const VisualFeature  f,
const VisualFeatureType  t,
const int  indexmin,
const int  indexmax 
)

Add a new index range for existing feature and type; true on success.

Valid indices will be in [indexmin..indexmax] inclusive on both sides.

Definition at line 155 of file Jet.C.

References addFeature(), addFeatureType(), hasFeature(), and hasFeatureType().

Referenced by BeobotVisualCortex::init(), and operator=().

void JetSpec::freeMem (  ) 

Free all allocated memory and un-initialize.

Definition at line 77 of file Jet.C.

References NBVISUALFEATURES.

Referenced by JetSpec(), operator=(), and ~JetSpec().

int JetSpec::getIndex ( const VisualFeature  f,
const VisualFeatureType  t,
  ... 
) const [inline]

Get index in Jet array data for given feature, type and set of indices.

The ... arguments should be as many ints as we have have addIndexRange()'d when building the JetSpec, and their values should be within the ranges specified at the time of addIndexRange(). Returns -1 if feature or type unknown or if any of the indices is out of range.

Definition at line 346 of file Jet.H.

References getIndexA().

int JetSpec::getIndexA ( const VisualFeature  f,
const VisualFeatureType  t,
va_list &  a 
) const [inline]

getIndex() with va_list parameters

Definition at line 354 of file Jet.H.

References featureName(), and featureTypeName().

Referenced by getIndex().

int JetSpec::getIndexBase ( const VisualFeature  f,
const VisualFeatureType  t,
int &  siz 
) const [inline]

Get index of first Jet element for given feature & type.

Also returns the total size allocated in the Jet for this feature and type

Definition at line 316 of file Jet.H.

References ASSERT.

bool JetSpec::getIndexRange ( const VisualFeature  f,
const VisualFeatureType  t,
const int  idxnum,
int &  idxmin,
int &  idxmax 
) const [inline]

Get an index range; true if range exists in JetSpec.

Definition at line 333 of file Jet.H.

int JetSpec::getIndexV ( const VisualFeature  f,
const VisualFeatureType  t,
const std::vector< int > &  v 
) const [inline]

getIndex() with vector of parameters

Definition at line 381 of file Jet.H.

References featureName(), and featureTypeName().

int JetSpec::getJetSize (  )  const [inline]

Get the number of components in a jet with our specs.

Definition at line 299 of file Jet.H.

int JetSpec::getNbIndexRanges ( const VisualFeature  f,
const VisualFeatureType  t 
) const [inline]

Get number of index ranges.

Definition at line 325 of file Jet.H.

References ASSERT.

bool JetSpec::hasFeature ( const VisualFeature  f  )  const [inline]

Query whether we have some representation for given feature.

Definition at line 303 of file Jet.H.

Referenced by addFeatureType(), and addIndexRange().

bool JetSpec::hasFeatureType ( const VisualFeature  f,
const VisualFeatureType  t 
) const [inline]

Query whether we have some representation for given feature/type.

Definition at line 311 of file Jet.H.

Referenced by addFeatureType(), and addIndexRange().

JetSpec & JetSpec::operator= ( const JetSpec js  ) 

Assignment operator.

Definition at line 55 of file Jet.C.

References addFeature(), addFeatureType(), addIndexRange(), and freeMem().

void JetSpec::print (  )  const

Debugging printout to stdout.

Definition at line 182 of file Jet.C.

References featureName(), and featureTypeName().

Referenced by BeobotVisualCortex::init().


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