DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
BasicEstimatorFromSurfelsFunctors.h
1
16
17
#pragma once
18
30
31
#if defined(BasicEstimatorFromSurfelsFunctors_RECURSES)
32
#error Recursive header files inclusion detected in BasicEstimatorFromSurfelsFunctors.h
33
#else
// defined(BasicEstimatorFromSurfelsFunctors_RECURSES)
35
#define BasicEstimatorFromSurfelsFunctors_RECURSES
36
37
#if !defined BasicEstimatorFromSurfelsFunctors_h
39
#define BasicEstimatorFromSurfelsFunctors_h
40
42
// Inclusions
43
#include <iostream>
44
#include "DGtal/base/Common.h"
45
#include "DGtal/kernel/NumberTraits.h"
46
#include "DGtal/topology/CSCellEmbedder.h"
48
49
namespace
DGtal
50
{
51
namespace
functors
52
{
53
template
<
typename
TSurfel,
typename
TSCellEmbedder>
54
struct
DummyEstimatorFromSurfels
55
{
56
public
:
57
59
typedef
TSurfel
Surfel
;
60
62
typedef
TSCellEmbedder
SCellEmbedder
;
63
64
BOOST_CONCEPT_ASSERT
((
concepts::CSCellEmbedder<SCellEmbedder>
));
65
67
typedef
int
Quantity
;
68
75
DummyEstimatorFromSurfels
(
ConstAlias<SCellEmbedder>
anEmbedder ,
76
const
double
h):
77
myEmbedder
(&anEmbedder),
myH
(h)
78
{
79
myCpt
=0;
80
}
81
85
~DummyEstimatorFromSurfels
() {}
86
91
void
pushSurfel
(
const
Surfel
&aSurfel,
92
const
double
aDistance)
93
{
94
BOOST_VERIFY(aDistance == aDistance);
95
BOOST_VERIFY(aSurfel == aSurfel);
96
97
myCpt
++;
98
}
99
103
Quantity
eval
( )
const
{
return
myCpt
; }
104
108
void
reset
()
109
{
110
myCpt
=
NumberTraits<Quantity>::ZERO
;
111
}
112
113
private
:
114
118
DummyEstimatorFromSurfels
();
119
121
const
SCellEmbedder
*
myEmbedder
;
122
124
Quantity
myCpt
;
125
127
double
myH
;
128
};
129
}
130
131
}
// namespace DGtal
132
133
134
135
#endif
// !defined BasicEstimatorFromSurfelsFunctors_h
136
137
#undef BasicEstimatorFromSurfelsFunctors_RECURSES
138
#endif
// else defined(BasicEstimatorFromSurfelsFunctors_RECURSES)
DGtal::ConstAlias
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition
ConstAlias.h:187
DGtal::functors
functors namespace gathers all DGtal functors.
Definition
BasicBoolFunctors.h:49
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
DGtal::NumberTraitsImpl< std::decay< T >::type >::ZERO
static const T ZERO
Definition
NumberTraits.h:100
DGtal::concepts::CSCellEmbedder
Aim: A cell embedder is a mapping from signed cells to Euclidean points. It adds inner types to funct...
Definition
CSCellEmbedder.h:98
DGtal::functors::DummyEstimatorFromSurfels::eval
Quantity eval() const
Definition
BasicEstimatorFromSurfelsFunctors.h:103
DGtal::functors::DummyEstimatorFromSurfels::SCellEmbedder
TSCellEmbedder SCellEmbedder
Embedder type.
Definition
BasicEstimatorFromSurfelsFunctors.h:62
DGtal::functors::DummyEstimatorFromSurfels::~DummyEstimatorFromSurfels
~DummyEstimatorFromSurfels()
Definition
BasicEstimatorFromSurfelsFunctors.h:85
DGtal::functors::DummyEstimatorFromSurfels::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CSCellEmbedder< SCellEmbedder >))
DGtal::functors::DummyEstimatorFromSurfels::DummyEstimatorFromSurfels
DummyEstimatorFromSurfels(ConstAlias< SCellEmbedder > anEmbedder, const double h)
Definition
BasicEstimatorFromSurfelsFunctors.h:75
DGtal::functors::DummyEstimatorFromSurfels::pushSurfel
void pushSurfel(const Surfel &aSurfel, const double aDistance)
Definition
BasicEstimatorFromSurfelsFunctors.h:91
DGtal::functors::DummyEstimatorFromSurfels::myEmbedder
const SCellEmbedder * myEmbedder
ConstAlias of the Embedder.
Definition
BasicEstimatorFromSurfelsFunctors.h:121
DGtal::functors::DummyEstimatorFromSurfels::Quantity
int Quantity
Type of output values.
Definition
BasicEstimatorFromSurfelsFunctors.h:67
DGtal::functors::DummyEstimatorFromSurfels::Surfel
TSurfel Surfel
Surfel type.
Definition
BasicEstimatorFromSurfelsFunctors.h:59
DGtal::functors::DummyEstimatorFromSurfels::myH
double myH
Grid step.
Definition
BasicEstimatorFromSurfelsFunctors.h:127
DGtal::functors::DummyEstimatorFromSurfels::myCpt
Quantity myCpt
Surfel counter.
Definition
BasicEstimatorFromSurfelsFunctors.h:124
DGtal::functors::DummyEstimatorFromSurfels::DummyEstimatorFromSurfels
DummyEstimatorFromSurfels()
DGtal::functors::DummyEstimatorFromSurfels::reset
void reset()
Definition
BasicEstimatorFromSurfelsFunctors.h:108
src
DGtal
geometry
surfaces
estimation
estimationFunctors
BasicEstimatorFromSurfelsFunctors.h
Generated on
for DGtal by
1.18.0