DGtal
0.6.devel
Main Page
Related Pages
Modules
Namespaces
Data Structures
Examples
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
src
DGtal
shapes
GaussDigitizer.h
1
17
#pragma once
18
34
#if defined(GaussDigitizer_RECURSES)
35
#error Recursive header files inclusion detected in GaussDigitizer.h
36
#else // defined(GaussDigitizer_RECURSES)
37
38
#define GaussDigitizer_RECURSES
39
40
#if !defined GaussDigitizer_h
41
42
#define GaussDigitizer_h
43
45
// Inclusions
46
#include <iostream>
47
#include "DGtal/base/Common.h"
48
#include "DGtal/kernel/domains/HyperRectDomain.h"
49
#include "DGtal/kernel/RegularPointEmbedder.h"
50
#include "DGtal/shapes/CEuclideanOrientedShape.h"
51
#include "DGtal/shapes/CEuclideanBoundedShape.h"
52
54
55
namespace
DGtal
56
{
57
59
// template class GaussDigitizer
76
template
<
typename
TSpace,
typename
TEucl
id
eanShape>
77
class
GaussDigitizer
78
{
79
// ----------------------- Standard services ------------------------------
80
public
:
81
typedef
TSpace
Space
;
82
typedef
typename
Space::Integer
Integer
;
83
typedef
typename
Space::Point
Point
;
84
typedef
typename
Space::Vector
Vector
;
85
typedef
typename
Space::RealPoint
RealPoint
;
86
typedef
typename
Space::RealPoint
RealVector
;
87
typedef
TEuclideanShape
EuclideanShape
;
88
typedef
HyperRectDomain<Space>
Domain
;
89
typedef
RegularPointEmbedder<Space>
PointEmbedder
;
90
91
// JOL: GaussDigitizer do not need a bounded shape.
92
// BOOST_CONCEPT_ASSERT(( CEuclideanBoundedShape<TEuclideanShape> ));
93
94
BOOST_CONCEPT_ASSERT
((
CEuclideanOrientedShape<TEuclideanShape>
));
95
96
100
~GaussDigitizer
();
101
105
GaussDigitizer
();
106
112
GaussDigitizer
&
operator=
(
const
GaussDigitizer
& other );
113
117
void
attach
(
const
EuclideanShape
& shape );
118
131
void
init
(
const
RealPoint
& xLow,
const
RealPoint
& xUp,
132
typename
RealVector::Component gridStep );
133
145
void
init
(
const
RealPoint
& xLow,
const
RealPoint
& xUp,
146
const
RealVector
&
gridSteps
);
147
151
const
PointEmbedder
&
pointEmbedder
()
const
;
152
157
Domain
getDomain
()
const
;
158
163
Point
floor
(
const
RealPoint
& p )
const
;
164
169
Point
ceil
(
const
RealPoint
& p )
const
;
170
177
Point
round
(
const
RealPoint
& p )
const
;
178
186
RealPoint
embed
(
const
Point
& p )
const
;
187
196
Orientation
orientation
(
const
Point
&p)
const
197
{
198
return
myEShape
->orientation(
embed
(p));
199
}
200
207
bool
operator()
(
const
Point
& p )
const
;
208
213
const
Point
&
getLowerBound
()
const
;
214
219
const
Point
&
getUpperBound
()
const
;
220
224
Vector
resolution
()
const
;
225
229
RealVector
gridSteps
()
const
;
230
231
232
// ----------------------- Interface --------------------------------------
233
public
:
234
239
void
selfDisplay
( std::ostream & out )
const
;
240
245
bool
isValid
()
const
;
246
247
// ------------------------- Protected Datas ------------------------------
248
protected
:
250
const
EuclideanShape
*
myEShape
;
251
253
RegularPointEmbedder<Space>
myPointEmbedder
;
254
256
Point
myLowerPoint
;
257
259
Point
myUpperPoint
;
260
// ------------------------- Private Datas --------------------------------
261
private
:
262
263
// ------------------------- Hidden services ------------------------------
264
private
:
265
266
// ------------------------- Internals ------------------------------------
267
private
:
268
269
};
// end of class GaussDigitizer
270
271
278
template
<
typename
TSpace,
typename
TEucl
id
eanShape>
279
std::ostream&
280
operator<<
( std::ostream & out,
281
const
GaussDigitizer<TSpace,TEuclideanShape>
&
object
);
282
283
}
// namespace DGtal
284
285
287
// Includes inline functions.
288
#include "DGtal/shapes/GaussDigitizer.ih"
289
290
// //
292
293
#endif // !defined GaussDigitizer_h
294
295
#undef GaussDigitizer_RECURSES
296
#endif // else defined(GaussDigitizer_RECURSES)
Generated on Wed Dec 19 2012 19:10:24 for DGtal by
1.8.1.1