31#include "DGtal/base/Common.h"
32#include "DGtal/helpers/StdDefs.h"
33#include "DGtal/io/writers/PPMWriter.h"
34#include "DGtal/io/readers/HDF5Reader.h"
35#include "DGtal/images/ImageSelector.h"
36#include "DGtal/io/colormaps/GrayscaleColorMap.h"
37#include "ConfigTest.h"
49 unsigned int nbok = 0;
55 std::string filename = testPath +
"samples/ex_image2.h5";
57 trace.
info() <<
"Loading filename: " << filename << std::endl;
63 trace.
info() <<
"image8bitFromHDF5image image: " << image << endl;
67 trace.
info() <<
"image24bitFromHDF5image image: " << image << endl;
70 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") " <<
"true == true" << std::endl;
78 unsigned int nbok = 0;
90 std::string filename = testPath +
"samples/cat10.h5";
104 trace.
info() <<
"Number of points with (val!=0) = "<<nbval<<endl;
106 nbok += ( nbval == 8043) ? 1 : 0;
109 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
110 <<
"true == true" << std::endl;
119int main(
int argc,
char** argv )
123 for (
int i = 0; i < argc; ++i )
128 trace.
emphase() << ( res ?
"Passed." :
"Error." ) << endl;
Aim: This class template may be used to (linearly) convert scalar values in a given range into gray l...
Aim: Parallelepidec region of a digital space, model of a 'CDomain'.
std::vector< Value >::const_iterator ConstIterator
Aim: implements association bewteen points lying in a digital domain and values.
void beginBlock(const std::string &keyword="")
DGtal is the top-level namespace which contains all DGtal functions and types.
static ImageContainer importHDF5_3D(const std::string &aFilename, const std::string &aDataset, const Functor &aFunctor=Functor())
static ImageContainer importHDF5(const std::string &aFilename, const std::string &aDataset, const Functor &aFunctor=Functor(), bool topbotomOrder=true)
ImageContainerBySTLVector< Domain, Value > Type
static bool exportPPM(const std::string &filename, const Image &aImage, const Functor &aFunctor=Functor(), bool topbottomOrder=true)