DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
AreaSurfaceEstimation-template.cpp
1
3
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
}
DGtal::Trace::beginBlock
void beginBlock(const std::string &keyword="")
DGtal::Trace::info
std::ostream & info()
DGtal::Trace::endBlock
double endBlock()
radiusII
float radiusII
Definition
dgtalCalculus-geodesic.cpp:78
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
DGtal::trace
Trace trace
main
int main(int, char **)
Definition
testIntegerComputer.cpp:331
examples
tutorial-examples
AreaSurfaceEstimation-template.cpp
Generated on
for DGtal by
1.18.0