35 #if defined(FMM_RECURSES)
36 #error Recursive header files inclusion detected in FMM.h
37 #else // defined(FMM_RECURSES)
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> >
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"
537 #endif // !defined FMM_h
540 #endif // else defined(FMM_RECURSES)
DGtal::Dimension Dimension
Copy of the dimension type.
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
bool addNewAcceptedPoint(Point &aPoint, Value &aValue)
FMM & operator=(const FMM &other)
static const Dimension dimension
std::pair< Point, Value > PointValue
TPointFunctor PointFunctor
Aim: Small binary predicate to order candidates points according to their (absolute) distance value.
static void initFromBelsRange(const KSpace &aK, const TIteratorOnBels &itb, const TIteratorOnBels &ite, Image &aImg, AcceptedPointSet &aSet, const Value &aValue, bool aFlagIsPositive=true)
const PointPredicate & myPointPredicate
PointFunctor::Value Value
FMM(Image &aImg, AcceptedPointSet &aSet, ConstAlias< PointPredicate > aPointPredicate)
FMM(Image &aImg, AcceptedPointSet &aSet, ConstAlias< PointPredicate > aPointPredicate, const Area &aAreaThreshold, const Value &aValueThreshold)
void update(const Point &aPoint)
Aim: Fast Marching Method (FMM) for nd distance transforms.
std::set< PointValue, detail::PointValueCompare< PointValue > > CandidatePointSet
FMM(Image &aImg, AcceptedPointSet &aSet, ConstAlias< PointPredicate > aPointPredicate, const Area &aAreaThreshold, const Value &aValueThreshold, PointFunctor &aPointFunctor)
PointFunctor * myPointFunctorPtr
static void initFromPointsRange(const TIteratorOnPoints &itb, const TIteratorOnPoints &ite, Image &aImg, AcceptedPointSet &aSet, const Value &aValue)
BOOST_STATIC_ASSERT((boost::is_same< Point, typename AcceptedPointSet::Point >::value))
DGtal is the top-level namespace which contains all DGtal functions and types.
AcceptedPointSet & myAcceptedPoints
static void initFromIncidentPointsRange(const TIteratorOnPairs &itb, const TIteratorOnPairs &ite, Image &aImg, AcceptedPointSet &aSet, const Value &aValue, bool aFlagIsPositive=true)
BOOST_CONCEPT_ASSERT((concepts::CPointFunctor< TPointFunctor >))
Point::Dimension Dimension
BOOST_CONCEPT_ASSERT((concepts::CPointPredicate< TPointPredicate >))
TPointPredicate PointPredicate
const bool myFlagIsOwning
boost::uint64_t uint64_t
unsigned 64-bit integer.
bool operator()(const T &a, const T &b) const
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
static void initFromBelsRange(const KSpace &aK, const TIteratorOnBels &itb, const TIteratorOnBels &ite, const TImplicitFunction &aF, Image &aImg, AcceptedPointSet &aSet, bool aFlagIsPositive=true)
BOOST_STATIC_ASSERT((boost::is_same< Point, typename PointPredicate::Point >::value))
BOOST_CONCEPT_ASSERT((concepts::CImage< TImage >))
CandidatePointSet myCandidatePoints
Aim: Defines a functor on points.
bool computeOneStep(Point &aPoint, Value &aValue)
Aim: Defines a predicate on a point.
Aim: Represents a set of points within the given domain. This set of points is modifiable by the user...
BOOST_CONCEPT_ASSERT((concepts::CDigitalSet< TSet >))
FMM(Image &aImg, AcceptedPointSet &aSet, ConstAlias< PointPredicate > aPointPredicate, PointFunctor &aPointFunctor)
bool addNewCandidate(const Point &aPoint)
void selfDisplay(std::ostream &out) const
Aim: This class is a model of CCellularGridSpaceND. It represents the cubical grid as a cell complex,...
Aim: Defines the concept describing a read/write image, having an output iterator.