#include <image_input.h>
Inheritance diagram for mimas::image_input< T >:
Public Member Functions | |
image_input (void) | |
Constructor. | |
virtual void | read (image< T > &img)=0 throw (mimasexception) |
Read image from arbitrary source. | |
operator bool (void) const | |
Indicator for input-source being alive. | |
bool | operator! (void) const |
Indicator for end of input-source. | |
Protected Attributes | |
bool | state |
State variable. |
This is a base-class for input sources. It allows to implement a program, which retrieves an image from an arbitrary input-source. E.g.:
using namespace mimas; ... void test( image_input< rgba< unsigned char > > &source ) { image< rgba< unsigned char > > image; if ( source >> image ) { ... } else { // End of input has been reached. } ... }; ...
Definition at line 36 of file image_input.h.
mimas::image_input< T >::image_input | ( | void | ) | [inline] |
Constructor.
The state is set to valid (end of stream not encountered yet).
Definition at line 41 of file image_input.h.
virtual void mimas::image_input< T >::read | ( | image< T > & | img | ) | throw (mimasexception) [pure virtual] |
Read image from arbitrary source.
This function is virtual and has to be implemented by the inheriting class.
img | Object to store image in. |
Implemented in mimas::image_dc1394input< T >, mimas::image_fileinput< T >, mimas::image_filesinput< T >, mimas::image_gstreamerinput< T >, mimas::image_v4linput< T >, and mimas::image_xineinput< T >.
Referenced by mimas::operator>>().
mimas::image_input< T >::operator bool | ( | void | ) | const [inline] |
Indicator for input-source being alive.
Definition at line 48 of file image_input.h.
References mimas::image_input< T >::state.
bool mimas::image_input< T >::operator! | ( | void | ) | const [inline] |
Indicator for end of input-source.
Definition at line 50 of file image_input.h.
References mimas::image_input< T >::state.
bool mimas::image_input< T >::state [protected] |
State variable.
Definition at line 53 of file image_input.h.
Referenced by mimas::image_input< T >::operator bool(), and mimas::image_input< T >::operator!().