32#include "DGtal/base/Common.h"
33#include "DGtal/helpers/StdDefs.h"
34#include "DGtal/io/boards/Board2D.h"
35#include "DGtal/io/readers/PPMReader.h"
36#include "DGtal/io/readers/PGMReader.h"
37#include "DGtal/images/ImageSelector.h"
38#include "DGtal/images/imagesSetsUtils/SetFromImage.h"
39#include "ConfigTest.h"
56 std::string filename = testPath +
"samples/circleR10.pgm";
58 trace.
info() <<
"Loading filename: "<< filename<<std::endl;
67 board << image.domain() << set2d;
69 board.
saveEPS(
"testPNMReaderPGM.eps");
73 std::string filenamePPM = testPath +
"samples/color64.ppm";
75 trace.
info() <<
"Loading filename: "<< filenamePPM <<std::endl;
84 boardPPM << imagePPM.
domain() << set2dPPM;
86 boardPPM.
saveEPS(
"testPNMReaderPPM.eps");
98 std::string filename = testPath +
"samples/simple.pgm3d";
100 trace.
info() <<
"Loading filename: "<< filename<<std::endl;
105 trace.
info() <<
"Image 3D = "<<image<<std::endl;
114 std::string filename = testPath +
"samples/ascii_ball.pgm3d";
116 trace.
info() <<
"Loading filename: "<< filename<<std::endl;
121 trace.
info() <<
"Image 3D = "<<image<<std::endl;
130int main(
int argc,
char** argv )
134 for (
int i = 0; i < argc; ++i )
139 trace.
emphase() << ( res ?
"Passed." :
"Error." ) << endl;
Aim: This class specializes a 'Board' class so as to display DGtal objects more naturally (with <<)....
Aim: A wrapper class around a STL associative container for storing sets of digital points within som...
Aim: implements association bewteen points lying in a digital domain and values.
const Domain & domain() const
void beginBlock(const std::string &keyword="")
void saveEPS(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
DGtal is the top-level namespace which contains all DGtal functions and types.
ImageContainerBySTLVector< Domain, Value > Type
static ImageContainer importPGM3D(const std::string &aFilename, const Functor &aFunctor=Functor())
static ImageContainer importPGM(const std::string &aFilename, const Functor &aFunctor=Functor(), bool topbotomOrder=true)
static ImageContainer importPPM(const std::string &aFilename, const Functor &aFunctor=functors::ColorRGBEncoder< Value >(), bool topbotomOrder=true)
Aim: Define utilities to convert a digital set into an image.
bool testPNM3DASCIIReader()