DGtal 1.4.0
|
Aim: Import a 2D or 3D using the Netpbm formats (ASCII mode). More...
#include <DGtal/io/readers/PGMReader.h>
Public Types | |
enum | MagicNumber { P1 , P2 , P3 , P4 , P5 , P6 } |
typedef TImageContainer | ImageContainer |
typedef TImageContainer::Value | Value |
typedef TImageContainer::Domain::Vector | Vector |
typedef TFunctor | Functor |
Public Member Functions | |
BOOST_CONCEPT_ASSERT ((concepts::CUnaryFunctor< TFunctor, unsigned char, Value >)) | |
BOOST_STATIC_ASSERT ((ImageContainer::Domain::dimension==2)||(ImageContainer::Domain::dimension==3)) | |
Static Public Member Functions | |
static ImageContainer | importPGM (const std::string &aFilename, const Functor &aFunctor=Functor(), bool topbotomOrder=true) |
static ImageContainer | importPGM3D (const std::string &aFilename, const Functor &aFunctor=Functor()) |
Aim: Import a 2D or 3D using the Netpbm formats (ASCII mode).
Description of class 'PGMReader'
PPM: RGB
Simple example: (extract from test file testPGMReader.cpp)
You can then for instance display a threshold part of the image:
TImageContainer | the type of the image container |
TFunctor | the type of functor used in the import (by default set to functors::Cast< TImageContainer::Value>) . |
Definition at line 97 of file PGMReader.h.
typedef TFunctor DGtal::PGMReader< TImageContainer, TFunctor >::Functor |
Definition at line 106 of file PGMReader.h.
typedef TImageContainer DGtal::PGMReader< TImageContainer, TFunctor >::ImageContainer |
Definition at line 102 of file PGMReader.h.
typedef TImageContainer::Value DGtal::PGMReader< TImageContainer, TFunctor >::Value |
Definition at line 103 of file PGMReader.h.
typedef TImageContainer::Domain::Vector DGtal::PGMReader< TImageContainer, TFunctor >::Vector |
Definition at line 104 of file PGMReader.h.
enum DGtal::PGMReader::MagicNumber |
DGtal::PGMReader< TImageContainer, TFunctor >::BOOST_CONCEPT_ASSERT | ( | (concepts::CUnaryFunctor< TFunctor, unsigned char, Value >) | ) |
DGtal::PGMReader< TImageContainer, TFunctor >::BOOST_STATIC_ASSERT | ( | (ImageContainer::Domain::dimension==2)||(ImageContainer::Domain::dimension==3) | ) |
|
static |
Main method to import a Pgm (8bits) into an instance of the template parameter ImageContainer.
aFilename | the file name to import. |
aFunctor | the functor used to import and cast the source image values into the type of the image container value (by default set to functors::Cast < TImageContainer::Value > . |
topbotomOrder | if true, the point of coordinate (0,0) will be the bottom left corner image point (default) else the center of image coordinate will be the top left of the image (not usual). |
Referenced by DGtal::GenericReader< TContainer, 2, DGtal::uint32_t >::importWithValueFunctor(), DGtal::GenericReader< TContainer, 2, TValue >::importWithValueFunctor(), main(), main(), main(), testImageAdapter(), testPNMReader(), and testRWIssue254().
|
static |
Main method to import a Pgm3D (8bits) into an instance of the template parameter ImageContainer.
aFilename | the file name to import. |
aFunctor | the functor used to import and cast the source image values into the type of the image container value (by default set to functors::Cast < TImageContainer::Value > . |
Referenced by DGtal::GenericReader< TContainer, 3, TValue >::importWithValueFunctor(), testPNM3DASCIIReader(), and testPNM3DReader().