DGtal  0.9.3beta
DigitalTopology.h
1 
17 #pragma once
18 
31 #if defined(DigitalTopology_RECURSES)
32 #error Recursive header files inclusion detected in DigitalTopology.h
33 #else // defined(DigitalTopology_RECURSES)
34 
35 #define DigitalTopology_RECURSES
36 
37 #if !defined DigitalTopology_h
38 
39 #define DigitalTopology_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "DGtal/base/ConstAlias.h"
46 #include "DGtal/topology/CAdjacency.h"
48 
49 namespace DGtal
50 {
51 
57  JORDAN_DT = 2 };
58 
60  // template class DigitalTopology
94  template <typename TForegroundAdjacency, typename TBackgroundAdjacency>
96  {
97  // ----------------------- Standard services ------------------------------
98  public:
99  typedef TForegroundAdjacency ForegroundAdjacency;
100  typedef TBackgroundAdjacency BackgroundAdjacency;
101  typedef typename ForegroundAdjacency::Point Point;
102  // should be the same as Point.
103  typedef typename BackgroundAdjacency::Point BackPoint;
104 
107 
113 
114 
130 
135 
140  DigitalTopology ( const DigitalTopology & other );
141 
142 
146  const ForegroundAdjacency & kappa() const;
147 
151  const BackgroundAdjacency & lambda() const;
152 
158 
164 
165  // ----------------------- Interface --------------------------------------
166  public:
167 
172  void selfDisplay ( std::ostream & out ) const;
173 
178  bool isValid() const;
179 
180  // ------------------------- Protected Datas ------------------------------
181  private:
182  // ------------------------- Private Datas --------------------------------
183  private:
188  const ForegroundAdjacency & myKappa;
189 
194  const BackgroundAdjacency & myLambda;
195 
201 
202  // ------------------------- Hidden services ------------------------------
203  protected:
204 
209  DigitalTopology();
210 
211  private:
212 
219  DigitalTopology & operator= ( const DigitalTopology & other );
220 
221  // ------------------------- Internals ------------------------------------
222  private:
223 
224  }; // end of class DigitalTopology
225 
226 
233  template <typename TForegroundAdjacency, typename TBackgroundAdjacency>
234  std::ostream&
235  operator<< ( std::ostream & out,
237 
238 } // namespace DGtal
239 
240 
242 // Includes inline functions.
243 #include "DGtal/topology/DigitalTopology.ih"
244 
245 // //
247 
248 #endif // !defined DigitalTopology_h
249 
250 #undef DigitalTopology_RECURSES
251 #endif // else defined(DigitalTopology_RECURSES)
const ForegroundAdjacency & myKappa
BOOST_CONCEPT_ASSERT((concepts::CAdjacency< ForegroundAdjacency >))
void selfDisplay(std::ostream &out) const
TForegroundAdjacency ForegroundAdjacency
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition: ConstAlias.h:186
DigitalTopologyProperties properties() const
DigitalTopology< BackgroundAdjacency, ForegroundAdjacency > ReverseTopology
BackgroundAdjacency::Point BackPoint
bool isValid() const
DigitalTopology & operator=(const DigitalTopology &other)
ReverseTopology reverseTopology() const
Aim: The concept CAdjacency defines an elementary adjacency relation between points of a digital spac...
Definition: CAdjacency.h:99
const BackgroundAdjacency & myLambda
DigitalTopologyProperties
TBackgroundAdjacency BackgroundAdjacency
Aim: Represents a digital topology as a couple of adjacency relations.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
DGtal is the top-level namespace which contains all DGtal functions and types.
ForegroundAdjacency::Point Point
const ForegroundAdjacency & kappa() const
const BackgroundAdjacency & lambda() const
const DigitalTopologyProperties myProps