Generic base class for output frame filters. More...
#include <Transport/FrameOfilt.H>
Public Member Functions | |
FrameOfilt (OptionManager &mgr, const std::string &descrName, const std::string &tagName) | |
Constructor. | |
virtual | ~FrameOfilt () |
Destructor. | |
virtual void | setConfigInfo (const std::string &cfg) |
Build our frame destination from the given string. | |
virtual bool | setFrameNumber (int n) |
Just pass the frame number onto our frame destination. | |
virtual void | writeFrame (const GenericFrame &frame, const std::string &shortname, const FrameInfo &auxinfo) |
Sends the frame through filterFrame(). | |
virtual bool | isVoid () const |
Default version just returns the result of isVoid() from our destination. | |
virtual void | closeStream (const std::string &shortname) |
Just pass the closeStream() request on to our frame destination. | |
Protected Member Functions | |
virtual void | filterFrame (FrameOstream &dest, const GenericFrame &frame, const std::string &shortname, const FrameInfo &auxinfo)=0 |
Subclasses implement their filtering here. |
Generic base class for output frame filters.
This class is the base class for output filter classes that can be chained together to perform one or more operations on output frames before they reach their final destination (display, disk, network, etc.)
Definition at line 48 of file FrameOfilt.H.
FrameOfilt::FrameOfilt | ( | OptionManager & | mgr, | |
const std::string & | descrName, | |||
const std::string & | tagName | |||
) |
Constructor.
Definition at line 46 of file FrameOfilt.C.
FrameOfilt::~FrameOfilt | ( | ) | [virtual] |
Destructor.
Definition at line 55 of file FrameOfilt.C.
void FrameOfilt::closeStream | ( | const std::string & | shortname | ) | [virtual] |
Just pass the closeStream() request on to our frame destination.
Implements FrameOstream.
Definition at line 94 of file FrameOfilt.C.
virtual void FrameOfilt::filterFrame | ( | FrameOstream & | dest, | |
const GenericFrame & | frame, | |||
const std::string & | shortname, | |||
const FrameInfo & | auxinfo | |||
) | [protected, pure virtual] |
Subclasses implement their filtering here.
A trivial pass-through implementation would be dest.writeFrame(frame, shortname, auxinfo)
Implemented in CoerceVideoFormatOfilt, ColorizeOfilt, LuminanceOfilt, and SplitRgbOfilt.
Referenced by writeFrame().
bool FrameOfilt::isVoid | ( | ) | const [virtual] |
Default version just returns the result of isVoid() from our destination.
Reimplemented from FrameOstream.
Definition at line 88 of file FrameOfilt.C.
void FrameOfilt::setConfigInfo | ( | const std::string & | cfg | ) | [virtual] |
Build our frame destination from the given string.
Subclasses should NOT override setConfigInfo() from FrameOfilt. If they need additional configuration information, they should get it from a command-line option through an OModelParam, or if more flexibility is needed, then just inherit from FrameOstream itself rather than from FrameOfilt.
Reimplemented from FrameOstream.
Definition at line 59 of file FrameOfilt.C.
References ModelComponent::addSubComponent(), ModelComponent::getManager(), makeFrameOstream(), MC_RECURSE, and ModelComponent::removeSubComponent().
bool FrameOfilt::setFrameNumber | ( | int | n | ) | [virtual] |
Just pass the frame number onto our frame destination.
Subclasses should NOT override setFrameNumber() from FrameOfilt. If more flexibility is needed, then just inherit from FrameOstream itself rather than from FrameOfilt.
Reimplemented from FrameOstream.
Definition at line 70 of file FrameOfilt.C.
void FrameOfilt::writeFrame | ( | const GenericFrame & | frame, | |
const std::string & | shortname, | |||
const FrameInfo & | auxinfo | |||
) | [virtual] |
Sends the frame through filterFrame().
Subclasses should NOT override writeFrame() from FrameOfilt; instead, they should implement filterFrame(). If more flexibility is needed, then just inherit from FrameOstream itself rather than from FrameOfilt.
Implements FrameOstream.
Definition at line 79 of file FrameOfilt.C.
References filterFrame().