#include "Util/Types.H"
#include <iosfwd>
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. |
I/O operations for Image
Definition in file IO.H.
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.
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().
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().