DGtal  1.3.beta
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)
34 
35 #define DigitalSetDomain_RECURSES
36 
37 #if !defined DigitalSetDomain_h
38 
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 
49 namespace 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 
94  DigitalSetDomain ( const DigitalSetDomain & other );
95 
96  // ----------------------- Domain services --------------------------------
97  public:
98 
103  ConstIterator begin(const Point &aPoint) const;
104 
108  ConstIterator begin() const;
109 
113  ConstIterator end() const;
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 
197  DigitalSetDomain & operator= ( const DigitalSetDomain & other );
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)
DGtal::DigitalSetDomain::isInside
bool isInside(const Point &p) const
DGtal::DigitalSetDomain::Integer
Domain::Integer Integer
Definition: DigitalSetDomain.h:66
DGtal::HyperRectDomain< Space >::Dimension
Space::Dimension Dimension
Definition: HyperRectDomain.h:116
DGtal::HyperRectDomain< Space >::Space
Space Space
Definition: HyperRectDomain.h:110
DGtal::DigitalSetByAssociativeContainer::Domain
TDomain Domain
Domain type.
Definition: DigitalSetByAssociativeContainer.h:94
DGtal::ConstAlias
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition: ConstAlias.h:186
DGtal::DigitalSetDomain::end
ConstIterator end() const
DGtal::NumberTraits
Aim: The traits class for all models of Cinteger.
Definition: NumberTraits.h:531
DGtal::DigitalSetDomain::predicate
const Predicate & predicate() const
aPoint
const Point aPoint(3, 4)
DGtal::DigitalSetDomain::myUpperBound
Point myUpperBound
Definition: DigitalSetDomain.h:173
DGtal::DigitalSetDomain::size
Size size() const
DGtal::DigitalSetDomain::mySet
const DigitalSet * mySet
Definition: DigitalSetDomain.h:168
DGtal::DigitalSetDomain::Domain
DigitalSet::Domain Domain
Definition: DigitalSetDomain.h:64
DGtal::operator<<
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
DGtal::HyperRectDomain< Space >::Size
Space::Size Size
Definition: HyperRectDomain.h:117
DGtal::DigitalSetDomain::~DigitalSetDomain
~DigitalSetDomain()
DGtal::DigitalSetDomain::Point
Domain::Point Point
Definition: DigitalSetDomain.h:68
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::DigitalSetDomain::ConstIterator
DigitalSet::ConstIterator ConstIterator
Definition: DigitalSetDomain.h:72
DGtal::DigitalSetDomain::DigitalSet
TDigitalSet DigitalSet
Definition: DigitalSetDomain.h:63
DGtal::DigitalSetDomain::upperBound
const Point & upperBound() const
DGtal::DigitalSetDomain::Vector
Domain::Vector Vector
Definition: DigitalSetDomain.h:69
DGtal::DigitalSetDomain::operator=
DigitalSetDomain & operator=(const DigitalSetDomain &other)
DGtal::DigitalSetDomain::isValid
bool isValid() const
DGtal::DigitalSetDomain::begin
ConstIterator begin() const
DGtal::DigitalSetDomain::DigitalSetDomain
DigitalSetDomain()
DGtal::HyperRectDomain< Space >::Integer
Space::Integer Integer
Definition: HyperRectDomain.h:114
DGtal::PointVector< dim, Integer >
DGtal::DigitalSetDomain::Space
Domain::Space Space
Definition: DigitalSetDomain.h:65
DGtal::DigitalSetDomain::lowerBound
const Point & lowerBound() const
DGtal::DigitalSetDomain::IsBounded
NumberTraits< Integer >::IsBounded IsBounded
Definition: DigitalSetDomain.h:67
DGtal::DigitalSetByAssociativeContainer::ConstIterator
Container::const_iterator ConstIterator
ConstIterator type of the container;.
Definition: DigitalSetByAssociativeContainer.h:108
DGtal::DigitalSetDomain::Dimension
Domain::Dimension Dimension
Definition: DigitalSetDomain.h:71
DGtal::DigitalSetDomain::Predicate
DigitalSet Predicate
Definition: DigitalSetDomain.h:73
DGtal::DigitalSetDomain::Size
Domain::Size Size
Definition: DigitalSetDomain.h:70
DGtal::DigitalSetDomain::myLowerBound
Point myLowerBound
Definition: DigitalSetDomain.h:178
DGtal::DigitalSetDomain
Aim: Constructs a domain limited to the given digital set.
Definition: DigitalSetDomain.h:59
DigitalSet
Z2i::DigitalSet DigitalSet
Definition: testVoronoiMapComplete.cpp:41
DGtal::DigitalSetByAssociativeContainer
Aim: A wrapper class around a STL associative container for storing sets of digital points within som...
Definition: DigitalSetByAssociativeContainer.h:89
DGtal::DigitalSetDomain::selfDisplay
void selfDisplay(std::ostream &out) const