DGtal
1.1.0
src
DGtal
topology
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)
34
35
#define DigitalTopologyTraits_RECURSES
36
37
#if !defined DigitalTopologyTraits_h
38
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>
73
struct
DigitalTopologyTraits
74
{
75
// ----------------------- Specific traits ------------------------------
76
public
:
77
static
const
Dimension
GEODESIC_NEIGHBORHOOD_SIZE
=
dim
;
78
};
// end of class DigitalTopologyTraits
79
83
template
<
typename
TSpace>
84
struct
DigitalTopologyTraits
<
MetricAdjacency
< TSpace, 1>,
85
MetricAdjacency
< TSpace, 2>,
86
2 >
87
{
88
// ----------------------- Specific traits ------------------------------
89
public
:
90
static
const
Dimension
GEODESIC_NEIGHBORHOOD_SIZE
= 2;
91
};
92
96
template
<
typename
TSpace>
97
struct
DigitalTopologyTraits
<
MetricAdjacency
< TSpace, 2>,
98
MetricAdjacency
< TSpace, 1>,
99
2 >
100
{
101
// ----------------------- Specific traits ------------------------------
102
public
:
103
static
const
Dimension
GEODESIC_NEIGHBORHOOD_SIZE
= 2;
104
};
105
109
template
<
typename
TSpace>
110
struct
DigitalTopologyTraits
<
MetricAdjacency
< TSpace, 1>,
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>
123
struct
DigitalTopologyTraits
<
MetricAdjacency
< TSpace, 1>,
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>
136
struct
DigitalTopologyTraits
<
MetricAdjacency
< TSpace, 2>,
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>
149
struct
DigitalTopologyTraits
<
MetricAdjacency
< TSpace, 3>,
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)
DGtal::Dimension
DGtal::uint32_t Dimension
Definition:
Common.h:133
dim
unsigned int dim(const Vector &z)
Definition:
viewDualSurface.cpp:174
DGtal::DigitalTopologyTraits::GEODESIC_NEIGHBORHOOD_SIZE
static const Dimension GEODESIC_NEIGHBORHOOD_SIZE
Definition:
DigitalTopologyTraits.h:77
DGtal::MetricAdjacency
Aim: Describes digital adjacencies in digital spaces that are defined with the 1-norm and the infinit...
Definition:
MetricAdjacency.h:80
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition:
ClosedIntegerHalfPlane.h:49
DGtal::DigitalTopologyTraits
Aim: the traits classes for DigitalTopology types.
Definition:
DigitalTopologyTraits.h:74
Generated on Fri Oct 9 2020 08:57:51 for DGtal by
1.8.20