31#if defined(ChamferNorm2D_RECURSES)
32#error Recursive header files inclusion detected in ChamferNorm2D.h
35#define ChamferNorm2D_RECURSES
37#if !defined ChamferNorm2D_h
39#define ChamferNorm2D_h
46#include "DGtal/base/Common.h"
47#include "DGtal/kernel/CSpace.h"
52 namespace experimental
85 template <
typename TSpace>
140 const Value norm = 1.0 );
154 return (( a[0]*b[1] - a[1]*b[0] ) > 0);
166 return (( a[0]*b[1] - a[1]*b[0] ) >= 0);
273 const Point &second)
const
387 Point &nextMidPoint)
const ;
417 Point &nextMidPoint)
const ;
435 const Point &startingPoint,
436 const Point &endPoint,
456 const Point &startingPoint,
457 const Point &endPoint,
539 template <
typename T>
549#include "DGtal/geometry/volumes/distance//ChamferNorm2D.ih"
556#undef ChamferNorm2D_RECURSES
TInteger Integer
Arithmetic ring induced by (+,-,*) and Integer numbers.
Aim: implements a model of CSeparableMetric for Chamfer and path based norms.
BOOST_STATIC_ASSERT(TSpace::dimension==2)
Abscissa getLowerRayIntersection(const Vector &aP, const Vector &aQ, const Point &Lmin, const Point &Lmax, const Dimension aDimension) const
BOOST_STATIC_CONSTANT(Abscissa, myInfinity=32562)
Static constant.
Vector getNormalFromCone(ConstIterator aCone) const
ConstIterator getCone(const Vector &aDirection) const
Directions::const_iterator ConstIterator
double Value
Value type for embedded distance evaluation.
Abscissa getLowerVoronoiEdgeAbscissa(const Point &u, const Point &v, const Point &startingPoint, const Point &endPoint, const Dimension dim) const
DGtal::Closest closest(const Point &origin, const Point &first, const Point &second) const
ChamferNorm2D< Space > & operator=(const ChamferNorm2D< Space > &other)
ChamferNorm2D(const unsigned int aN)
bool hiddenBy(const Point &u, const Point &v, const Point &w, const Point &startingPoint, const Point &endPoint, const Dimension dim) const
ConstIterator shrinkPSubMask(ConstIterator aBegin, ConstIterator aEnd, const Point &aP, const Point &aQ, const Point &Lmin, const Point &Lmax, const Dimension aDimension, Point &midPoint, Point &nextMidPoint) const
Vector canonicalRay(const Vector &aRay) const
unsigned int size() const
ChamferNorm2D(const Directions &aDirectionSet, const Directions &aNormalDirectionSet, const Value norm=1.0)
Directions myNormals
Normal to cone container.
Value operator()(const Point &P, const Point &Q) const
void selfDisplay(std::ostream &out) const
Space::Point Point
Type for points.
RawValue rawDistance(const Point &P, const Point &Q) const
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
TSpace Space
Underlying Space.
LessThanAngular myLessThanAngular
Instance of comparator functor.
ConstIterator getCone(const Vector &aDirection, ConstIterator aBegin, ConstIterator aEnd) const
Directions myDirections
Mask container.
ChamferNorm2D(const ChamferNorm2D &other)
std::vector< Vector > Directions
Container for set of directions.
Space::Vector Vector
Type for vectors.
Abscissa getUpperRayIntersection(const Vector &aP, const Vector &aQ, const Point &Lmin, const Point &Lmax, const Dimension aDimension) const
Value myNorm
Normalization factor.
Space::Integer RawValue
Value type for exact distance evaluation.
Vector::Component Abscissa
Vector components type.
ConstIterator shrinkP(ConstIterator aBegin, ConstIterator aEnd, const Point &aP, const Point &aQ, const Point &Lmin, const Point &Lmax, const Dimension aDimension, Point &midPoint, Point &nextMidPoint) const
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
DGtal::uint32_t Dimension
Aim: Defines the concept describing a digital space, ie a cartesian product of integer lines.
bool operator()(const Vector &a, const Vector &b) const
bool operator()(const Vector &a, const Vector &b) const