Aim: Export a 2D and a 3D Image using the Netpbm PGM formats (ASCII mode).
More...
#include <DGtal/io/writers/PGMWriter.h>
template<typename TImage, typename TFunctor = functors::Identity>
struct DGtal::PGMWriter< TImage, TFunctor >
Aim: Export a 2D and a 3D Image using the Netpbm PGM formats (ASCII mode).
Description of template struct 'PGMWriter'
- PGM: grayscale
- PGM3D: 3D variant of PGM
A functor can be specified to convert image values to PGM values (unsigned char).
Usage example:
...
typedef TSpace::Point
Point;
...
...
Aim: Parallelepidec region of a digital space, model of a 'CDomain'.
Aim: Export a 2D and a 3D Image using the Netpbm PGM formats (ASCII mode).
HyperRectDomain< Space > Domain
- Template Parameters
-
TImage | the Image type. |
TFunctor | the type of functor used in the export. |
- See also
- testPNMRawWriter.cpp
- Examples
- images/extract2DImagesFrom3D.cpp, and images/extract2DSlicesImagesFrom3D.cpp.
Definition at line 88 of file PGMWriter.h.
◆ Functor
template<typename TImage , typename TFunctor = functors::Identity>
◆ Image
template<typename TImage , typename TFunctor = functors::Identity>
◆ Value
template<typename TImage , typename TFunctor = functors::Identity>
◆ BOOST_CONCEPT_ASSERT()
template<typename TImage , typename TFunctor = functors::Identity>
◆ BOOST_STATIC_ASSERT()
template<typename TImage , typename TFunctor = functors::Identity>
DGtal::PGMWriter< TImage, TFunctor >::BOOST_STATIC_ASSERT |
( |
(TImage::Domain::dimension==2)||(TImage::Domain::dimension==3) | | ) |
|
◆ exportPGM()
template<typename TImage , typename TFunctor = functors::Identity>
static bool DGtal::PGMWriter< TImage, TFunctor >::exportPGM |
( |
const std::string & | filename, |
|
|
const Image & | aImage, |
|
|
const Functor & | aFunctor = Functor(), |
|
|
bool | saveASCII = false, |
|
|
bool | topbotomOrder = true ) |
|
static |
Export an Image with PGM format.
- Parameters
-
filename | name of the output file |
aImage | the image to export |
aFunctor | functor used to cast image values |
saveASCII | used to save image with ASCII pixel value and with white space. (default= false since ASCII mode is not efficient).
|
topbotomOrder | 'true' if the image scan should start from the top. |
- Returns
- true if no errors occur.
Referenced by main(), main(), testPNMWriter(), testRWIssue254(), and testSliceImageFromFunctor().
◆ exportPGM3D()
template<typename TImage , typename TFunctor = functors::Identity>
static bool DGtal::PGMWriter< TImage, TFunctor >::exportPGM3D |
( |
const std::string & | filename, |
|
|
const Image & | aImage, |
|
|
const Functor & | aFunctor = Functor(), |
|
|
bool | saveASCII = false ) |
|
static |
Export an Image with PGM3D format.
- Parameters
-
filename | name of the output file |
aImage | the image to export |
aFunctor | functor used to cast image values |
saveASCII | used to save image with ASCII pixel value and with white space. (default= false since ASCII mode is not efficient).
|
- Returns
- true if no errors occur.
The documentation for this struct was generated from the following file: