35#if defined(FMM_RECURSES)
36#error Recursive header files inclusion detected in FMM.h
51#include "DGtal/base/Common.h"
52#include "DGtal/base/ConstAlias.h"
53#include "DGtal/images/CImage.h"
54#include "DGtal/images/ImageHelper.h"
55#include "DGtal/kernel/sets/CDigitalSet.h"
56#include "DGtal/kernel/CPointPredicate.h"
57#include "DGtal/kernel/CPointFunctor.h"
58#include "DGtal/geometry/volumes/distance/FMMPointFunctors.h"
89 if ( std::abs(a.second) == std::abs(b.second) )
91 return (a.first < b.first);
96 return ( std::abs(a.second) < std::abs(b.second) );
148 template <
typename TImage,
typename TSet,
typename TPointPredicate,
149 typename TPointFunctor = L2FirstOrderLocalDistance<TImage,TSet> >
178 typedef typename PointFunctor::Value
Value;
268 const Area& aAreaThreshold,
const Value& aValueThreshold);
286 const Area& aAreaThreshold,
const Value& aValueThreshold,
380 template <
typename TIteratorOnPo
ints>
383 const Value& aValue);
400 template <
typename KSpace,
typename TIteratorOnBels>
402 const TIteratorOnBels& itb,
const TIteratorOnBels& ite,
405 bool aFlagIsPositive =
true);
425 template <
typename KSpace,
typename TIteratorOnBels,
typename TImplicitFunction>
427 const TIteratorOnBels& itb,
const TIteratorOnBels& ite,
428 const TImplicitFunction& aF,
430 bool aFlagIsPositive =
true);
447 template <
typename TIteratorOnPairs>
451 bool aFlagIsPositive =
true);
523 template <
typename TImage,
typename TSet,
typename TPo
intPredicate,
typename TPo
intFunctor >
532#include "DGtal/geometry/volumes/distance/FMM.ih"
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Aim: Fast Marching Method (FMM) for nd distance transforms.
AcceptedPointSet & myAcceptedPoints
TPointPredicate PointPredicate
TPointFunctor PointFunctor
static void initFromIncidentPointsRange(const TIteratorOnPairs &itb, const TIteratorOnPairs &ite, Image &aImg, AcceptedPointSet &aSet, const Value &aValue, bool aFlagIsPositive=true)
void update(const Point &aPoint)
const PointPredicate & myPointPredicate
bool addNewAcceptedPoint(Point &aPoint, Value &aValue)
FMM & operator=(const FMM &other)
bool addNewCandidate(const Point &aPoint)
FMM(Image &aImg, AcceptedPointSet &aSet, ConstAlias< PointPredicate > aPointPredicate, PointFunctor &aPointFunctor)
FMM(Image &aImg, AcceptedPointSet &aSet, ConstAlias< PointPredicate > aPointPredicate)
bool computeOneStep(Point &aPoint, Value &aValue)
BOOST_CONCEPT_ASSERT((concepts::CPointFunctor< TPointFunctor >))
FMM(Image &aImg, AcceptedPointSet &aSet, ConstAlias< PointPredicate > aPointPredicate, const Area &aAreaThreshold, const Value &aValueThreshold)
PointFunctor::Value Value
PointFunctor * myPointFunctorPtr
std::set< PointValue, detail::PointValueCompare< PointValue > > CandidatePointSet
static void initFromBelsRange(const KSpace &aK, const TIteratorOnBels &itb, const TIteratorOnBels &ite, Image &aImg, AcceptedPointSet &aSet, const Value &aValue, bool aFlagIsPositive=true)
CandidatePointSet myCandidatePoints
std::pair< Point, Value > PointValue
const bool myFlagIsOwning
void selfDisplay(std::ostream &out) const
BOOST_STATIC_ASSERT((boost::is_same< Point, typename PointPredicate::Point >::value))
BOOST_CONCEPT_ASSERT((concepts::CPointPredicate< TPointPredicate >))
BOOST_STATIC_ASSERT((boost::is_same< Point, typename AcceptedPointSet::Point >::value))
Point::Dimension Dimension
BOOST_CONCEPT_ASSERT((concepts::CDigitalSet< TSet >))
FMM(Image &aImg, AcceptedPointSet &aSet, ConstAlias< PointPredicate > aPointPredicate, const Area &aAreaThreshold, const Value &aValueThreshold, PointFunctor &aPointFunctor)
BOOST_CONCEPT_ASSERT((concepts::CImage< TImage >))
static void initFromPointsRange(const TIteratorOnPoints &itb, const TIteratorOnPoints &ite, Image &aImg, AcceptedPointSet &aSet, const Value &aValue)
static void initFromBelsRange(const KSpace &aK, const TIteratorOnBels &itb, const TIteratorOnBels &ite, const TImplicitFunction &aF, Image &aImg, AcceptedPointSet &aSet, bool aFlagIsPositive=true)
static const Dimension dimension
Aim: This class is a model of CCellularGridSpaceND. It represents the cubical grid as a cell complex,...
DGtal::Dimension Dimension
Copy of the dimension type.
Aim: Small binary predicate to order candidates points according to their (absolute) distance value.
bool operator()(const T &a, const T &b) const
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
boost::uint64_t uint64_t
unsigned 64-bit integer.
Aim: Represents a set of points within the given domain. This set of points is modifiable by the user...
Aim: Defines the concept describing a read/write image, having an output iterator.
Aim: Defines a functor on points.
Aim: Defines a predicate on a point.