32 #include "DGtal/base/Common.h"
33 #include "DGtal/helpers/StdDefs.h"
34 #include "DGtal/io/boards/Board2D.h"
35 #include "DGtal/io/readers/PNMReader.h"
36 #include "DGtal/images/ImageSelector.h"
37 #include "DGtal/images/imagesSetsUtils/SetFromImage.h"
38 #include "ConfigTest.h"
43 using namespace DGtal;
54 unsigned int nbok = 0;
59 std::string filename = testPath +
"samples/circleR10.pgm";
61 trace.
info() <<
"Loading filename: "<< filename<<std::endl;
70 board << image.domain() << set2d;
72 board.
saveEPS(
"testPNMReader.eps");
73 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
74 <<
"true == true" << std::endl;
82 bool testPNM3DReader()
84 unsigned int nbok = 0;
89 std::string filename = testPath +
"samples/simple.pgm3d";
91 trace.
info() <<
"Loading filename: "<< filename<<std::endl;
96 trace.
info() <<
"Image 3D = "<<image<<std::endl;
98 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
99 <<
"true == true" << std::endl;
107 int main(
int argc,
char** argv )
111 for (
int i = 0; i < argc; ++i )
115 bool res = testPNMReader() && testPNM3DReader();
116 trace.
emphase() << ( res ?
"Passed." :
"Error." ) << endl;