32 #include "DGtal/base/Common.h"
33 #include "DGtal/images/ImageContainerBySTLVector.h"
34 #include "DGtal/io/readers/GenericReader.h"
35 #include "DGtal/io/writers/GenericWriter.h"
36 #include "DGtal/helpers/StdDefs.h"
37 #include "ConfigTest.h"
42 using namespace DGtal;
53 unsigned int nbok = 0;
62 for(
unsigned int i =0; i< 5; i++){
63 for(
unsigned int j =0; j< 5; j++){
64 for(
unsigned int k =0; k< 5; k++){
70 for(
unsigned int i =0; i< 5; i++){
71 for(
unsigned int j =0; j< 5; j++){
79 for(
unsigned int i =0; i<= 255; i++){
80 for(
unsigned int j =0; j<= 255; j++){
87 std::string filenameImage1 = testPath +
"samples/cat10.pgm3d";
91 trace.
info() <<
"Testing writing PGM3D ... ";
92 bool ok1 = anImportedImage1>>
"testGenericWriter.pgm3d";
98 trace.
info() <<
"Testing writing HDF5 3D ... ";
99 okh5 = anImportedImage1 >>
"testGenericWriter.h5";
101 trace.
info() <<
"Testing writing HDF5 3D (bis) ... ";
106 trace.
info() <<
"Testing writing vol ... ";
107 bool ok2 = anImportedImage1 >>
"testGenericWriter.vol";
109 trace.
info() <<
"Testing writing raw ... ";
110 bool ok3 = anImportedImage1 >>
"testGenericWriter.raw";
112 trace.
info() <<
"Testing writing raw (bis) ... ";
116 std::string filenameImage2 = testPath +
"samples/contourS.pgm";
121 trace.
info() <<
"Testing writing pgm ... ";
122 bool ok4 = anImportedImage2 >>
"testGenericWriter.pgm";
124 trace.
info() <<
"Testing writing raw ... ";
125 bool ok5 = anImportedImage2 >>
"testGenericWriter.raw";
139 nbok += ((ok1 && okh5 && okh5bis && ok2 && ok3 && ok3bis && ok4 && ok5 && ok6 && ok7 && ok8 && ok9) ? 1 : 0);
141 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
142 <<
"true == true" << std::endl;
151 int main(
int argc,
char** argv )
155 for (
int i = 0; i < argc; ++i )
160 trace.
emphase() << ( res ?
"Passed." :
"Error." ) << endl;
Structure representing an RGB triple with alpha component.
void beginBlock(const std::string &keyword="")
DGtal is the top-level namespace which contains all DGtal functions and types.
static TContainer import(const std::string &filename, std::vector< unsigned int > dimSpace=std::vector< unsigned int >())
static bool exportFile(const std::string &filename, const TContainer &anImage, const TFunctor &aFunctor=TFunctor())
int main(int argc, char **argv)