DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
GaussDigitizer.h
1
16
17
#pragma once
18
33
34
#if defined(GaussDigitizer_RECURSES)
35
#error Recursive header files inclusion detected in GaussDigitizer.h
36
#else
// defined(GaussDigitizer_RECURSES)
38
#define GaussDigitizer_RECURSES
39
40
#if !defined GaussDigitizer_h
42
#define GaussDigitizer_h
43
45
// Inclusions
46
#include <iostream>
47
#include "DGtal/base/Common.h"
48
#include "DGtal/base/ConstAlias.h"
49
#include "DGtal/base/CountedConstPtrOrConstPtr.h"
50
#include "DGtal/kernel/domains/HyperRectDomain.h"
51
#include "DGtal/kernel/RegularPointEmbedder.h"
52
#include "DGtal/shapes/CEuclideanOrientedShape.h"
53
#include "DGtal/shapes/CEuclideanBoundedShape.h"
54
56
57
namespace
DGtal
58
{
59
61
// template class GaussDigitizer
78
template
<
typename
TSpace,
typename
TEucl
id
eanShape>
79
class
GaussDigitizer
80
{
81
// ----------------------- Standard services ------------------------------
82
public
:
83
typedef
TSpace
Space
;
84
typedef
typename
Space::Integer
Integer
;
85
typedef
typename
Space::Point
Point
;
86
typedef
typename
Space::Vector
Vector
;
87
typedef
typename
Space::RealPoint
RealPoint
;
88
typedef
typename
Space::RealPoint
RealVector
;
89
typedef
TEuclideanShape
EuclideanShape
;
90
typedef
HyperRectDomain<Space>
Domain
;
91
typedef
RegularPointEmbedder<Space>
PointEmbedder
;
92
93
BOOST_CONCEPT_ASSERT
((
concepts::CEuclideanOrientedShape<TEuclideanShape>
));
94
98
~GaussDigitizer
();
99
103
GaussDigitizer
();
104
110
GaussDigitizer
&
operator=
(
const
GaussDigitizer
& other );
111
115
void
attach
(
ConstAlias<EuclideanShape>
shape );
116
129
void
init
(
const
RealPoint
& xLow,
const
RealPoint
& xUp,
130
typename
RealVector::Component
gridStep );
131
143
void
init
(
const
RealPoint
& xLow,
const
RealPoint
& xUp,
144
const
RealVector
&
gridSteps
);
145
149
const
PointEmbedder
&
pointEmbedder
()
const
;
150
155
Domain
getDomain
()
const
;
156
161
Point
floor
(
const
RealPoint
& p )
const
;
162
167
Point
ceil
(
const
RealPoint
& p )
const
;
168
175
Point
round
(
const
RealPoint
& p )
const
;
176
184
RealPoint
embed
(
const
Point
& p )
const
;
185
194
Orientation
orientation
(
const
Point
&p)
const
195
{
196
return
myEShape
->orientation(
embed
(p));
197
}
198
205
bool
operator()
(
const
Point
& p )
const
;
206
211
const
Point
&
getLowerBound
()
const
;
212
217
const
Point
&
getUpperBound
()
const
;
218
222
Vector
resolution
()
const
;
223
227
RealVector
gridSteps
()
const
;
228
229
230
// ----------------------- Interface --------------------------------------
231
public
:
232
237
void
selfDisplay
( std::ostream & out )
const
;
238
243
bool
isValid
()
const
;
244
245
// ------------------------- Protected Data ------------------------------
246
protected
:
248
CountedConstPtrOrConstPtr<EuclideanShape>
myEShape
;
249
251
RegularPointEmbedder<Space>
myPointEmbedder
;
252
254
Point
myLowerPoint
;
255
257
Point
myUpperPoint
;
258
// ------------------------- Private Data --------------------------------
259
private
:
260
261
// ------------------------- Hidden services ------------------------------
262
private
:
263
264
// ------------------------- Internals ------------------------------------
265
private
:
266
267
};
// end of class GaussDigitizer
268
269
276
template
<
typename
TSpace,
typename
TEucl
id
eanShape>
277
std::ostream&
278
operator<<
( std::ostream & out,
279
const
GaussDigitizer<TSpace,TEuclideanShape>
&
object
);
280
281
}
// namespace DGtal
282
283
285
// Includes inline functions.
286
#include "DGtal/shapes/GaussDigitizer.ih"
287
288
// //
290
291
#endif
// !defined GaussDigitizer_h
292
293
#undef GaussDigitizer_RECURSES
294
#endif
// else defined(GaussDigitizer_RECURSES)
DGtal::ConstAlias
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition
ConstAlias.h:187
DGtal::CountedConstPtrOrConstPtr
Aim: Smart or simple const pointer on T. It can be a smart pointer based on reference counts or a sim...
Definition
CountedConstPtrOrConstPtr.h:95
DGtal::GaussDigitizer
Aim: A class for computing the Gauss digitization of some Euclidean shape, i.e. its intersection with...
Definition
GaussDigitizer.h:80
DGtal::GaussDigitizer< Space, KernelSupport >::Domain
HyperRectDomain< Space > Domain
Definition
GaussDigitizer.h:90
DGtal::GaussDigitizer::resolution
Vector resolution() const
DGtal::GaussDigitizer< Space, KernelSupport >::EuclideanShape
KernelSupport EuclideanShape
Definition
GaussDigitizer.h:89
DGtal::GaussDigitizer< Space, KernelSupport >::myUpperPoint
Point myUpperPoint
Definition
GaussDigitizer.h:257
DGtal::GaussDigitizer::GaussDigitizer
GaussDigitizer()
DGtal::GaussDigitizer< Space, KernelSupport >::PointEmbedder
RegularPointEmbedder< Space > PointEmbedder
Definition
GaussDigitizer.h:91
DGtal::GaussDigitizer< Space, KernelSupport >::Point
Space::Point Point
Definition
GaussDigitizer.h:85
DGtal::GaussDigitizer< Space, KernelSupport >::Space
Space Space
Definition
GaussDigitizer.h:83
DGtal::GaussDigitizer::operator=
GaussDigitizer & operator=(const GaussDigitizer &other)
DGtal::GaussDigitizer::getUpperBound
const Point & getUpperBound() const
DGtal::GaussDigitizer::floor
Point floor(const RealPoint &p) const
DGtal::GaussDigitizer::orientation
Orientation orientation(const Point &p) const
Definition
GaussDigitizer.h:194
DGtal::GaussDigitizer::attach
void attach(ConstAlias< EuclideanShape > shape)
DGtal::GaussDigitizer::pointEmbedder
const PointEmbedder & pointEmbedder() const
DGtal::GaussDigitizer::getLowerBound
const Point & getLowerBound() const
DGtal::GaussDigitizer< Space, KernelSupport >::gridSteps
RealVector gridSteps() const
DGtal::GaussDigitizer< Space, KernelSupport >::myLowerPoint
Point myLowerPoint
Definition
GaussDigitizer.h:254
DGtal::GaussDigitizer< Space, KernelSupport >::Vector
Space::Vector Vector
Definition
GaussDigitizer.h:86
DGtal::GaussDigitizer::~GaussDigitizer
~GaussDigitizer()
DGtal::GaussDigitizer::selfDisplay
void selfDisplay(std::ostream &out) const
DGtal::GaussDigitizer::operator()
bool operator()(const Point &p) const
DGtal::GaussDigitizer::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CEuclideanOrientedShape< TEuclideanShape >))
DGtal::GaussDigitizer::round
Point round(const RealPoint &p) const
DGtal::GaussDigitizer::ceil
Point ceil(const RealPoint &p) const
DGtal::GaussDigitizer::init
void init(const RealPoint &xLow, const RealPoint &xUp, typename RealVector::Component gridStep)
DGtal::GaussDigitizer< Space, KernelSupport >::Integer
Space::Integer Integer
Definition
GaussDigitizer.h:84
DGtal::GaussDigitizer::getDomain
Domain getDomain() const
DGtal::GaussDigitizer< Space, KernelSupport >::myEShape
CountedConstPtrOrConstPtr< EuclideanShape > myEShape
Definition
GaussDigitizer.h:248
DGtal::GaussDigitizer::embed
RealPoint embed(const Point &p) const
DGtal::GaussDigitizer< Space, KernelSupport >::RealVector
Space::RealPoint RealVector
Definition
GaussDigitizer.h:88
DGtal::GaussDigitizer< Space, KernelSupport >::RealPoint
Space::RealPoint RealPoint
Definition
GaussDigitizer.h:87
DGtal::GaussDigitizer::init
void init(const RealPoint &xLow, const RealPoint &xUp, const RealVector &gridSteps)
DGtal::GaussDigitizer::isValid
bool isValid() const
DGtal::GaussDigitizer< Space, KernelSupport >::myPointEmbedder
RegularPointEmbedder< Space > myPointEmbedder
Definition
GaussDigitizer.h:251
DGtal::HyperRectDomain
Aim: Parallelepidec region of a digital space, model of a 'CDomain'.
Definition
HyperRectDomain.h:100
DGtal::PointVector< dim, double >::Component
double Component
Definition
PointVector.h:614
DGtal::RegularPointEmbedder
Aim: A simple point embedder where grid steps are given for each axis. Note that the real point (0,...
Definition
RegularPointEmbedder.h:69
DGtal::SpaceND< 3, Integer >::Integer
Integer Integer
Definition
SpaceND.h:102
DGtal::SpaceND< 3, Integer >::Point
PointVector< dim, Integer > Point
Definition
SpaceND.h:110
DGtal::SpaceND< 3, Integer >::RealPoint
PointVector< dim, double > RealPoint
Definition
SpaceND.h:117
DGtal::SpaceND< 3, Integer >::Vector
PointVector< dim, Integer > Vector
Definition
SpaceND.h:113
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::Orientation
Orientation
Definition
Common.h:124
DGtal::concepts::CEuclideanOrientedShape
Aim: characterizes models of digital oriented shapes. For example, models should provide an orientati...
Definition
CEuclideanOrientedShape.h:92
src
DGtal
shapes
GaussDigitizer.h
Generated on
for DGtal by
1.18.0