DGtal  0.9.2
KanungoNoise.h
1 
17 #pragma once
18 
31 #if defined(KanungoNoise_RECURSES)
32 #error Recursive header files inclusion detected in KanungoNoise.h
33 #else // defined(KanungoNoise_RECURSES)
34 
35 #define KanungoNoise_RECURSES
36 
37 #if !defined KanungoNoise_h
38 
39 #define KanungoNoise_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "DGtal/base/ConstAlias.h"
46 #include "DGtal/base/Clone.h"
47 #include "DGtal/kernel/sets/CDigitalSet.h"
48 #include "DGtal/kernel/sets/DigitalSetBySTLSet.h"
49 #include "DGtal/geometry/volumes/distance/DistanceTransformation.h"
50 #include "DGtal/geometry/volumes/distance/ExactPredicateLpSeparableMetric.h"
51 #include "DGtal/kernel/BasicPointPredicates.h"
52 #include "DGtal/kernel/CPointPredicate.h"
54 
55 namespace DGtal
56 {
57 
59  // template class KanungoNoise
82  template <typename TPointPredicate, typename TDomain,
83  typename TDigitalSetContainer=DigitalSetBySTLSet<TDomain> >
85  {
86  // ----------------------- Standard services ------------------------------
87  public:
88 
93 
95  typedef TPointPredicate PointPredicate;
96 
98  typedef typename TDomain::Point Point;
99 
101  typedef TDomain Domain;
102 
104  typedef TDigitalSetContainer DigitalSet;
105 
116  ConstAlias<Domain> aDomain,
117  const double anAlpha);
118 
122  ~KanungoNoise();
123 
130  KanungoNoise & operator= ( const KanungoNoise & other );
131 
132  // ----------------------- Interface --------------------------------------
133  public:
134 
142  bool operator()(const Point &aPoint) const;
143 
144 
149  void selfDisplay ( std::ostream & out ) const;
150 
155  bool isValid() const;
156 
157  // ------------------------- Hidden services ------------------------------
158  protected:
159 
164  KanungoNoise();
165 
166  private:
167 
173  KanungoNoise ( const KanungoNoise & other );
174 
175  // ------------------------- Internals ------------------------------------
176  private:
178  const PointPredicate &myPredicate;
179 
181  DigitalSet * mySet;
182 
184  const Domain & myDomain;
185 
187  double myAlpha;
188 
189  }; // end of class KanungoNoise
190 
191 
198  template <typename TO, typename TD, typename TS>
199  std::ostream&
200  operator<< ( std::ostream & out, const KanungoNoise<TO,TD,TS> & object );
201 
202 } // namespace DGtal
203 
204 
206 // Includes inline functions.
207 #include "DGtal/geometry/volumes//KanungoNoise.ih"
208 
209 // //
211 
212 #endif // !defined KanungoNoise_h
213 
214 #undef KanungoNoise_RECURSES
215 #endif // else defined(KanungoNoise_RECURSES)
BOOST_CONCEPT_ASSERT((concepts::CDomain< TDomain >))
Concept checks.
DigitalSet * mySet
Explicit set to store the noisfied object points.
Definition: KanungoNoise.h:181
bool isValid() const
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition: ConstAlias.h:186
const PointPredicate & myPredicate
Pointeur to the object.
Definition: KanungoNoise.h:178
TPointPredicate PointPredicate
Object type.
Definition: KanungoNoise.h:95
void selfDisplay(std::ostream &out) const
TDigitalSetContainer DigitalSet
DigitalSet type.
Definition: KanungoNoise.h:104
Aim: This concept represents a digital domain, i.e. a non mutable subset of points of the given digit...
Definition: CDomain.h:129
Aim: Defines a predicate on a point.
Aim: From a point predicate (model of concepts::CPointPredicate), this class constructs another point...
Definition: KanungoNoise.h:84
TDomain::Point Point
Point type.
Definition: KanungoNoise.h:98
bool operator()(const Point &aPoint) const
DGtal is the top-level namespace which contains all DGtal functions and types.
double myAlpha
Noise parameter.
Definition: KanungoNoise.h:187
Aim: Represents a set of points within the given domain. This set of points is modifiable by the user...
Definition: CDigitalSet.h:138
KanungoNoise & operator=(const KanungoNoise &other)
TDomain Domain
Domain type.
Definition: KanungoNoise.h:101
const Domain & myDomain
Pointeur to the domain.
Definition: KanungoNoise.h:184