32 #include "DGtal/base/Common.h"
33 #include "DGtal/kernel/SpaceND.h"
34 #include "DGtal/kernel/domains/HyperRectDomain.h"
35 #include "DGtal/images/ImageSelector.h"
36 #include "DGtal/io/readers/VolReader.h"
37 #include "DGtal/io/colormaps/HueShadeColorMap.h"
38 #include "DGtal/io/colormaps/GrayscaleColorMap.h"
39 #include "DGtal/io/colormaps/GradientColorMap.h"
40 #include "DGtal/io/colormaps/ColorBrightnessColorMap.h"
41 #include "DGtal/io/writers/VolWriter.h"
43 #include "ConfigTest.h"
48 using namespace DGtal;
59 unsigned int nbok = 0;
66 typedef TDomain::Point
Point;
72 std::string filename = testPath +
"samples/cat10.vol";
86 trace.
info() <<
"Number of points with (val!=0) = "<<nbval<<endl;
88 nbok += ( nbval == 8043) ? 1 : 0;
93 nbok += ( true ) ? 1 : 0;
96 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
97 <<
"true == true" << std::endl;
104 bool testIOException()
106 unsigned int nbok = 0;
113 typedef TDomain::Point Point;
119 std::string filename = testPath +
"samples/null.vol";
126 trace.
info() <<
"Exception catched. Message : "<< e.what()<<endl;
131 nbok += ( true ) ? 1 : 0;
134 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
135 <<
"true == true" << std::endl;
144 int main(
int argc,
char** argv )
148 for (
int i = 0; i < argc; ++i )
152 bool res = testVolReader() && testIOException();
153 trace.
emphase() << ( res ?
"Passed." :
"Error." ) << endl;