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;
71 std::string filename = testPath +
"samples/cat10.vol";
85 trace.
info() <<
"Number of points with (val!=0) = "<<nbval<<endl;
87 nbok += ( nbval == 8043) ? 1 : 0;
92 nbok += ( true ) ? 1 : 0;
95 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
96 <<
"true == true" << std::endl;
103 bool testIOException()
105 unsigned int nbok = 0;
117 std::string filename = testPath +
"samples/null.vol";
124 trace.
info() <<
"Exception catched. Message : "<< e.what()<<endl;
129 nbok += ( true ) ? 1 : 0;
132 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
133 <<
"true == true" << std::endl;
139 bool testConsistence()
145 typedef TDomain::Point Point;
149 TDomain domain(Point(-17,-14,-13), Point(5,7,11));
164 if( image.
domain().lowerBound() != image2.
domain().lowerBound()
165 || image.
domain().upperBound() != image2.
domain().upperBound() )
175 int main(
int argc,
char** argv )
178 std::cout << aaaaa << std::endl;
182 for (
int i = 0; i < argc; ++i )
186 bool res = testVolReader() && testIOException() && testConsistence();
187 trace.
emphase() << ( res ?
"Passed." :
"Error." ) << endl;
void beginBlock(const std::string &keyword="")
Aim: implements association bewteen points lying in a digital domain and values.
Aim: SpaceND is a utility class that defines the fundamental structure of a Digital Space in ND...
Aim: Export a 3D Image using the Vol formats.
Aim: Parallelepidec region of a digital space, model of a 'CDomain'.
Aim: implements methods to read a "Vol" file format.
DGtal is the top-level namespace which contains all DGtal functions and types.
std::vector< Value >::const_iterator ConstIterator
const Domain & domain() const