DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
FrontierPredicate.h
1
16
17
#pragma once
18
30
31
#if defined(FrontierPredicate_RECURSES)
32
#error Recursive header files inclusion detected in FrontierPredicate.h
33
#else
// defined(FrontierPredicate_RECURSES)
35
#define FrontierPredicate_RECURSES
36
37
#if !defined FrontierPredicate_h
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>
67
class
FrontierPredicate
68
{
69
// ----------------------- public types ------------------------------
70
public
:
71
BOOST_CONCEPT_ASSERT
((
concepts::CCellularGridSpaceND< TKSpace >
));
72
BOOST_CONCEPT_ASSERT
((
concepts::CConstImage< TImage >
));
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
80
BOOST_STATIC_ASSERT
81
((
concepts::ConceptUtils::SameType
<
typename
KSpace::Point
,
82
typename
Image::Point
>::value ));
83
84
85
// ----------------------- Standard services ------------------------------
86
public
:
87
91
~FrontierPredicate
();
92
102
FrontierPredicate
(
ConstAlias<KSpace>
aSpace,
ConstAlias<Image>
anImage,
103
const
Value
& l1,
const
Value
& l2 );
104
109
FrontierPredicate
(
const
FrontierPredicate
& other );
110
116
FrontierPredicate
&
operator=
(
const
FrontierPredicate
& other );
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 Data --------------------------------
145
private
:
146
148
const
KSpace
*
myPtrSpace
;
149
// the image of interest
150
const
Image
*
myPtrImage
;
152
Value
myLabel1
;
154
Value
myLabel2
;
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,
174
const
DGtal::functors::FrontierPredicate<TKSpace,TImage>
&
object
);
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:187
DGtal::ImageContainerBySTLVector< Domain, Value >::Value
Value Value
Definition
ImageContainerBySTLVector.h:153
DGtal::ImageContainerBySTLVector< Domain, Value >::Point
Domain::Point Point
Definition
ImageContainerBySTLVector.h:138
DGtal::KhalimskySpaceND< 3, Integer >::Point
PointVector< dim, Integer > Point
Definition
KhalimskySpaceND.h:425
DGtal::KhalimskySpaceND< 3, Integer >::SCell
SignedKhalimskyCell< dim, Integer > SCell
Definition
KhalimskySpaceND.h:417
DGtal::KhalimskySpaceND< 3, Integer >::Surfel
SCell Surfel
Definition
KhalimskySpaceND.h:420
DGtal::functors::FrontierPredicate
Aim: The predicate on surfels that represents the frontier between two regions in an image....
Definition
FrontierPredicate.h:68
DGtal::functors::FrontierPredicate::myPtrImage
const Image * myPtrImage
Definition
FrontierPredicate.h:150
DGtal::functors::FrontierPredicate::selfDisplay
void selfDisplay(std::ostream &out) const
DGtal::functors::FrontierPredicate::SCell
KSpace::SCell SCell
Definition
FrontierPredicate.h:77
DGtal::functors::FrontierPredicate::FrontierPredicate
FrontierPredicate(const FrontierPredicate &other)
DGtal::functors::FrontierPredicate::operator=
FrontierPredicate & operator=(const FrontierPredicate &other)
DGtal::functors::FrontierPredicate::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CCellularGridSpaceND< TKSpace >))
DGtal::functors::FrontierPredicate::BOOST_STATIC_ASSERT
BOOST_STATIC_ASSERT((concepts::ConceptUtils::SameType< typename KSpace::Point, typename Image::Point >::value))
DGtal::functors::FrontierPredicate::operator()
bool operator()(const Surfel &s) const
DGtal::functors::FrontierPredicate::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CConstImage< TImage >))
DGtal::functors::FrontierPredicate::~FrontierPredicate
~FrontierPredicate()
DGtal::functors::FrontierPredicate::Image
TImage Image
Definition
FrontierPredicate.h:74
DGtal::functors::FrontierPredicate::Surfel
KSpace::Surfel Surfel
Definition
FrontierPredicate.h:75
DGtal::functors::FrontierPredicate::isValid
bool isValid() const
DGtal::functors::FrontierPredicate::myPtrSpace
const KSpace * myPtrSpace
the cellular space where lies the image.
Definition
FrontierPredicate.h:148
DGtal::functors::FrontierPredicate::KSpace
TKSpace KSpace
Definition
FrontierPredicate.h:73
DGtal::functors::FrontierPredicate::Point
KSpace::Point Point
Definition
FrontierPredicate.h:76
DGtal::functors::FrontierPredicate::myLabel1
Value myLabel1
the label of the inner region that defines the frontier.
Definition
FrontierPredicate.h:152
DGtal::functors::FrontierPredicate::FrontierPredicate
FrontierPredicate(ConstAlias< KSpace > aSpace, ConstAlias< Image > anImage, const Value &l1, const Value &l2)
DGtal::functors::FrontierPredicate::Value
Image::Value Value
Definition
FrontierPredicate.h:78
DGtal::functors::FrontierPredicate::myLabel2
Value myLabel2
the label of the outer region that defines the frontier.
Definition
FrontierPredicate.h:154
DGtal::functors
functors namespace gathers all DGtal functors.
Definition
BasicBoolFunctors.h:49
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::concepts::CCellularGridSpaceND
Aim: This concept describes a cellular grid space in nD. In these spaces obtained by cartesian produc...
Definition
CCellularGridSpaceND.h:164
DGtal::concepts::CConstImage
Aim: Defines the concept describing a read-only image, which is a refinement of CPointFunctor.
Definition
CConstImage.h:95
DGtal::concepts::ConceptUtils::SameType
Definition
ConceptUtils.h:107
src
DGtal
topology
helpers
FrontierPredicate.h
Generated on
for DGtal by
1.18.0