34 #if defined(VoronoiMap_RECURSES)
35 #error Recursive header files inclusion detected in VoronoiMap.h
38 #define VoronoiMap_RECURSES
40 #if !defined VoronoiMap_h
49 #include "DGtal/base/Common.h"
50 #include "DGtal/base/CountedPtr.h"
51 #include "DGtal/images/ImageContainerBySTLVector.h"
52 #include "DGtal/images/CImage.h"
53 #include "DGtal/kernel/CPointPredicate.h"
54 #include "DGtal/kernel/domains/HyperRectDomain.h"
55 #include "DGtal/geometry/volumes/distance/CSeparableMetric.h"
56 #include "DGtal/kernel/domains/HyperRectDomain.h"
57 #include "DGtal/base/ConstAlias.h"
119 template <
typename TSpace,
120 typename TPointPredicate,
121 typename TSeparableMetric,
123 ImageContainerBySTLVector<HyperRectDomain<TSpace>,
422 template <
typename S,
typename P,
423 typename Sep,
typename TI>
433 #include "DGtal/geometry/volumes/distance/VoronoiMap.ih"
440 #undef VoronoiMap_RECURSES
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Aim: Parallelepidec region of a digital space, model of a 'CDomain'.
ConstRange constRange() const
Component Coordinate
Type for Point elements.
Aim: model of CConstBidirectionalRangeFromPoint that adapts any range of elements bounded by two iter...
size_t Size
Type used to represent sizes in the digital space.
DGtal::Dimension Dimension
Copy of the type used for the dimension.
Aim: Implementation of the linear in time Voronoi map construction.
ConstRange constRange() const
Point myLowerBoundCopy
Copy of the image lower bound.
Point::Coordinate projectCoordinate(typename Point::Coordinate aCoordinate, const Dimension aDim) const
Point myDomainExtent
Domain extent.
BOOST_CONCEPT_ASSERT((concepts::CImage< TImageContainer >))
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
std::vector< Dimension > myPeriodicityIndex
Index of the periodic dimensions.
BOOST_STATIC_ASSERT((boost::is_same< typename TSpace::Point, typename TPointPredicate::Point >::value))
Both Space points and PointPredicate points must be the same.
PeriodicitySpec myPeriodicitySpec
Periodicity along each dimension.
BOOST_STATIC_ASSERT((boost::is_same< typename TSpace::Vector, typename TImageContainer::Value >::value))
BOOST_STATIC_ASSERT((boost::is_same< TSpace, typename TImageContainer::Domain::Space >::value))
PeriodicitySpec const & getPeriodicitySpec() const
bool isPeriodic(const Dimension n) const
TImageContainer::Domain Domain
Definition of the underlying domain type.
TSeparableMetric SeparableMetric
Definition of the separable metric type.
void computeOtherSteps(const Dimension dim) const
BOOST_STATIC_ASSERT((boost::is_same< HyperRectDomain< TSpace >, typename TImageContainer::Domain >::value))
Space::Dimension Dimension
Point myInfinity
Value to act as a +infinity value.
std::array< bool, Space::dimension > PeriodicitySpec
Periodicity specification type.
Value operator()(const Point &aPoint) const
VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer > Self
Self type.
VoronoiMap(ConstAlias< Domain > aDomain, ConstAlias< PointPredicate > predicate, ConstAlias< SeparableMetric > aMetric, PeriodicitySpec const &aPeriodicitySpec)
CountedPtr< OutputImage > myImagePtr
Voronoi map image.
void selfDisplay(std::ostream &out) const
TSpace Space
Copy of the space type.
Point myUpperBoundCopy
Copy of the image lower bound.
Space::Point::Coordinate Abscissa
const SeparableMetric * myMetricPtr
Pointer to the separable metric instance.
Vector Value
Definition of the image value type.
DGtal::int64_t IntegerLong
Large integer type for SeparableMetricHelper construction.
TImageContainer OutputImage
Type of resulting image.
TPointPredicate PointPredicate
Copy of the point predicate type.
BOOST_CONCEPT_ASSERT((concepts::CSeparableMetric< TSeparableMetric >))
const Domain * myDomainPtr
Pointer to the computation domain.
Point projectPoint(Point aPoint) const
VoronoiMap(ConstAlias< Domain > aDomain, ConstAlias< PointPredicate > predicate, ConstAlias< SeparableMetric > aMetric)
OutputImage::ConstRange ConstRange
Definition of the image value type.
const SeparableMetric * metric() const
void computeOtherStep1D(const Point &row, const Dimension dim) const
Self & operator=(const Self &aOtherVoronoiMap)=default
BOOST_CONCEPT_ASSERT((concepts::CPointPredicate< TPointPredicate >))
const PointPredicate * myPointPredicatePtr
Pointer to the point predicate.
const Domain & domain() const
DigitalPlane::Point Vector
DGtal is the top-level namespace which contains all DGtal functions and types.
boost::int64_t int64_t
signed 94-bit integer.
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
Aim: Defines the concept describing a read/write image, having an output iterator.
Aim: Defines a predicate on a point.
Aim: defines the concept of separable metrics.
Aim: Defines the concept describing a digital space, ie a cartesian product of integer lines.
HyperRectDomain< Space > Domain
ImageContainerBySTLVector< HyperRectDomain< Z2i::Space >, std::unordered_set< Z2i::Point > > TImageContainer
unsigned int dim(const Vector &z)