Compute the optimal gains that maximize SNR. More...
#include <Channels/OptimalGains.H>
Public Member Functions | |
OptimalGainsFinder (const Image< byte > &targetMask, const Image< byte > &distractorMask, rutz::shared_ptr< ParamMap > pmap, const bool doMax=true) | |
Construct with settings for the algorithm. | |
virtual | ~OptimalGainsFinder () |
Virtual destructor. | |
virtual void | visitChannelBase (ChannelBase &chan) |
Visit the given ChannelBase node. | |
virtual void | visitSingleChannel (SingleChannel &chan) |
Visit the given SingleChannel node. | |
virtual void | visitComplexChannel (ComplexChannel &chan) |
Visit the given ComplexChannel node. | |
virtual rutz::shared_ptr < ParamMap > | pmap () const |
Get our pmap, it will contain saliencsT and salienceD values after visit. |
Compute the optimal gains that maximize SNR.
This ChannelVisitor computes the salience of the target and distractors using the masks as cues for their locations. Based on the salience, it finds SNR and the gains; however, SNR and gains are only used internally (they are needed to compute the salience at the next level up the channel hierarchy) but are not saved here. Rather, the salienceT / salienceD info is saved. One can then use app-combineOptimalGains to compute the gains, and a PrefrontalCortexGS to use them.
Definition at line 56 of file OptimalGains.H.
OptimalGainsFinder::OptimalGainsFinder | ( | const Image< byte > & | targetMask, | |
const Image< byte > & | distractorMask, | |||
rutz::shared_ptr< ParamMap > | pmap, | |||
const bool | doMax = true | |||
) |
Construct with settings for the algorithm.
Definition at line 54 of file OptimalGains.C.
OptimalGainsFinder::~OptimalGainsFinder | ( | ) | [virtual] |
Virtual destructor.
Definition at line 66 of file OptimalGains.C.
rutz::shared_ptr< ParamMap > OptimalGainsFinder::pmap | ( | ) | const [virtual] |
Get our pmap, it will contain saliencsT and salienceD values after visit.
Definition at line 249 of file OptimalGains.C.
void OptimalGainsFinder::visitChannelBase | ( | ChannelBase & | chan | ) | [virtual] |
Visit the given ChannelBase node.
Implements ChannelVisitor.
Definition at line 70 of file OptimalGains.C.
References ModelComponent::tagName().
void OptimalGainsFinder::visitComplexChannel | ( | ComplexChannel & | chan | ) | [virtual] |
Visit the given ComplexChannel node.
Implements ChannelVisitor.
Definition at line 154 of file OptimalGains.C.
References ChannelFacetMap::getFacet(), ComplexChannel::getMapDims(), getMaskedMinMax(), getMaskedMinMaxAvg(), ComplexChannel::getOutput(), ChannelFacetMap::hasFacet(), Image< T >::initialized(), ComplexChannel::killCaches(), ComplexChannel::numChans(), OPTIGAIN_BG_FIRING, rescale(), rutz::shared_ptr< T >::reset(), ChannelFacetMap::setFacet(), sformat(), ComplexChannel::subChan(), and rutz::shared_ptr< T >::swap().
void OptimalGainsFinder::visitSingleChannel | ( | SingleChannel & | chan | ) | [virtual] |
Visit the given SingleChannel node.
Implements ChannelVisitor.
Definition at line 74 of file OptimalGains.C.
References ChannelFacetMap::getFacet(), SingleChannel::getLevelSpec(), SingleChannel::getMapDims(), getMaskedMinMax(), getMaskedMinMaxAvg(), SingleChannel::getOutput(), SingleChannel::getSubmap(), ChannelFacetMap::hasFacet(), LevelSpec::indexToCS(), Image< T >::initialized(), SingleChannel::killCaches(), SingleChannel::numSubmaps(), OPTIGAIN_BG_FIRING, rescale(), rutz::shared_ptr< T >::reset(), ChannelFacetMap::setFacet(), sformat(), and ModelComponent::tagName().