31 #if defined(PGMWriter_RECURSES)
32 #error Recursive header files inclusion detected in PGMWriter.h
35 #define PGMWriter_RECURSES
37 #if !defined PGMWriter_h
45 #include <boost/static_assert.hpp>
46 #include <boost/type_traits.hpp>
47 #include "DGtal/base/Common.h"
48 #include "DGtal/base/CUnaryFunctor.h"
49 #include "DGtal/base/BasicFunctors.h"
87 template <
typename TImage,
typename TFunctor = functors::Identity>
98 (TImage::Domain::dimension == 3));
114 bool saveASCII=
false,
bool topbotomOrder=
true);
136 #include "DGtal/io/writers/PGMWriter.ih"
143 #undef PGMWriter_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 PGM formats (ASCII mode).
BOOST_CONCEPT_ASSERT((concepts::CUnaryFunctor< TFunctor, Value, unsigned char >))
BOOST_STATIC_ASSERT((TImage::Domain::dimension==2)||(TImage::Domain::dimension==3))
static bool exportPGM(const std::string &filename, const Image &aImage, const Functor &aFunctor=Functor(), bool saveASCII=false, bool topbotomOrder=true)
static bool exportPGM3D(const std::string &filename, const Image &aImage, const Functor &aFunctor=Functor(), bool saveASCII=false)
Aim: Defines a unary functor, which associates arguments to results.