DGtal  1.0.0
AreaSurfaceEstimation-template.cpp
1 
4 #include "DGtal/shapes/parametric/Ball3D.h"
5 
7 
9 #include "DGtal/shapes/GaussDigitizer.h"
10 #include "DGtal/topology/LightImplicitDigitalSurface.h"
11 #include "DGtal/topology/DigitalSurface.h"
12 #include "DGtal/graph/DepthFirstVisitor.h"
13 #include "DGtal/graph/GraphVisitorRange.h"
14 
16 #include "DGtal/geometry/surfaces/estimation/IIGeometricFunctors.h"
17 #include "DGtal/geometry/surfaces/estimation/IntegralInvariantCovarianceEstimator.h"
18 
19 using namespace DGtal;
21 
22 int main( int argc, char** argv )
23 {
24  const double h = 1;
25  const double radiusBall = 12.0;
26  const double radiusII = 6;
27  const double trueAreaSurface = 4.0*M_PI*radiusBall*radiusBall;
28  double areaSurfaceEstimated = 0.0;
29 
30  trace.beginBlock( "Make parametric shape..." );
31 
32 
33  trace.endBlock();
34 
35  trace.beginBlock( "Make digital shape..." );
36 
37 
38  trace.endBlock();
39 
40  trace.beginBlock( "Make digital surface..." );
41 
42 
43  trace.endBlock();
44 
45  trace.beginBlock( "Computation with normal estimation ..." );
46 
47 
48  trace.endBlock();
49 
50  trace.info() << "Area Surface estimated : " << areaSurfaceEstimated << std::endl;
51  trace.info() << "True areaSurface : " << trueAreaSurface << std::endl;
52  trace.info() << "Ratio : " << areaSurfaceEstimated / trueAreaSurface << std::endl;
53 
54  return 0;
55 }
void beginBlock(const std::string &keyword="")
Trace trace
Definition: Common.h:144
double endBlock()
int main(int argc, char **argv)
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & info()