A utility class for use with SingleChannel. More...
#include <Image/LevelSpec.H>
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 ¢erlev, 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. |
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.
LevelSpec::LevelSpec | ( | ) |
Unitialized constructor, all internal values to 0.
Definition at line 54 of file LevelSpec.C.
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().
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().
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 |
Get the maximum surround minus center level difference (inclusive).
Definition at line 100 of file LevelSpec.C.
Referenced by convertToString(), PN03contrastChannel::doInput(), MichelsonChannel::doInput(), TcorrChannel::doInput(), ScorrChannel::doInput(), VarianceChannel::doInput(), EntropyChannel::doInput(), InformationChannel::doInput(), SimulationViewerSurpCont::setBrain(), EnvVisualCortexBase::start1(), JetFiller::visitSingleChannel(), and JetSpecFiller::visitSingleChannel().
uint LevelSpec::delMin | ( | ) | const |
Get the minimum surround minus center level difference (inclusive).
Definition at line 96 of file LevelSpec.C.
Referenced by convertToString(), PN03contrastChannel::doInput(), MichelsonChannel::doInput(), TcorrChannel::doInput(), ScorrChannel::doInput(), VarianceChannel::doInput(), EntropyChannel::doInput(), InformationChannel::doInput(), SimulationViewerSurpCont::setBrain(), and EnvVisualCortexBase::start1().
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 |
Query if the given array index is valid for this object.
Definition at line 116 of file LevelSpec.C.
Referenced by SingleChannel::getRawCSmap(), IntegerSimpleChannel::getRawCSmapInt(), IntegerSimpleChannel::getSubmapName(), SingleChannel::getSubmapName(), SingleChannel::getSubmapNameShort(), IntegerSimpleChannel::getSubmapNameShort(), indexToCS(), and FeatureBiaser::visitSingleChannel().
Compute the center/surround pairing corresponding to an array index.
Definition at line 159 of file LevelSpec.C.
References ASSERT, csOK(), and indexOK().
Referenced by IntegerSimpleChannel::getRawCSmapInt(), IntegerSimpleChannel::getSubmapName(), IntegerSimpleChannel::getSubmapNameShort(), ChannelFacetScalarSingle::readFrom(), IntegerSimpleChannel::saveResults(), OptimalGainsFinder::visitSingleChannel(), GuidedSearchBiaser::visitSingleChannel(), and ChannelFacetScalarSingle::writeTo().
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 |
Get the maximum center level (inclusive).
Definition at line 92 of file LevelSpec.C.
Referenced by convertToString(), PN03contrastChannel::doInput(), MichelsonChannel::doInput(), TcorrChannel::doInput(), ScorrChannel::doInput(), VarianceChannel::doInput(), EntropyChannel::doInput(), InformationChannel::doInput(), TemplateMatchChannel::findBestMatch(), SimulationViewerSurpCont::setBrain(), EnvVisualCortexBase::start1(), JetFiller::visitSingleChannel(), and JetSpecFiller::visitSingleChannel().
uint LevelSpec::levMin | ( | ) | const |
Get the minimum center level (inclusive).
Definition at line 88 of file LevelSpec.C.
Referenced by RGBConvolveChannel::computePyramid(), convertToString(), PN03contrastChannel::doInput(), MichelsonChannel::doInput(), TcorrChannel::doInput(), ScorrChannel::doInput(), VarianceChannel::doInput(), EntropyChannel::doInput(), InformationChannel::doInput(), TemplateMatchChannel::findBestMatch(), SimulationViewerSurpCont::setBrain(), EnvVisualCortexBase::start1(), and SingleOpponentChannel::storePyramid2().
uint LevelSpec::mapLevel | ( | ) | const |
Get the level at which the feature map is built.
Definition at line 104 of file LevelSpec.C.
Referenced by SaliencyMapTrivial::blinkSuppression(), SaliencyMapFast::blinkSuppression(), VisualBufferStd::bufferToRetinal(), DescriptorVec::buildDV(), DescriptorVec::buildParticleCountDV(), DescriptorVec::buildRawDV(), DescriptorVec::buildSingleChannelFV(), FovealTransformModule::clear(), RawVisualCortex::combineOutputs(), IntegerRawVisualCortex::combineOutputsInt(), HueChannel::combineSubMaps(), convertToString(), SaliencyMapFast::depress(), SaliencyMapTrivial::depress(), PN03contrastChannel::doInput(), MichelsonChannel::doInput(), TcorrChannel::doInput(), ScorrChannel::doInput(), VarianceChannel::doInput(), EntropyChannel::doInput(), InformationChannel::doInput(), SingleChannel::getMapDims(), ContourChannel::getMapDims(), ObjDetChannel::getMapDims(), ZeroChannel::getMapDims(), ForegroundDetectionChannel::getMapDims(), IntegerSimpleChannel::getMapDims(), TcorrChannel::getOutput(), SimulationViewerCompress::getTraj(), VisualBufferStd::inhibit(), SaliencyMapFast::input(), SaliencyMapTrivial::input(), TaskRelevanceMapSocial::inputFrame(), WinnerTakeAllGreedy::integrate(), VisualBufferStd::retinalToBuffer(), SaliencyMapFast::saccadicSuppression(), SaliencyMapTrivial::saccadicSuppression(), SimulationViewerSurpCont::setBrain(), and EnvVisualCortexBase::start1().
uint LevelSpec::maxDepth | ( | ) | const |
Get the maximum surround level that will be used.
Definition at line 112 of file LevelSpec.C.
Referenced by RGBConvolveChannel::computePyramid(), RawVisualCortex::doInput(), DepthChannel::doInput(), SimulationViewerSurpCont::setBrain(), SingleChannel::setClipPyramid(), StereoChannel::start1(), DisparityChannel::start1(), and SingleOpponentChannel::storePyramid2().
uint LevelSpec::maxIndex | ( | ) | const |
Get the maximum index that can be returned from csToIndex().
Definition at line 108 of file LevelSpec.C.
Referenced by IntegerSimpleChannel::killCaches(), IntegerSimpleChannel::numSubmaps(), ChannelFacetScalarSingle::readFrom(), SimulationViewerSurpCont::setBrain(), SingleChannelSurprise< SMODEL >::start1(), IntegerSimpleChannel::start1(), and ChannelFacetScalarSingle::writeTo().
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().