31 #if defined(SetFromImage_RECURSES)
32 #error Recursive header files inclusion detected in SetFromImage.h
35 #define SetFromImage_RECURSES
37 #if !defined SetFromImage_h
39 #define SetFromImage_h
44 #include "DGtal/base/Common.h"
45 #include "DGtal/images/CImage.h"
46 #include "DGtal/kernel/sets/CDigitalSet.h"
47 #include "DGtal/images/IntervalForegroundPredicate.h"
62 template <
typename TSet>
79 template<
typename Image,
typename ForegroundPredicate>
82 const ForegroundPredicate &isForeground,
100 template<
typename Image>
110 append(aSet, isForeground,itBegin,itEnd);
123 template<
typename Image,
typename ForegroundPredicate>
125 void append(
Set &aSet,
const Image &aImage,
const ForegroundPredicate &isForeground)
129 append<Image,ForegroundPredicate>(aSet,isForeground,
domain.begin(),
domain.end());
144 template<
typename Image>
151 append(aSet,aImage,isForeground);
160 #include "DGtal/images/imagesSetsUtils/SetFromImage.ih"
167 #undef SetFromImage_RECURSES
std::vector< Value >::const_iterator ConstIterator
Aim: implements association bewteen points lying in a digital domain and values.
const Domain & domain() const
Aim: Define a simple Foreground predicate thresholding image values between two constant values (the ...
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: Define utilities to convert a digital set into an image.
BOOST_CONCEPT_ASSERT((concepts::CDigitalSet< Set >))
static void append(Set &aSet, const Image &aImage, const typename Image::Value minVal, const typename Image::Value maxVal)
static void append(Set &aSet, const ForegroundPredicate &isForeground, typename Image::Domain::ConstIterator itBegin, typename Image::Domain::ConstIterator itEnd)
static void append(Set &aSet, const Image &aImage, const typename Image::Value minVal, const typename Image::Value maxVal, typename Image::Domain::ConstIterator itBegin, typename Image::Domain::ConstIterator itEnd)
static void append(Set &aSet, const Image &aImage, const ForegroundPredicate &isForeground)
Aim: Represents a set of points within the given domain. This set of points is modifiable by the user...