DGtal  0.9.3beta
Public Types | Public Member Functions | Static Public Member Functions
DGtal::PPMWriter< TImage, TFunctor > Struct Template Reference

#include <DGtal/io/writers/PPMWriter.h>

Public Types

typedef TImage Image
 
typedef TImage::Value Value
 
typedef TFunctor Functor
 

Public Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CUnaryFunctor< TFunctor, Value, DGtal::Color >))
 
 BOOST_STATIC_ASSERT ((TImage::Domain::dimension==2)||(TImage::Domain::dimension==3))
 

Static Public Member Functions

static bool exportPPM (const std::string &filename, const Image &aImage, const Functor &aFunctor=Functor(), bool topbottomOrder=true)
 
static bool exportPPM3D (const std::string &filename, const Image &aImage, const Functor &aFunctor=Functor())
 

Detailed Description

template<typename TImage, typename TFunctor>
struct DGtal::PPMWriter< TImage, TFunctor >

Aim: Export a 2D and a 3D Image using the Netpbm PPM formats (ASCII mode).

Description of template struct 'PPMWriter'

A functor can be specified to convert image values to DGtal::Color values.

Template Parameters
TImagethe Image type.
TFunctorthe type of functor used in the export.
See also
testPNMRawWriter.cpp

Definition at line 72 of file PPMWriter.h.

Member Typedef Documentation

template<typename TImage , typename TFunctor >
typedef TFunctor DGtal::PPMWriter< TImage, TFunctor >::Functor

Definition at line 77 of file PPMWriter.h.

template<typename TImage , typename TFunctor >
typedef TImage DGtal::PPMWriter< TImage, TFunctor >::Image

Definition at line 75 of file PPMWriter.h.

template<typename TImage , typename TFunctor >
typedef TImage::Value DGtal::PPMWriter< TImage, TFunctor >::Value

Definition at line 76 of file PPMWriter.h.

Member Function Documentation

template<typename TImage , typename TFunctor >
DGtal::PPMWriter< TImage, TFunctor >::BOOST_CONCEPT_ASSERT ( (concepts::CUnaryFunctor< TFunctor, Value, DGtal::Color >)  )
template<typename TImage , typename TFunctor >
DGtal::PPMWriter< TImage, TFunctor >::BOOST_STATIC_ASSERT ( (TImage::Domain::dimension==2)||(TImage::Domain::dimension==3)  )
template<typename TImage , typename TFunctor >
static bool DGtal::PPMWriter< TImage, TFunctor >::exportPPM ( const std::string &  filename,
const Image aImage,
const Functor aFunctor = Functor(),
bool  topbottomOrder = true 
)
static

Export an Image with PPM format.

Parameters
filenamename of the output file
aImagethe image to export
aFunctorfunctor used to cast image values
topbottomOrdertrue if top to bottom order is prefered (default: true)
Returns
true if no errors occur.
template<typename TImage , typename TFunctor >
static bool DGtal::PPMWriter< TImage, TFunctor >::exportPPM3D ( const std::string &  filename,
const Image aImage,
const Functor aFunctor = Functor() 
)
static

Export an Image with PPM3D format.

Parameters
filenamename of the output file
aImagethe image to export
aFunctorfunctor used to cast image values
Returns
true if no errors occur.

The documentation for this struct was generated from the following file: