DGtal  1.3.beta
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)
34 
35 #define BasicEstimatorFromSurfelsFunctors_RECURSES
36 
37 #if !defined BasicEstimatorFromSurfelsFunctors_h
38 
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)
DGtal::ConstAlias
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition: ConstAlias.h:186
DGtal::functors::DummyEstimatorFromSurfels::eval
Quantity eval() const
Definition: BasicEstimatorFromSurfelsFunctors.h:103
DGtal::functors::DummyEstimatorFromSurfels::myH
double myH
Grid step.
Definition: BasicEstimatorFromSurfelsFunctors.h:127
DGtal::NumberTraits
Aim: The traits class for all models of Cinteger.
Definition: NumberTraits.h:562
DGtal::functors::DummyEstimatorFromSurfels::~DummyEstimatorFromSurfels
~DummyEstimatorFromSurfels()
Definition: BasicEstimatorFromSurfelsFunctors.h:85
DGtal::functors::DummyEstimatorFromSurfels::myEmbedder
const SCellEmbedder * myEmbedder
ConstAlias of the Embedder.
Definition: BasicEstimatorFromSurfelsFunctors.h:121
DGtal::functors::DummyEstimatorFromSurfels::myCpt
Quantity myCpt
Surfel counter.
Definition: BasicEstimatorFromSurfelsFunctors.h:124
DGtal::functors::DummyEstimatorFromSurfels::DummyEstimatorFromSurfels
DummyEstimatorFromSurfels()
DGtal::functors::DummyEstimatorFromSurfels::Quantity
int Quantity
Type of output values.
Definition: BasicEstimatorFromSurfelsFunctors.h:67
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::functors::DummyEstimatorFromSurfels::Surfel
TSurfel Surfel
Surfel type.
Definition: BasicEstimatorFromSurfelsFunctors.h:59
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
Definition: BasicEstimatorFromSurfelsFunctors.h:54
DGtal::functors::DummyEstimatorFromSurfels::reset
void reset()
Definition: BasicEstimatorFromSurfelsFunctors.h:108
DGtal::functors::DummyEstimatorFromSurfels::pushSurfel
void pushSurfel(const Surfel &aSurfel, const double aDistance)
Definition: BasicEstimatorFromSurfelsFunctors.h:91
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:97
DGtal::functors::DummyEstimatorFromSurfels::SCellEmbedder
TSCellEmbedder SCellEmbedder
Embedder type.
Definition: BasicEstimatorFromSurfelsFunctors.h:62