|
DGtal 2.1.0
|
Aim: Raw binary export of an Image. More...
#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 FunctorFunctor &aFunctor=FunctorFunctor()) |
| static bool | exportRaw8 (const std::string &filename, const Image &anImage, const FunctorFunctor &aFunctor=FunctorFunctor()) |
| static bool | exportRaw16 (const std::string &filename, const Image &anImage, const FunctorFunctor &aFunctor=FunctorFunctor()) |
| static bool | exportRaw32 (const std::string &filename, const Image &anImage, const FunctorFunctor &aFunctor=FunctorFunctor()) |
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. |
| anImage | the image to export. |
| aFunctor | functor used to cast image values. |
Referenced by RawIO16< Image >::write().
|
static |
Export an Image to Raw format (unsigned 32bits little-endian, uint32_t, unsigned int).
| filename | name of the output file. |
| anImage | the image to export. |
| aFunctor | functor used to cast image values. |
Referenced by RawIO32< Image >::write().
|
static |
Export an Image to Raw format (unsigned 8bits little-endian, uint8_t, unsigned char).
| filename | name of the output file. |
| anImage | the image to export. |
| aFunctor | functor used to cast image values. |
Referenced by testPNMWriter(), and RawIO8< Image >::write().