DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
SimpleThresholdForegroundPredicate.h
1
16
17
#pragma once
18
30
31
#if defined(SimpleThresholdForegroundPredicate_RECURSES)
32
#error Recursive header files inclusion detected in SimpleThresholdForegroundPredicate.h
33
#else
// defined(SimpleThresholdForegroundPredicate_RECURSES)
35
#define SimpleThresholdForegroundPredicate_RECURSES
36
37
#if !defined SimpleThresholdForegroundPredicate_h
39
#define SimpleThresholdForegroundPredicate_h
40
42
// Inclusions
43
#include <iostream>
44
#include "DGtal/base/Common.h"
45
#include "DGtal/images/CConstImage.h"
46
#include "DGtal/base/ConstAlias.h"
48
49
// @since 0.8 In DGtal::functors
50
namespace
DGtal
{
51
namespace
functors
{
52
64
template
<
typename
Image>
65
class
SimpleThresholdForegroundPredicate
66
{
67
public
:
68
BOOST_CONCEPT_ASSERT
((
concepts::CConstImage<Image>
));
69
70
typedef
typename
Image::Value
Value
;
71
typedef
typename
Image::Point
Point
;
72
80
SimpleThresholdForegroundPredicate
(
ConstAlias<Image>
aImage,
81
const
Value
value):
82
myImage
(&aImage),
myVal
(value) {};
83
87
bool
operator()
(
const
typename
Image::Point
&
aPoint
)
const
88
{
89
return
((*
myImage
)(
aPoint
) >
myVal
);
90
}
91
95
bool
operator()
(
const
typename
Image::Domain::ConstIterator
&it)
const
96
{
97
return
( (*
myImage
)(*it) >
myVal
);
98
}
99
103
bool
operator()
(
const
typename
Image::ConstRange::ConstIterator
&it)
const
104
{
105
return
((*it) >
myVal
);
106
}
107
108
109
private
:
110
const
Image
*
myImage
;
111
Value
myVal
;
112
113
protected
:
114
SimpleThresholdForegroundPredicate
();
115
116
};
117
118
119
}
// namespace functors
120
}
// namespace DGtal
121
122
// //
124
125
#endif
// !defined SimpleThresholdForegroundPredicate_h
126
127
#undef SimpleThresholdForegroundPredicate_RECURSES
128
#endif
// else defined(SimpleThresholdForegroundPredicate_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 >::ConstIterator
std::vector< Value >::const_iterator ConstIterator
Definition
ImageContainerBySTLVector.h:265
DGtal::ImageContainerBySTLVector< Domain, Value >::Value
Value Value
Definition
ImageContainerBySTLVector.h:153
DGtal::ImageContainerBySTLVector< Domain, Value >::Point
Domain::Point Point
Definition
ImageContainerBySTLVector.h:138
DGtal::Image
Aim: implements association between points lying in a digital domain and values.
Definition
Image.h:70
DGtal::functors::SimpleThresholdForegroundPredicate::operator()
bool operator()(const typename Image::Point &aPoint) const
Definition
SimpleThresholdForegroundPredicate.h:87
DGtal::functors::SimpleThresholdForegroundPredicate::myImage
const Image * myImage
Definition
SimpleThresholdForegroundPredicate.h:110
DGtal::functors::SimpleThresholdForegroundPredicate::Point
Image::Point Point
Definition
SimpleThresholdForegroundPredicate.h:71
DGtal::functors::SimpleThresholdForegroundPredicate::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CConstImage< Image >))
DGtal::functors::SimpleThresholdForegroundPredicate::operator()
bool operator()(const typename Image::Domain::ConstIterator &it) const
Definition
SimpleThresholdForegroundPredicate.h:95
DGtal::functors::SimpleThresholdForegroundPredicate::SimpleThresholdForegroundPredicate
SimpleThresholdForegroundPredicate()
DGtal::functors::SimpleThresholdForegroundPredicate::myVal
Value myVal
Definition
SimpleThresholdForegroundPredicate.h:111
DGtal::functors::SimpleThresholdForegroundPredicate::operator()
bool operator()(const typename Image::ConstRange::ConstIterator &it) const
Definition
SimpleThresholdForegroundPredicate.h:103
DGtal::functors::SimpleThresholdForegroundPredicate::SimpleThresholdForegroundPredicate
SimpleThresholdForegroundPredicate(ConstAlias< Image > aImage, const Value value)
Definition
SimpleThresholdForegroundPredicate.h:80
DGtal::functors::SimpleThresholdForegroundPredicate::Value
Image::Value Value
Definition
SimpleThresholdForegroundPredicate.h:70
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::concepts::CConstImage
Aim: Defines the concept describing a read-only image, which is a refinement of CPointFunctor.
Definition
CConstImage.h:95
aPoint
const Point aPoint(3, 4)
src
DGtal
images
SimpleThresholdForegroundPredicate.h
Generated on
for DGtal by
1.18.0