DGtal 1.3.0
Loading...
Searching...
No Matches
DigitalSetDomain.h
1
17#pragma once
18
31#if defined(DigitalSetDomain_RECURSES)
32#error Recursive header files inclusion detected in DigitalSetDomain.h
33#else // defined(DigitalSetDomain_RECURSES)
35#define DigitalSetDomain_RECURSES
36
37#if !defined DigitalSetDomain_h
39#define DigitalSetDomain_h
40
42// Inclusions
43#include <iostream>
44#include "DGtal/base/Common.h"
45#include "DGtal/base/ConstAlias.h"
46#include "DGtal/kernel/NumberTraits.h"
48
49namespace DGtal
50{
51
53 // template class DigitalSetDomain
58 template <typename TDigitalSet>
60 {
61 // ----------------------- associated types -------------------------------
62 public:
63 typedef TDigitalSet DigitalSet;
64 typedef typename DigitalSet::Domain Domain;
65 typedef typename Domain::Space Space;
66 typedef typename Domain::Integer Integer;
68 typedef typename Domain::Point Point;
69 typedef typename Domain::Vector Vector;
70 typedef typename Domain::Size Size;
71 typedef typename Domain::Dimension Dimension;
73 typedef DigitalSet Predicate; // since 0.6, DigitalSet are PointPredicate
74
75 // ----------------------- Standard services ------------------------------
76 public:
77
82
88
89
95
96 // ----------------------- Domain services --------------------------------
97 public:
98
104
109
114
119 const Point &lowerBound() const;
120
125 const Point &upperBound() const ;
126
131 Size size() const ;
132
137 bool isInside( const Point & p ) const;
138
142 const Predicate & predicate() const;
143
144
145 // ----------------------- Interface --------------------------------------
146 public:
147
152 void selfDisplay ( std::ostream & out ) const;
153
158 bool isValid() const;
159
160 // ------------------------- Protected Datas ------------------------------
161 private:
162 // ------------------------- Private Datas --------------------------------
163 private:
164
169
174
179
180 // ------------------------- Hidden services ------------------------------
181 protected:
182
188
189 private:
190
198
199 // ------------------------- Internals ------------------------------------
200 private:
201
202
203 }; // end of class DigitalSetDomain
204
205
212 template <typename T>
213 std::ostream&
214 operator<< ( std::ostream & out, const DigitalSetDomain<T> & object );
215
216} // namespace DGtal
217
218
220// Includes inline functions.
221#include "DGtal/kernel/sets/DigitalSetDomain.ih"
222
223// //
225
226#endif // !defined DigitalSetDomain_h
227
228#undef DigitalSetDomain_RECURSES
229#endif // else defined(DigitalSetDomain_RECURSES)
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition: ConstAlias.h:187
Container::const_iterator ConstIterator
ConstIterator type of the container;.
Aim: Constructs a domain limited to the given digital set.
DigitalSetDomain(const DigitalSetDomain &other)
DigitalSet::Domain Domain
bool isInside(const Point &p) const
ConstIterator begin(const Point &aPoint) const
DigitalSet::ConstIterator ConstIterator
ConstIterator begin() const
DigitalSetDomain & operator=(const DigitalSetDomain &other)
const Predicate & predicate() const
void selfDisplay(std::ostream &out) const
const DigitalSet * mySet
ConstIterator end() const
DigitalSetDomain(ConstAlias< DigitalSet > aSet)
NumberTraits< Integer >::IsBounded IsBounded
const Point & lowerBound() const
Domain::Dimension Dimension
const Point & upperBound() const
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
const Point aPoint(3, 4)