IO.H File Reference

#include "Util/Types.H"
#include <iosfwd>
Include dependency graph for IO.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<class T_or_RGB >
std::ostream & operator<< (std::ostream &os, const Image< T_or_RGB > &img)
 Write the pixel values of the Image in a nice human-readable format.
template<class T >
void writeImageToStream (std::ostream &os, const Image< T > &img)
 Write img to to "os", one line of the image into one line of text.
template<class T >
void readImageFromStream (std::istream &is, Image< T > &img)
 Read img from "is" which has been written with writeImageToStream before.

Detailed Description

I/O operations for Image

Definition in file IO.H.


Function Documentation

template<class T_or_RGB >
std::ostream& operator<< ( std::ostream &  os,
const Image< T_or_RGB > &  img 
) [inline]

Write the pixel values of the Image in a nice human-readable format.

Caveat emptor: it may only be "nice" if the img has a fairly small number of elements, so that one row of the image fits in one row of text. This format is not intended to generate a representation that can be re-parsed by the computer to recreate the original image.

template<class T >
void readImageFromStream ( std::istream &  is,
Image< T > &  img 
) [inline]

Read img from "is" which has been written with writeImageToStream before.

Definition at line 109 of file IO.C.

References Image< T >::beginw(), Image< T >::endw(), NO_INIT, and Image< T >::resize().

Referenced by KalmanFilter::readFromStream().

template<class T >
void writeImageToStream ( std::ostream &  os,
const Image< T > &  img 
) [inline]

Write img to to "os", one line of the image into one line of text.

This is only useful for rather small images!

Definition at line 91 of file IO.C.

References Image< T >::begin(), Image< T >::getDims(), Dims::h(), and Dims::w().

Referenced by KalmanFilter::writeToStream().

Generated on Sun May 8 08:42:41 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3