DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
RawWriter.h
1
16
17
#pragma once
18
30
31
#if defined(RawWriter_RECURSES)
32
#error Recursive header files inclusion detected in RawWriter.h
33
#else
// defined(RawWriter_RECURSES)
35
#define RawWriter_RECURSES
36
37
#if !defined RawWriter_h
39
#define RawWriter_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/base/CUnaryFunctor.h"
49
#include "DGtal/base/BasicFunctors.h"
51
52
namespace
DGtal
53
{
54
56
// template class RawWriter
97
template
<
typename
TImage,
typename
TFunctor = functors::Identity>
98
struct
RawWriter
99
{
100
// ----------------------- Standard services ------------------------------
101
102
typedef
TImage
Image
;
103
typedef
typename
TImage::Value
Value
;
104
typedef
TFunctor
Functor
;
105
115
template
<
typename
Word>
116
static
bool
exportRaw
(
const
std::string& filename,
117
const
Image
& aImage,
118
const
Functor
& aFunctor =
Functor
());
119
128
static
bool
exportRaw8
(
const
std::string& filename,
129
const
Image
& anImage,
130
const
Functor
& aFunctor =
Functor
());
131
140
static
bool
exportRaw16
(
const
std::string& filename,
141
const
Image
& anImage,
142
const
Functor
& aFunctor =
Functor
());
143
152
static
bool
exportRaw32
(
const
std::string& filename,
153
const
Image
& anImage,
154
const
Functor
& aFunctor =
Functor
());
155
156
private
:
157
158
};
159
168
template
<
typename
Word>
169
std::ostream&
raw_writer_write_word
(std::ostream& outs, Word value);
170
171
}
//namespace
172
174
// Includes inline functions.
175
#include "DGtal/io/writers/RawWriter.ih"
176
177
// //
179
180
#endif
// !defined RawWriter_h
181
182
#undef RawWriter_RECURSES
183
#endif
// else defined(RawWriter_RECURSES)
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
DGtal::raw_writer_write_word
std::ostream & raw_writer_write_word(std::ostream &outs, Word value)
DGtal::RawWriter
Aim: Raw binary export of an Image.
Definition
RawWriter.h:99
DGtal::RawWriter::Image
TImage Image
Definition
RawWriter.h:102
DGtal::RawWriter::exportRaw32
static bool exportRaw32(const std::string &filename, const Image &anImage, const Functor &aFunctor=Functor())
DGtal::RawWriter::exportRaw8
static bool exportRaw8(const std::string &filename, const Image &anImage, const Functor &aFunctor=Functor())
DGtal::RawWriter::exportRaw16
static bool exportRaw16(const std::string &filename, const Image &anImage, const Functor &aFunctor=Functor())
DGtal::RawWriter::exportRaw
static bool exportRaw(const std::string &filename, const Image &aImage, const Functor &aFunctor=Functor())
DGtal::RawWriter::Functor
TFunctor Functor
Definition
RawWriter.h:104
DGtal::RawWriter::Value
TImage::Value Value
Definition
RawWriter.h:103
src
DGtal
io
writers
RawWriter.h
Generated on
for DGtal by
1.18.0