DGtal
0.9.3
|
#include <DGtal/io/writers/RawWriter.h>
Public Types | |
typedef TImage | Image |
typedef TImage::Value | Value |
typedef TFunctor | Functor |
Static Public Member Functions | |
template<typename Word > | |
static bool | exportRaw (const std::string &filename, const Image &aImage, const Functor &aFunctor=Functor()) |
static bool | exportRaw8 (const std::string &filename, const Image &aImage, const Functor &aFunctor=Functor()) |
static bool | exportRaw16 (const std::string &filename, const Image &aImage, const Functor &aFunctor=Functor()) |
static bool | exportRaw32 (const std::string &filename, const Image &aImage, const Functor &aFunctor=Functor()) |
Aim: Raw binary export of an Image.
Description of template struct 'RawWriter'
The export methods exportRaw8
, exportRaw16
and exportRaw32
write raw files (little-endian format) with unsigned integer values of, respectively, 8 bits, 16 bits and 32 bits width. The method exportRaw
can write any type of values, signed integers, floating point types or even structures.
A functor can be specified to convert image values to raw values (e.g. unsigned char for exportRaw8
).
Example usage:
TImage | the Image type. |
TFunctor | the type of functor used in the export. |
Definition at line 98 of file RawWriter.h.
typedef TFunctor DGtal::RawWriter< TImage, TFunctor >::Functor |
Definition at line 104 of file RawWriter.h.
typedef TImage DGtal::RawWriter< TImage, TFunctor >::Image |
Definition at line 102 of file RawWriter.h.
typedef TImage::Value DGtal::RawWriter< TImage, TFunctor >::Value |
Definition at line 103 of file RawWriter.h.
|
static |
Export an Image to Raw format (any value type, in little-endian format).
Word | exported pixel type. |
filename | name of the output file. |
aImage | the image to export. |
aFunctor | functor used to cast image values. |
|
static |
Export an Image to Raw format (unsigned 16bits little-endian, uint16_t, unsigned short).
filename | name of the output file. |
aImage | the image to export. |
aFunctor | functor used to cast image values. |
Referenced by testWriteAndRead().
|
static |
Export an Image to Raw format (unsigned 32bits little-endian, uint32_t, unsigned int).
filename | name of the output file. |
aImage | the image to export. |
aFunctor | functor used to cast image values. |
Referenced by testWriteAndRead().
|
static |
Export an Image to Raw format (unsigned 8bits little-endian, uint8_t, unsigned char).
filename | name of the output file. |
aImage | the image to export. |
aFunctor | functor used to cast image values. |
Referenced by testPNMWriter(), and testWriteAndRead().