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