DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
DigitalSurfacePredicate.h
1
16
17
#pragma once
18
30
31
#if defined(DigitalSurfacePredicate_RECURSES)
32
#error Recursive header files inclusion detected in DigitalSurfacePredicate.h
33
#else
// defined(DigitalSurfacePredicate_RECURSES)
35
#define DigitalSurfacePredicate_RECURSES
36
37
#if !defined DigitalSurfacePredicate_h
39
#define DigitalSurfacePredicate_h
40
42
// Inclusions
43
#include <iostream>
44
#include "DGtal/base/Common.h"
45
#include "DGtal/kernel/UnorderedSetByBlock.h"
47
48
namespace
DGtal
49
{
50
52
// template class DigitalSurfacePredicate
64
template
<
typename
TSurface>
65
class
DigitalSurfacePredicate
66
{
67
// ----------------------- Public types ------------------------------
68
public
:
69
using
Surface
= TSurface;
70
using
Point
=
typename
Surface::Point
;
71
using
Integer
=
typename
Point::Coordinate;
72
using
KSpace
=
typename
Surface::KSpace
;
73
74
// ----------------------- Standard services ------------------------------
75
public
:
76
80
DigitalSurfacePredicate
();
81
87
DigitalSurfacePredicate
(
ConstAlias<Surface>
aSurface);
88
92
~DigitalSurfacePredicate
();
93
98
DigitalSurfacePredicate
(
const
DigitalSurfacePredicate
& other );
99
105
DigitalSurfacePredicate
&
operator=
(
const
DigitalSurfacePredicate
& other );
106
107
//-------------------- model of concepts::CPointPredicate -----------------------------
108
public
:
115
bool
operator()
(
Point
const
&
aPoint
)
const
;
116
117
// ----------------------- Interface --------------------------------------
118
public
:
119
124
void
selfDisplay
( std::ostream & out )
const
;
125
130
bool
isValid
()
const
;
131
132
// ------------------------- Protected Data ------------------------------
133
protected
:
134
135
// ------------------------- Private Data --------------------------------
136
private
:
137
CountedConstPtrOrConstPtr<Surface>
mySurface
;
138
UnorderedSetByBlock<Point>
myPointSet
;
139
140
// ------------------------- Hidden services ------------------------------
141
protected
:
142
143
// ------------------------- Internals ------------------------------------
144
private
:
148
KSpace
const
&
space
()
const
;
149
153
void
buildPointSet
();
154
155
};
// end of class DigitalSurfacePredicate
156
157
164
template
<
typename
TSurface>
165
std::ostream&
166
operator<<
( std::ostream & out,
const
DigitalSurfacePredicate<TSurface>
&
object
);
167
168
}
// namespace DGtal
169
170
172
// Includes inline functions.
173
#include "DGtal/geometry/surfaces/DigitalSurfacePredicate.ih"
174
175
// //
177
178
#endif
// !defined DigitalSurfacePredicate_h
179
180
#undef DigitalSurfacePredicate_RECURSES
181
#endif
// else defined(DigitalSurfacePredicate_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::DigitalSurfacePredicate
Aim: A point predicate which tells whether a point belongs to the set of pointels of a given digital ...
Definition
DigitalSurfacePredicate.h:66
DGtal::DigitalSurfacePredicate::operator()
bool operator()(Point const &aPoint) const
DGtal::DigitalSurfacePredicate::isValid
bool isValid() const
DGtal::DigitalSurfacePredicate< Surface >::myPointSet
UnorderedSetByBlock< Point > myPointSet
Definition
DigitalSurfacePredicate.h:138
DGtal::DigitalSurfacePredicate::Point
typename Surface::Point Point
Definition
DigitalSurfacePredicate.h:70
DGtal::DigitalSurfacePredicate< Surface >::mySurface
CountedConstPtrOrConstPtr< Surface > mySurface
Definition
DigitalSurfacePredicate.h:137
DGtal::DigitalSurfacePredicate::DigitalSurfacePredicate
DigitalSurfacePredicate()
DGtal::DigitalSurfacePredicate::DigitalSurfacePredicate
DigitalSurfacePredicate(const DigitalSurfacePredicate &other)
DGtal::DigitalSurfacePredicate::DigitalSurfacePredicate
DigitalSurfacePredicate(ConstAlias< Surface > aSurface)
DGtal::DigitalSurfacePredicate::Integer
typename Point::Coordinate Integer
Definition
DigitalSurfacePredicate.h:71
DGtal::DigitalSurfacePredicate::space
KSpace const & space() const
DGtal::DigitalSurfacePredicate::buildPointSet
void buildPointSet()
DGtal::DigitalSurfacePredicate::Surface
TSurface Surface
Definition
DigitalSurfacePredicate.h:69
DGtal::DigitalSurfacePredicate::operator=
DigitalSurfacePredicate & operator=(const DigitalSurfacePredicate &other)
DGtal::DigitalSurfacePredicate::selfDisplay
void selfDisplay(std::ostream &out) const
DGtal::DigitalSurfacePredicate::~DigitalSurfacePredicate
~DigitalSurfacePredicate()
DGtal::DigitalSurfacePredicate::KSpace
typename Surface::KSpace KSpace
Definition
DigitalSurfacePredicate.h:72
DGtal::DigitalSurface< ExplicitSurfaceContainer >::Point
KSpace::Point Point
Definition
DigitalSurface.h:165
DGtal::DigitalSurface< ExplicitSurfaceContainer >::KSpace
DigitalSurfaceContainer::KSpace KSpace
Definition
DigitalSurface.h:159
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::UnorderedSetByBlock
Definition
UnorderedSetByBlock.h:163
aPoint
const Point aPoint(3, 4)
src
DGtal
geometry
surfaces
DigitalSurfacePredicate.h
Generated on
for DGtal by
1.18.0