DGtal 1.3.0
Loading...
Searching...
No Matches
BoundaryPredicate.h
1
17#pragma once
18
31#if defined(BoundaryPredicate_RECURSES)
32#error Recursive header files inclusion detected in BoundaryPredicate.h
33#else // defined(BoundaryPredicate_RECURSES)
35#define BoundaryPredicate_RECURSES
36
37#if !defined BoundaryPredicate_h
39#define BoundaryPredicate_h
40
42// Inclusions
43#include <iostream>
44#include <boost/array.hpp>
45
46#include "DGtal/base/Common.h"
47#include "DGtal/base/ConstAlias.h"
48#include "DGtal/images/CConstImage.h"
49#include "DGtal/topology/CCellularGridSpaceND.h"
51
52// @since 0.8 In DGtal::functors
53namespace DGtal {
54 namespace functors {
55
57 // class BoundaryPredicate
68 template <typename TKSpace, typename TImage>
70 {
71 // ----------------------- public types ------------------------------
72 public:
75 typedef TKSpace KSpace;
76 typedef TImage Image;
77 typedef typename KSpace::Surfel Surfel;
78 typedef typename KSpace::Point Point;
79 typedef typename KSpace::SCell SCell;
80 typedef typename Image::Value Value;
81 // KSpace::Point same type as Image::Point
84 typename Image::Point>::value ));
85
86
87 // ----------------------- Standard services ------------------------------
88 public:
89
94
104 const Value & l1 );
105
111
118
128 bool operator()( const Surfel & s ) const;
129
130 // ----------------------- Interface --------------------------------------
131 public:
132
137 void selfDisplay ( std::ostream & out ) const;
138
143 bool isValid() const;
144
145 // ------------------------- Private Datas --------------------------------
146 private:
147
150 // the image of interest
154
155 // ------------------------- Hidden services ------------------------------
156 protected:
157 // ------------------------- Internals ------------------------------------
158 private:
159
160 }; // end of class BoundaryPredicate
161
162 } // namespace functors
163
170 template <typename TKSpace, typename TImage>
171 std::ostream&
172 operator<< ( std::ostream & out,
174
175
176} // namespace DGtal
177
178
180// Includes inline functions.
181#include "DGtal/topology/helpers/BoundaryPredicate.ih"
182
183// //
185
186#endif // !defined BoundaryPredicate_h
187
188#undef BoundaryPredicate_RECURSES
189#endif // else defined(BoundaryPredicate_RECURSES)
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition: ConstAlias.h:187
Aim: The predicate on surfels that represents the frontier between a region and its complementary in ...
void selfDisplay(std::ostream &out) const
BoundaryPredicate(ConstAlias< KSpace > aSpace, ConstAlias< Image > anImage, const Value &l1)
BOOST_STATIC_ASSERT((concepts::ConceptUtils::SameType< typename KSpace::Point, typename Image::Point >::value))
BOOST_CONCEPT_ASSERT((concepts::CConstImage< TImage >))
BOOST_CONCEPT_ASSERT((concepts::CCellularGridSpaceND< TKSpace >))
BoundaryPredicate & operator=(const BoundaryPredicate &other)
BoundaryPredicate(const BoundaryPredicate &other)
Value myLabel1
the label of the inner region that defines the boundary.
const KSpace * myPtrSpace
the cellular space where lies the image.
bool operator()(const Surfel &s) const
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
Represents a signed cell in a cellular grid space by its Khalimsky coordinates and a boolean value.
Aim: This concept describes a cellular grid space in nD. In these spaces obtained by cartesian produc...
Aim: Defines the concept describing a read-only image, which is a refinement of CPointFunctor.
Definition: CConstImage.h:95