DGtal 1.3.0
|
Aim: Import a 2D or 3D using the Netpbm formats (ASCII mode). More...
#include <DGtal/io/readers/PPMReader.h>
Public Types | |
enum | MagicNumber { P1 , P2 , P3 , P4 , P5 , P6 } |
typedef TImageContainer | ImageContainer |
typedef TImageContainer::Domain::Vector | Vector |
typedef TImageContainer::Value | Value |
typedef TFunctor | Functor |
Public Member Functions | |
BOOST_CONCEPT_ASSERT ((concepts::CUnaryFunctor< TFunctor, DGtal::Color, Value >)) | |
BOOST_STATIC_ASSERT ((ImageContainer::Domain::dimension==2)||(ImageContainer::Domain::dimension==3)) | |
Static Public Member Functions | |
static ImageContainer | importPPM (const std::string &aFilename, const Functor &aFunctor=functors::ColorRGBEncoder< Value >(), bool topbotomOrder=true) |
Aim: Import a 2D or 3D using the Netpbm formats (ASCII mode).
Description of class 'PPMReader'
PPM: RGB
Simple example: (extract from test file testPPMReader.cpp)
You can then for instance display a threshold part of the image:
TImageContainer | the type of the image container |
TFunctor | the type of the functor to transform the source image color into scalar value. This functor should follows the concept CUnaryFunctor<TFunctor, DGtal::Color, TImageContainer::Value> |
Definition at line 98 of file PPMReader.h.
typedef TFunctor DGtal::PPMReader< TImageContainer, TFunctor >::Functor |
Definition at line 106 of file PPMReader.h.
typedef TImageContainer DGtal::PPMReader< TImageContainer, TFunctor >::ImageContainer |
Definition at line 103 of file PPMReader.h.
typedef TImageContainer::Value DGtal::PPMReader< TImageContainer, TFunctor >::Value |
Definition at line 105 of file PPMReader.h.
typedef TImageContainer::Domain::Vector DGtal::PPMReader< TImageContainer, TFunctor >::Vector |
Definition at line 104 of file PPMReader.h.
enum DGtal::PPMReader::MagicNumber |
DGtal::PPMReader< TImageContainer, TFunctor >::BOOST_CONCEPT_ASSERT | ( | (concepts::CUnaryFunctor< TFunctor, DGtal::Color, Value >) | ) |
DGtal::PPMReader< TImageContainer, TFunctor >::BOOST_STATIC_ASSERT | ( | (ImageContainer::Domain::dimension==2)||(ImageContainer::Domain::dimension==3) | ) |
|
static |
Main method to import a PPM (24bit, 8bits per channel) into an instance of the template parameter ImageContainer.
aFilename | the file name to import. |
aFunctor | the functor that from a given color return it associated code (by default set to BasicColorToScalarFunctors::ColorRGBEncoder). |
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, TValue >::importWithColorFunctor(), DGtal::GenericReader< TContainer, 2, DGtal::uint32_t >::importWithColorFunctor(), and testPNMReader().