DGtal  1.5.beta
DigitalTopologyTraits.h
1 
17 #pragma once
18 
31 #if defined(DigitalTopologyTraits_RECURSES)
32 #error Recursive header files inclusion detected in DigitalTopologyTraits.h
33 #else // defined(DigitalTopologyTraits_RECURSES)
35 #define DigitalTopologyTraits_RECURSES
36 
37 #if !defined DigitalTopologyTraits_h
39 #define DigitalTopologyTraits_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "DGtal/topology/MetricAdjacency.h"
47 
48 namespace DGtal
49 {
50 
52  // template class DigitalTopologyTraits
72  template <typename TForegroundAdjacency, typename TBackgroundAdjacency, Dimension dim>
74  {
75  // ----------------------- Specific traits ------------------------------
76  public:
78  }; // end of class DigitalTopologyTraits
79 
83  template <typename TSpace>
85  MetricAdjacency< TSpace, 2>,
86  2 >
87  {
88  // ----------------------- Specific traits ------------------------------
89  public:
91  };
92 
96  template <typename TSpace>
98  MetricAdjacency< TSpace, 1>,
99  2 >
100  {
101  // ----------------------- Specific traits ------------------------------
102  public:
104  };
105 
109  template <typename TSpace>
111  MetricAdjacency< TSpace, 3>,
112  3 >
113  {
114  // ----------------------- Specific traits ------------------------------
115  public:
116  static const Dimension GEODESIC_NEIGHBORHOOD_SIZE = 1; // JOL: 2 does not work ;
117  };
118 
122  template <typename TSpace>
124  MetricAdjacency< TSpace, 2>,
125  3 >
126  {
127  // ----------------------- Specific traits ------------------------------
128  public:
129  static const Dimension GEODESIC_NEIGHBORHOOD_SIZE = 2; // JOL: 3 does not work ;
130  };
131 
135  template <typename TSpace>
137  MetricAdjacency< TSpace, 1>,
138  3 >
139  {
140  // ----------------------- Specific traits ------------------------------
141  public:
142  static const Dimension GEODESIC_NEIGHBORHOOD_SIZE = 3; // JOL: 2 does not work
143  };
144 
148  template <typename TSpace>
150  MetricAdjacency< TSpace, 1>,
151  3 >
152  {
153  // ----------------------- Specific traits ------------------------------
154  public:
155  static const Dimension GEODESIC_NEIGHBORHOOD_SIZE = 2; // JOL: 1 does not work
156  };
157 
158 
159 } // namespace DGtal
160 
161 
162 // //
164 
165 #endif // !defined DigitalTopologyTraits_h
166 
167 #undef DigitalTopologyTraits_RECURSES
168 #endif // else defined(DigitalTopologyTraits_RECURSES)
Aim: Describes digital adjacencies in digital spaces that are defined with the 1-norm and the infinit...
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::uint32_t Dimension
Definition: Common.h:136
Aim: the traits classes for DigitalTopology types.
static const Dimension GEODESIC_NEIGHBORHOOD_SIZE
unsigned int dim(const Vector &z)