31 #if defined(PPMWriter_RECURSES)
32 #error Recursive header files inclusion detected in PPMWriter.h
35 #define PPMWriter_RECURSES
37 #if !defined PPMWriter_h
45 #include <boost/static_assert.hpp>
46 #include <boost/type_traits.hpp>
47 #include "DGtal/base/Common.h"
48 #include "DGtal/io/Color.h"
49 #include "DGtal/base/CUnaryFunctor.h"
50 #include "DGtal/base/BasicFunctors.h"
71 template <
typename TImage,
typename TFunctor = functors::Identity>
80 (TImage::Domain::dimension == 3));
113 #include "DGtal/io/writers/PPMWriter.ih"
120 #undef PPMWriter_RECURSES
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: Export a 2D and a 3D Image using the Netpbm PPM formats (ASCII mode).
BOOST_STATIC_ASSERT((TImage::Domain::dimension==2)||(TImage::Domain::dimension==3))
BOOST_CONCEPT_ASSERT((concepts::CUnaryFunctor< TFunctor, Value, DGtal::Color >))
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())
Aim: Defines a unary functor, which associates arguments to results.