DGtal  1.4.2
BasicEstimatorFromSurfelsFunctors.h
1 
17 #pragma once
18 
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>
55  {
56  public:
57 
59  typedef TSurfel Surfel;
60 
62  typedef TSCellEmbedder SCellEmbedder;
63 
65 
67  typedef int Quantity;
68 
76  const double h):
77  myEmbedder(&anEmbedder), myH(h)
78  {
79  myCpt=0;
80  }
81 
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  {
111  }
112 
113  private:
114 
119 
122 
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)
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition: ConstAlias.h:187
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: The traits class for all models of Cinteger.
Definition: NumberTraits.h:564
Aim: A cell embedder is a mapping from signed cells to Euclidean points. It adds inner types to funct...
BOOST_CONCEPT_ASSERT((concepts::CSCellEmbedder< SCellEmbedder >))
DummyEstimatorFromSurfels(ConstAlias< SCellEmbedder > anEmbedder, const double h)
void pushSurfel(const Surfel &aSurfel, const double aDistance)
const SCellEmbedder * myEmbedder
ConstAlias of the Embedder.