DGtal
0.6.devel
Main Page
Related Pages
Modules
Namespaces
Data Structures
Examples
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
src
DGtal
io
writers
PPMWriter.h
1
17
#pragma once
18
31
#if defined(PPMWriter_RECURSES)
32
#error Recursive header files inclusion detected in PPMWriter.h
33
#else // defined(PPMWriter_RECURSES)
34
35
#define PPMWriter_RECURSES
36
37
#if !defined PPMWriter_h
38
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>
72
struct
PPMWriter
73
{
74
// ----------------------- Standard services ------------------------------
75
typedef
TImage
Image
;
76
typedef
typename
TImage::Value
Value
;
77
typedef
TFunctor
Functor
;
78
79
BOOST_CONCEPT_ASSERT
((
CUnaryFunctor<TFunctor, Value, DGtal::Color>
)) ;
80
BOOST_STATIC_ASSERT
( (TImage::Domain::dimension == 2) ||
81
(TImage::Domain::dimension == 3));
82
94
static
bool
exportPPM
(
const
std::string & filename,
const
Image
&aImage,
95
const
Functor
& aFunctor =
Functor
(),
bool
topbotomOrder=
true
);
96
97
107
static
bool
exportPPM3D
(
const
std::string & filename,
const
Image
&aImage,
108
const
Functor
& aFunctor =
Functor
());
109
110
};
111
}
//namespace
112
114
// Includes inline functions.
115
#include "DGtal/io/writers/PPMWriter.ih"
116
117
// //
119
120
#endif // !defined PPMWriter_h
121
122
#undef PPMWriter_RECURSES
123
#endif // else defined(PPMWriter_RECURSES)
Generated on Wed Dec 19 2012 19:10:33 for DGtal by
1.8.1.1