DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
DGtal/shapes/Shapes.h
1
16
17
#pragma once
18
30
31
#if defined(Shapes_RECURSES)
32
#error Recursive header files inclusion detected in Shapes.h
33
#else
// defined(Shapes_RECURSES)
35
#define Shapes_RECURSES
36
37
#if !defined Shapes_h
39
#define Shapes_h
40
42
// Inclusions
43
#include <iostream>
44
#include "DGtal/base/Common.h"
45
#include "DGtal/kernel/NumberTraits.h"
46
#include "DGtal/kernel/domains/CDomain.h"
47
#include "DGtal/kernel/domains/HyperRectDomain.h"
48
#include "DGtal/topology/KhalimskySpaceND.h"
49
#include "DGtal/topology/SurfelAdjacency.h"
50
#include "DGtal/topology/helpers/Surfaces.h"
51
#include "DGtal/shapes/CDigitalOrientedShape.h"
52
#include "DGtal/shapes/CDigitalBoundedShape.h"
53
#include "DGtal/shapes/CEuclideanOrientedShape.h"
54
#include "DGtal/shapes/CEuclideanBoundedShape.h"
55
#include "DGtal/shapes/GaussDigitizer.h"
57
58
namespace
DGtal
59
{
60
62
// template class Shapes
70
template
<
typename
TDomain>
71
class
Shapes
72
{
73
// Concept checks
74
BOOST_CONCEPT_ASSERT
((
concepts::CDomain<TDomain>
) );
75
76
// ----------------------- public types ------------------------------
77
public
:
78
typedef
TDomain
Domain
;
79
typedef
typename
Domain::Space
Space
;
80
typedef
typename
Domain::Space::RealPoint
RealPoint
;
81
typedef
typename
Domain::Point
Point
;
82
typedef
typename
Domain::Vector
Vector
;
83
typedef
typename
Domain::Predicate
Predicate
;
84
typedef
typename
Domain::ConstIterator
ConstIterator
;
85
//Arithmetic
86
typedef
typename
Space::Integer
Integer
;
87
typedef
typename
Space::UnsignedInteger
UnsignedInteger
;
88
89
// ----------------------- Static services ------------------------------
90
public
:
91
104
template
<
typename
TDigitalSet,
typename
TShapeFunctor>
105
static
void
digitalShaper
( TDigitalSet & aSet,
106
const
TShapeFunctor & aFunctor);
107
123
template
<
typename
TDigitalSet,
typename
TShapeFunctor>
124
static
void
euclideanShaper
( TDigitalSet & aSet,
125
const
TShapeFunctor & aFunctor,
126
const
double
h = 1.0);
127
141
template
<
typename
DigitalSet,
typename
Po
int
Predicate >
142
static
143
void
makeSetFromPointPredicate
(
DigitalSet
& aSet,
144
const
PointPredicate & aPP );
145
146
157
template
<
typename
TDigitalSet>
158
static
void
addNorm1Ball
( TDigitalSet & aSet,
159
const
Point
& aCenter,
160
UnsignedInteger
aRadius );
161
172
template
<
typename
TDigitalSet>
173
static
void
addNorm2Ball
( TDigitalSet & aSet,
174
const
Point
& aCenter,
175
UnsignedInteger
aRadius );
176
186
template
<
typename
TDigitalSet>
187
static
void
removeNorm1Ball
( TDigitalSet & aSet,
188
const
Point
& aCenter,
189
UnsignedInteger
aRadius );
190
200
template
<
typename
TDigitalSet>
201
static
void
removeNorm2Ball
( TDigitalSet & aSet,
202
const
Point
& aCenter,
203
UnsignedInteger
aRadius );
204
205
206
// ----------------------- Standard services ------------------------------
207
public
:
208
212
~Shapes
();
213
214
// ----------------------- Interface --------------------------------------
215
public
:
216
221
void
selfDisplay
( std::ostream & out )
const
;
222
227
bool
isValid
()
const
;
228
229
// ------------------------- Protected Data ------------------------------
230
private
:
231
// ------------------------- Private Data --------------------------------
232
private
:
233
234
// ------------------------- Hidden services ------------------------------
235
protected
:
236
241
Shapes
();
242
243
private
:
244
250
Shapes
(
const
Shapes
& other );
251
258
Shapes
&
operator=
(
const
Shapes
& other );
259
260
// ------------------------- Internals ------------------------------------
261
private
:
262
263
};
// end of class Shapes
264
265
272
template
<
typename
TDomain>
273
std::ostream&
274
operator<<
( std::ostream & out,
const
Shapes<TDomain>
&
object
);
275
276
}
// namespace DGtal
277
278
280
// Includes inline functions.
281
#include "DGtal/shapes/Shapes.ih"
282
283
// //
285
286
#endif
// !defined Shapes_h
287
288
#undef Shapes_RECURSES
289
#endif
// else defined(Shapes_RECURSES)
DGtal::HyperRectDomain< Space >::Vector
Space::Vector Vector
Definition
HyperRectDomain.h:115
DGtal::HyperRectDomain< Space >::Predicate
functors::IsWithinPointPredicate< Point > Predicate
Definition
HyperRectDomain.h:128
DGtal::HyperRectDomain< Space >::Space
Space Space
Definition
HyperRectDomain.h:110
DGtal::HyperRectDomain< Space >::ConstIterator
Iterator ConstIterator
Definition
HyperRectDomain.h:125
DGtal::HyperRectDomain< Space >::Point
Space::Point Point
Definition
HyperRectDomain.h:113
DGtal::Shapes
Aim: A utility class for constructing different shapes (balls, diamonds, and others).
Definition
DGtal/shapes/Shapes.h:72
DGtal::Shapes::~Shapes
~Shapes()
DGtal::Shapes::Integer
Space::Integer Integer
Definition
DGtal/shapes/Shapes.h:86
DGtal::Shapes::RealPoint
Domain::Space::RealPoint RealPoint
Definition
DGtal/shapes/Shapes.h:80
DGtal::Shapes::Predicate
Domain::Predicate Predicate
Definition
DGtal/shapes/Shapes.h:83
DGtal::Shapes::addNorm1Ball
static void addNorm1Ball(TDigitalSet &aSet, const Point &aCenter, UnsignedInteger aRadius)
DGtal::Shapes::Shapes
Shapes()
DGtal::Shapes::Space
Domain::Space Space
Definition
DGtal/shapes/Shapes.h:79
DGtal::Shapes::makeSetFromPointPredicate
static void makeSetFromPointPredicate(DigitalSet &aSet, const PointPredicate &aPP)
DGtal::Shapes::removeNorm1Ball
static void removeNorm1Ball(TDigitalSet &aSet, const Point &aCenter, UnsignedInteger aRadius)
DGtal::Shapes::UnsignedInteger
Space::UnsignedInteger UnsignedInteger
Definition
DGtal/shapes/Shapes.h:87
DGtal::Shapes::euclideanShaper
static void euclideanShaper(TDigitalSet &aSet, const TShapeFunctor &aFunctor, const double h=1.0)
DGtal::Shapes::Vector
Domain::Vector Vector
Definition
DGtal/shapes/Shapes.h:82
DGtal::Shapes::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CDomain< TDomain >))
DGtal::Shapes::selfDisplay
void selfDisplay(std::ostream &out) const
DGtal::Shapes::Domain
TDomain Domain
Definition
DGtal/shapes/Shapes.h:78
DGtal::Shapes::addNorm2Ball
static void addNorm2Ball(TDigitalSet &aSet, const Point &aCenter, UnsignedInteger aRadius)
DGtal::Shapes::operator=
Shapes & operator=(const Shapes &other)
DGtal::Shapes::Shapes
Shapes(const Shapes &other)
DGtal::Shapes::removeNorm2Ball
static void removeNorm2Ball(TDigitalSet &aSet, const Point &aCenter, UnsignedInteger aRadius)
DGtal::Shapes::ConstIterator
Domain::ConstIterator ConstIterator
Definition
DGtal/shapes/Shapes.h:84
DGtal::Shapes::digitalShaper
static void digitalShaper(TDigitalSet &aSet, const TShapeFunctor &aFunctor)
DGtal::Shapes::Point
Domain::Point Point
Definition
DGtal/shapes/Shapes.h:81
DGtal::Shapes::isValid
bool isValid() const
DGtal::SpaceND< 3, Integer >::Integer
Integer Integer
Definition
SpaceND.h:102
DGtal::SpaceND< 3, Integer >::UnsignedInteger
NumberTraits< Integer >::UnsignedVersion UnsignedInteger
Definition
SpaceND.h:104
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
DGtal::operator<<
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
DGtal::concepts::CDomain
Aim: This concept represents a digital domain, i.e. a non mutable subset of points of the given digit...
Definition
CDomain.h:130
DigitalSet
Z2i::DigitalSet DigitalSet
Definition
testVoronoiMapComplete.cpp:40
src
DGtal
shapes
Shapes.h
Generated on
for DGtal by
1.18.0