DGtal  1.3.beta
FrontierPredicate.h
1 
17 #pragma once
18 
31 #if defined(FrontierPredicate_RECURSES)
32 #error Recursive header files inclusion detected in FrontierPredicate.h
33 #else // defined(FrontierPredicate_RECURSES)
34 
35 #define FrontierPredicate_RECURSES
36 
37 #if !defined FrontierPredicate_h
38 
39 #define FrontierPredicate_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "DGtal/base/ConstAlias.h"
46 #include "DGtal/images/CConstImage.h"
47 #include "DGtal/topology/CCellularGridSpaceND.h"
49 
50 // @since 0.8 In DGtal::functors
51 namespace DGtal {
52  namespace functors {
53 
55  // class FrontierPredicate
66  template <typename TKSpace, typename TImage>
68  {
69  // ----------------------- public types ------------------------------
70  public:
73  typedef TKSpace KSpace;
74  typedef TImage Image;
75  typedef typename KSpace::Surfel Surfel;
76  typedef typename KSpace::Point Point;
77  typedef typename KSpace::SCell SCell;
78  typedef typename Image::Value Value;
79  // KSpace::Point same type as Image::Point
82  typename Image::Point>::value ));
83 
84 
85  // ----------------------- Standard services ------------------------------
86  public:
87 
92 
103  const Value & l1, const Value & l2 );
104 
109  FrontierPredicate ( const FrontierPredicate & other );
110 
117 
127  bool operator()( const Surfel & s ) const;
128 
129  // ----------------------- Interface --------------------------------------
130  public:
131 
136  void selfDisplay ( std::ostream & out ) const;
137 
142  bool isValid() const;
143 
144  // ------------------------- Private Datas --------------------------------
145  private:
146 
149  // the image of interest
155 
156  // ------------------------- Hidden services ------------------------------
157  protected:
158  // ------------------------- Internals ------------------------------------
159  private:
160 
161  }; // end of class FrontierPredicate
162 
163  } // namespace functors
164 
171  template <typename TKSpace, typename TImage>
172  std::ostream&
173  operator<< ( std::ostream & out,
175 
176 
177 } // namespace DGtal
178 
179 
181 // Includes inline functions.
182 #include "DGtal/topology/helpers/FrontierPredicate.ih"
183 
184 // //
186 
187 #endif // !defined FrontierPredicate_h
188 
189 #undef FrontierPredicate_RECURSES
190 #endif // else defined(FrontierPredicate_RECURSES)
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::functors::FrontierPredicate::Surfel
KSpace::Surfel Surfel
Definition: FrontierPredicate.h:75
DGtal::functors::FrontierPredicate::FrontierPredicate
FrontierPredicate(ConstAlias< KSpace > aSpace, ConstAlias< Image > anImage, const Value &l1, const Value &l2)
DGtal::ImageContainerBySTLVector::Value
TValue Value
Definition: ImageContainerBySTLVector.h:153
DGtal::functors::FrontierPredicate::Value
Image::Value Value
Definition: FrontierPredicate.h:78
DGtal::functors::FrontierPredicate::myPtrSpace
const KSpace * myPtrSpace
the cellular space where lies the image.
Definition: FrontierPredicate.h:148
DGtal::functors::FrontierPredicate::myPtrImage
const Image * myPtrImage
Definition: FrontierPredicate.h:150
DGtal::concepts::CCellularGridSpaceND
Aim: This concept describes a cellular grid space in nD. In these spaces obtained by cartesian produc...
Definition: CCellularGridSpaceND.h:162
DGtal::functors::FrontierPredicate::KSpace
TKSpace KSpace
Definition: FrontierPredicate.h:73
DGtal::SignedKhalimskyCell
Represents a signed cell in a cellular grid space by its Khalimsky coordinates and a boolean value.
Definition: KhalimskySpaceND.h:208
DGtal::functors::FrontierPredicate::Point
KSpace::Point Point
Definition: FrontierPredicate.h:76
DGtal::functors::FrontierPredicate::operator()
bool operator()(const Surfel &s) const
DGtal::functors::FrontierPredicate::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CCellularGridSpaceND< TKSpace >))
DGtal::operator<<
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
DGtal::functors::FrontierPredicate::Image
TImage Image
Definition: FrontierPredicate.h:74
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::functors::FrontierPredicate
Aim: The predicate on surfels that represents the frontier between two regions in an image....
Definition: FrontierPredicate.h:67
DGtal::functors::FrontierPredicate::isValid
bool isValid() const
DGtal::functors::FrontierPredicate::selfDisplay
void selfDisplay(std::ostream &out) const
DGtal::functors::FrontierPredicate::operator=
FrontierPredicate & operator=(const FrontierPredicate &other)
DGtal::functors::FrontierPredicate::myLabel2
Value myLabel2
the label of the outer region that defines the frontier.
Definition: FrontierPredicate.h:154
DGtal::concepts::ConceptUtils::SameType
Definition: ConceptUtils.h:106
DGtal::PointVector< dim, Integer >
DGtal::functors::FrontierPredicate::BOOST_STATIC_ASSERT
BOOST_STATIC_ASSERT((concepts::ConceptUtils::SameType< typename KSpace::Point, typename Image::Point >::value))
DGtal::functors::FrontierPredicate::~FrontierPredicate
~FrontierPredicate()
DGtal::functors::FrontierPredicate::SCell
KSpace::SCell SCell
Definition: FrontierPredicate.h:77
DGtal::concepts::CConstImage
Aim: Defines the concept describing a read-only image, which is a refinement of CPointFunctor.
Definition: CConstImage.h:94
DGtal::functors::FrontierPredicate::myLabel1
Value myLabel1
the label of the inner region that defines the frontier.
Definition: FrontierPredicate.h:152