DGtal 1.3.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions
DGtal::PPMWriter< TImage, TFunctor > Struct Template Reference

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

#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 = functors::Identity>
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

◆ Functor

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

Definition at line 77 of file PPMWriter.h.

◆ Image

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

Definition at line 75 of file PPMWriter.h.

◆ Value

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

Definition at line 76 of file PPMWriter.h.

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT()

template<typename TImage , typename TFunctor = functors::Identity>
DGtal::PPMWriter< TImage, TFunctor >::BOOST_CONCEPT_ASSERT ( (concepts::CUnaryFunctor< TFunctor, Value, DGtal::Color >)  )

◆ BOOST_STATIC_ASSERT()

template<typename TImage , typename TFunctor = functors::Identity>
DGtal::PPMWriter< TImage, TFunctor >::BOOST_STATIC_ASSERT ( (TImage::Domain::dimension==2)||(TImage::Domain::dimension==3)  )

◆ exportPPM()

template<typename TImage , typename TFunctor = functors::Identity>
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.

Referenced by TEST_CASE(), testHDF5Reader(), and testPNMWriter().

◆ exportPPM3D()

template<typename TImage , typename TFunctor = functors::Identity>
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: