Functions

mln::io::pgm Namespace Reference

Namespace of pgm input/output handling. More...

Functions

template<typename I >
void load (Image< I > &ima, const std::string &filename)
 Load a pgm image in a Milena image.
template<typename V >
image2d< V > load (const std::string &filename)
 Load a pgm image in a Milena image.
template<typename I >
void save (const Image< I > &ima, const std::string &filename)

Detailed Description

Namespace of pgm input/output handling.


Function Documentation

template<typename I >
void mln::io::pgm::load ( Image< I > &  ima,
const std::string &  filename 
) [inline]

Load a pgm image in a Milena image.

Parameters:
[out] ima A reference to the image which will receive data.
[in] filename The source.

Definition at line 87 of file pgm/load.hh.

template<typename V >
image2d< V > mln::io::pgm::load ( const std::string &  filename  )  [inline]

Load a pgm image in a Milena image.

To use this routine, you should specialize the template whith the value type of the image loaded. (ex : load<value::int_u8>("...") )

Parameters:
[in] filename The image source.
Returns:
An image2d which contains loaded data.

Definition at line 77 of file pgm/load.hh.

template<typename I >
void mln::io::pgm::save ( const Image< I > &  ima,
const std::string &  filename 
) [inline]

Save a Milena image as a pgm image.

Parameters:
[in] ima The image to save.
[in,out] filename the destination.

Definition at line 77 of file pgm/save.hh.