Trivial channel that just returns a map full of zeroes. More...
#include <Channels/ZeroChannel.H>
Public Member Functions | |
ZeroChannel (OptionManager &mgr, const std::string &descrName="Trivial Zero Channel", const std::string &tagName="ZeroChannel") | |
virtual bool | outputAvailable () const |
Query whether the channel is ready to give yield valid output. | |
virtual Dims | getMapDims () const |
Return the dimensions of the output image. | |
virtual uint | numSubmaps () const |
Return the number of feature maps represented by this channel. | |
virtual Image< float > | getSubmap (const uint index) const |
Get the feature map at the given index. | |
virtual std::string | getSubmapName (const uint index) const |
Get the name/description of the feature map at the given index. | |
virtual std::string | getSubmapNameShort (const uint index) const |
Get the name/description of the feature map at the given index, short version. | |
virtual void | getFeatures (const Point2D< int > &locn, std::vector< float > &mean) const |
virtual void | getFeaturesBatch (std::vector< Point2D< int > * > *locn, std::vector< std::vector< float > > *mean, int *count) const |
virtual Image< float > | getOutput () |
The output will be the size of the feature map level in the pyramid. | |
Protected Member Functions | |
virtual void | doInput (const InputFrame &inframe) |
Subclasses override this implementation of the input() function. |
Trivial channel that just returns a map full of zeroes.
Definition at line 45 of file ZeroChannel.H.
void ZeroChannel::doInput | ( | const InputFrame & | inframe | ) | [protected, virtual] |
Subclasses override this implementation of the input() function.
This will be called by one of the input() methods. For efficiency reasons (e.g. network bandwidth in parallel code), it is possible that the color or luminance input may be null, although the code should be wired up properly so that given subclasses do not receive a null input that they in fact need. Subclasses should be sure to ASSERT that any used inputs are non-null.
Implements ChannelBase.
Definition at line 125 of file ZeroChannel.C.
Dims ZeroChannel::getMapDims | ( | ) | const [virtual] |
Return the dimensions of the output image.
Implements ChannelBase.
Definition at line 65 of file ZeroChannel.C.
References ChannelBase::getInputDims(), OModelParam< T >::getVal(), Dims::h(), ChannelBase::hasInput(), LevelSpec::mapLevel(), and Dims::w().
Referenced by getOutput(), and getSubmap().
Image< float > ZeroChannel::getOutput | ( | ) | [virtual] |
The output will be the size of the feature map level in the pyramid.
(I.e., the size of the output is given by getMapDims().
Implements ChannelBase.
Definition at line 119 of file ZeroChannel.C.
References getMapDims(), and ZEROS.
Get the feature map at the given index.
This function is intended to be implemented by subclasses so that it recurses into any nested channels, mapping nested submaps into a linear sequence of indices.
Implements ChannelBase.
Definition at line 83 of file ZeroChannel.C.
References getMapDims(), and ZEROS.
std::string ZeroChannel::getSubmapName | ( | const uint | index | ) | const [virtual] |
Get the name/description of the feature map at the given index.
This function is intended to be implemented by subclasses so that it recurses into any nested channels, mapping nested submaps into a linear sequence of indices. The output of this function is intended only to be human-readable (e.g. for labeling image displays), and does not have to follow any particular parseable syntax.
Implements ChannelBase.
Definition at line 92 of file ZeroChannel.C.
std::string ZeroChannel::getSubmapNameShort | ( | const uint | index | ) | const [virtual] |
Get the name/description of the feature map at the given index, short version.
Implements ChannelBase.
Definition at line 98 of file ZeroChannel.C.
uint ZeroChannel::numSubmaps | ( | ) | const [virtual] |
Return the number of feature maps represented by this channel.
Implements ChannelBase.
Definition at line 77 of file ZeroChannel.C.
bool ZeroChannel::outputAvailable | ( | ) | const [virtual] |
Query whether the channel is ready to give yield valid output.
In some cases (e.g. with motion channels), it may take several input frames before the channel is fully initialized.
Implements ChannelBase.
Definition at line 59 of file ZeroChannel.C.