mimas::image_input< T > Class Template Reference
[Image Input]

Abstract base-class for input sources. More...

#include <image_input.h>

Inheritance diagram for mimas::image_input< T >:

Inheritance graph
[legend]
Collaboration diagram for mimas::image_input< T >:

Collaboration graph
[legend]
List of all members.

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.

Detailed Description

template<typename T>
class mimas::image_input< T >

Abstract base-class for input sources.

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.


Constructor & Destructor Documentation

template<typename T>
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.


Member Function Documentation

template<typename T>
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.

Parameters:
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>>().

template<typename T>
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.

template<typename T>
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.


Member Data Documentation

template<typename T>
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!().


The documentation for this class was generated from the following file:
[GNU/Linux] [Qt] [Mesa] [STL] [Lapack] [Boost] [Magick++] [Xalan-C and Xerces-C] [doxygen] [graphviz] [FFTW] [popt] [xine] [Gnuplot] [gnu-arch] [gcc] [gstreamer] [autoconf/automake/make] [freshmeat.net] [opensource.org] [sourceforge.net] [MMVL]
mimas 2.1 - Copyright Mon Oct 30 11:31:31 2006, Bala Amavasai, Stuart Meikle, Arul Selvan, Fabio Caparrelli, Jan Wedekind, Manuel Boissenin, ...