Milena (Olena)  User documentation 2.0a Id
 All Classes Namespaces Functions Variables Typedefs Enumerator Groups Pages
mln::io::pnm Namespace Reference

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

Namespaces

namespace  impl
 Namespace of pnm's implementation details.
 

Functions

template<typename V >
image2d< V > load (char type_, const std::string &filename)
 main function : load pnm format
 
template<typename I >
void load (char type_, Image< I > &ima_, const std::string &filename)
 An other way to load pnm files : the destination is an argument to check if the type match the file to load.
 
template<typename I >
void load_raw_2d (std::ifstream &file, I &ima)
 load_raw_2d.
 
template<typename V >
unsigned int max_component (const V &)
 Give the maximum value which can be stored as a component value type V.
 
template<typename I >
void save (char type, const Image< I > &ima_, const std::string &filename)
 

Detailed Description

Namespace of pnm input/output handling.

Function Documentation

template<typename V >
image2d<V> mln::io::pnm::load ( char  type_,
const std::string &  filename 
)
inline

main function : load pnm format

Definition at line 210 of file pnm/load.hh.

References load_raw_2d(), and max_component().

template<typename I >
void mln::io::pnm::load ( char  type_,
Image< I > &  ima_,
const std::string &  filename 
)
inline

An other way to load pnm files : the destination is an argument to check if the type match the file to load.

Definition at line 257 of file pnm/load.hh.

References mln::make::box2d(), load_raw_2d(), and max_component().

template<typename I >
void mln::io::pnm::load_raw_2d ( std::ifstream &  file,
I &  ima 
)
inline

load_raw_2d.

for all pnm 8/16 bits formats

Definition at line 198 of file pnm/load.hh.

Referenced by load().

template<typename V >
unsigned int mln::io::pnm::max_component ( const V &  )
inline

Give the maximum value which can be stored as a component value type V.

Definition at line 56 of file max_component.hh.

Referenced by load().

template<typename I >
void mln::io::pnm::save ( char  type,
const Image< I > &  ima_,
const std::string &  filename 
)
inline

Save a Milena image as a pnm image.

    \param[in] type The type of the image to save (can be PPM,
    PGM, PBM).
    \param[in] ima_ The image to save.
    \param[in,out] filename the destination.

Definition at line 185 of file pnm/save.hh.

Referenced by mln::io::ppm::save(), and mln::io::pgm::save().