FrameIstream subclass that generates random images. More...
#include <Transport/RandomInput.H>
Public Member Functions | |
RandomInput (OptionManager &mgr) | |
Constructor. | |
virtual | ~RandomInput () |
Virtual destructor. | |
virtual void | setConfigInfo (const std::string &dimsstring) |
Override from FrameIstream; just calls setDims(). | |
virtual GenericFrameSpec | peekFrameSpec () |
Peek at the specifications of the next frame to be read. | |
virtual GenericFrame | readFrame () |
Generate a random color image. | |
void | setDims (const Dims &s) |
Specify the dimensions of the random images. | |
void | setSeed (int s) |
Set the seed for our random-number generator. |
FrameIstream subclass that generates random images.
This can be a handy way to quickly test an executable, if you don't have any images lying around, etc. -- you can just specify --in=random:256x256 on the command-line to configure your InputFrameSeries to use a RandomInput source.
Definition at line 51 of file RandomInput.H.
RandomInput::RandomInput | ( | OptionManager & | mgr | ) |
Constructor.
Definition at line 49 of file RandomInput.C.
RandomInput::~RandomInput | ( | ) | [virtual] |
Virtual destructor.
Definition at line 59 of file RandomInput.C.
GenericFrameSpec RandomInput::peekFrameSpec | ( | ) | [virtual] |
Peek at the specifications of the next frame to be read.
Implements FrameIstream.
Definition at line 77 of file RandomInput.C.
References GenericFrame::RGB_U8.
GenericFrame RandomInput::readFrame | ( | ) | [virtual] |
Generate a random color image.
Implements FrameIstream.
Definition at line 91 of file RandomInput.C.
References Image< T >::beginw(), Image< T >::endw(), NO_INIT, and ModelComponent::stop().
void RandomInput::setConfigInfo | ( | const std::string & | dimsstring | ) | [virtual] |
Override from FrameIstream; just calls setDims().
Reimplemented from FrameIstream.
Definition at line 63 of file RandomInput.C.
References convertFromString(), and setDims().
void RandomInput::setDims | ( | const Dims & | s | ) |
Specify the dimensions of the random images.
Definition at line 107 of file RandomInput.C.
Referenced by setConfigInfo().
void RandomInput::setSeed | ( | int | s | ) |
Set the seed for our random-number generator.