31#if defined(ImageHelper_RECURSES)
32#error Recursive header files inclusion detected in ImageHelper.h
35#define ImageHelper_RECURSES
37#if !defined ImageHelper_h
47#include "DGtal/base/Common.h"
48#include "DGtal/base/BasicFunctors.h"
49#include "DGtal/base/CConstSinglePassRange.h"
50#include "DGtal/kernel/BasicPointPredicates.h"
51#include "DGtal/kernel/CPointFunctor.h"
52#include "DGtal/kernel/CPointPredicate.h"
53#include "DGtal/kernel/domains/CDomain.h"
54#include "DGtal/images/CConstImage.h"
55#include "DGtal/images/ConstImageAdapter.h"
56#include "DGtal/images/CImage.h"
57#include "DGtal/base/CQuantity.h"
58#include "DGtal/images/ImageContainerBySTLMap.h"
59#include "DGtal/images/SetValueIterator.h"
60#include "DGtal/kernel/sets/DigitalSetFromMap.h"
61#include "DGtal/kernel/sets/CDigitalSet.h"
62#include "DGtal/kernel/NumberTraits.h"
63#include "DGtal/base/ConstAlias.h"
85 template<
typename I,
typename O,
typename P>
105 template<
typename I,
typename O,
typename F>
107 const O& ito,
const F& aFunctor,
108 const typename F::Value& aThreshold = 0);
124 template<
typename I,
typename O>
127 const typename I::Value& aThreshold = 0);
144 template<
typename I,
typename O>
147 const typename I::Value& low,
148 const typename I::Value& up);
163 template<
typename It,
typename Im>
165 const typename Im::Value& aValue = 0);
178 template<
typename R,
typename I>
180 const typename I::Value& aValue = 0);
192 template<
typename I,
typename F>
204 template<
typename I1,
typename I2>
249 template<
typename I,
typename S>
251 const typename I::Point&
aPoint,
252 const typename I::Value& aValue );
297 template<
typename I,
typename S>
299 const typename I::Point&
aPoint,
300 const typename I::Value& aValue );
330 template<
typename I,
typename S>
332 const typename I::Point&
aPoint,
333 typename I::Value& aValue );
346 template<
typename Image,
typename Po
intPredicate,
typename TValue=DGtal::
int32_t>
376 bool reverseValues =
false )
445#include "DGtal/images/ImageHelper.ih"
451#undef ImageHelper_RECURSES
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Value operator()(const Point &aPoint) const
BOOST_CONCEPT_ASSERT((concepts::CConstImage< Image >))
Value myVal
constant value when functor answer true.
bool reverse
reverse values returned by the predicate. (Some shapes consider inner as > 0, others as < 0)
const Image * myImage
const pointor to an image
const PointPredicate * myPointPred
const pointor to a predicate on points
BOOST_CONCEPT_ASSERT((concepts::CPointPredicate< PointPredicate >))
ImageToConstantFunctor(ConstAlias< Image > anImage, ConstAlias< PointPredicate > aPointPred, Value aVal=NumberTraits< Value >::ONE, bool reverseValues=false)
BOOST_CONCEPT_ASSERT((concepts::CQuantity< Value >))
Aim: implements association bewteen points lying in a digital domain and values.
const Domain & domain() const
DGtal is the top-level namespace which contains all DGtal functions and types.
void setFromImage(const I &aImg, const O &ito, const typename I::Value &aThreshold=0)
bool findAndGetValue(const I &aImg, const S &aSet, const typename I::Point &aPoint, typename I::Value &aValue)
void imageFromFunctor(I &aImg, const F &aFun)
bool insertAndSetValue(I &aImg, S &aSet, const typename I::Point &aPoint, const typename I::Value &aValue)
void imageFromImage(I1 &aImg1, const I2 &aImg2)
void imageFromRangeAndValue(const It &itb, const It &ite, Im &aImg, const typename Im::Value &aValue=0)
bool insertAndAlwaysSetValue(I &aImg, S &aSet, const typename I::Point &aPoint, const typename I::Value &aValue)
void setFromPointsRangeAndFunctor(const I &itb, const I &ite, const O &ito, const F &aFunctor, const typename F::Value &aThreshold=0)
void setFromPointsRangeAndPredicate(const I &itb, const I &ite, const O &ito, const P &aPred)
useful functions
Aim: The traits class for all models of Cinteger.
Aim: Defines the concept describing a read-only image, which is a refinement of CPointFunctor.
Aim: Defines a predicate on a point.
Aim: defines the concept of quantity in DGtal.