DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
PPMWriter.h
1
16
17
#pragma once
18
30
31
#if defined(PPMWriter_RECURSES)
32
#error Recursive header files inclusion detected in PPMWriter.h
33
#else
// defined(PPMWriter_RECURSES)
35
#define PPMWriter_RECURSES
36
37
#if !defined PPMWriter_h
39
#define PPMWriter_h
40
42
// Inclusions
43
#include <iostream>
44
#include <string>
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"
52
53
namespace
DGtal
54
{
55
57
// template class PPMWriter
71
template
<
typename
TImage,
typename
TFunctor = functors::Identity>
72
struct
PPMWriter
73
{
74
// ----------------------- Standard services ------------------------------
75
typedef
TImage
Image
;
76
typedef
typename
TImage::Value
Value
;
77
typedef
TFunctor
Functor
;
78
BOOST_CONCEPT_ASSERT
((
concepts::CUnaryFunctor<TFunctor, Value, DGtal::Color>
)) ;
79
BOOST_STATIC_ASSERT
( (TImage::Domain::dimension == 2) ||
80
(TImage::Domain::dimension == 3));
81
92
static
bool
exportPPM
(
const
std::string & filename,
const
Image
&aImage,
93
const
Functor
& aFunctor =
Functor
(),
bool
topbottomOrder=
true
);
94
95
105
static
bool
exportPPM3D
(
const
std::string & filename,
const
Image
&aImage,
106
const
Functor
& aFunctor =
Functor
());
107
108
};
109
}
//namespace
110
112
// Includes inline functions.
113
#include "DGtal/io/writers/PPMWriter.ih"
114
115
// //
117
118
#endif
// !defined PPMWriter_h
119
120
#undef PPMWriter_RECURSES
121
#endif
// else defined(PPMWriter_RECURSES)
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
DGtal::PPMWriter
Aim: Export a 2D and a 3D Image using the Netpbm PPM formats (ASCII mode).
Definition
PPMWriter.h:73
DGtal::PPMWriter::Image
TImage Image
Definition
PPMWriter.h:75
DGtal::PPMWriter::Value
TImage::Value Value
Definition
PPMWriter.h:76
DGtal::PPMWriter::BOOST_STATIC_ASSERT
BOOST_STATIC_ASSERT((TImage::Domain::dimension==2)||(TImage::Domain::dimension==3))
DGtal::PPMWriter::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CUnaryFunctor< TFunctor, Value, DGtal::Color >))
DGtal::PPMWriter::exportPPM
static bool exportPPM(const std::string &filename, const Image &aImage, const Functor &aFunctor=Functor(), bool topbottomOrder=true)
DGtal::PPMWriter::Functor
TFunctor Functor
Definition
PPMWriter.h:77
DGtal::PPMWriter::exportPPM3D
static bool exportPPM3D(const std::string &filename, const Image &aImage, const Functor &aFunctor=Functor())
DGtal::concepts::CUnaryFunctor
Aim: Defines a unary functor, which associates arguments to results.
Definition
CUnaryFunctor.h:90
src
DGtal
io
writers
PPMWriter.h
Generated on
for DGtal by
1.18.0