34#if defined(VoronoiMapComplete_RECURSES)
35#error Recursive header files inclusion detected in VoronoiMapComplete.h
38#define VoronoiMapComplete_RECURSES
40#if !defined VoronoiMapComplete_h
42#define VoronoiMapComplete_h
50#include "DGtal/base/Common.h"
51#include "DGtal/base/CountedPtr.h"
52#include "DGtal/images/ImageContainerBySTLVector.h"
53#include "DGtal/images/CImage.h"
54#include "DGtal/kernel/CPointPredicate.h"
55#include "DGtal/kernel/domains/HyperRectDomain.h"
56#include "DGtal/geometry/volumes/distance/CSeparableMetric.h"
57#include "DGtal/kernel/domains/HyperRectDomain.h"
58#include "DGtal/base/ConstAlias.h"
128 template <
typename TSpace,
129 typename TPointPredicate,
130 typename TSeparableMetric,
132 ImageContainerBySTLVector<HyperRectDomain<TSpace>,
133 std::set<typename TSpace::Vector> >
146 typename TPointPredicate::Point >::value ));
150 typename TImageContainer::Domain::Space >::value ));
179 typedef typename Space::Point::Coordinate
Abscissa;
430 template <
typename S,
typename P,
431 typename Sep,
typename TI>
441#include "DGtal/geometry/volumes/distance/VoronoiMapComplete.ih"
448#undef VoronoiMapComplete_RECURSES
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Aim: Smart pointer based on reference counts.
Aim: Parallelepidec region of a digital space, model of a 'CDomain'.
ConstRange constRange() const
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.
CountedPtr< OutputImage > myImagePtr
Voronoi map image.
const Domain & domain() const
TImageContainer OutputImage
Type of resulting image.
Value operator()(const Point &aPoint) const
Point myDomainExtent
Domain extent.
Point::Coordinate projectCoordinate(typename Point::Coordinate aCoordinate, const Dimension aDim) const
BOOST_STATIC_ASSERT((boost::is_same< HyperRectDomain< TSpace >, typename TImageContainer::Domain >::value))
bool isPeriodic(const Dimension n) const
void selfDisplay(std::ostream &out) const
std::vector< Dimension > myPeriodicityIndex
Index of the periodic dimensions.
TSeparableMetric SeparableMetric
Definition of the separable metric type.
VoronoiMapComplete(ConstAlias< Domain > aDomain, ConstAlias< PointPredicate > predicate, ConstAlias< SeparableMetric > aMetric, PeriodicitySpec const &aPeriodicitySpec)
std::array< bool, Space::dimension > PeriodicitySpec
Periodicity specification type.
ConstRange constRange() const
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
Space::Point::Coordinate Abscissa
Point myLowerBoundCopy
Copy of the image lower bound.
BOOST_STATIC_ASSERT((boost::is_same< TSpace, typename TImageContainer::Domain::Space >::value))
OutputImage::ConstRange ConstRange
Definition of the image value type.
BOOST_STATIC_ASSERT((boost::is_same< typename TSpace::Point, typename TPointPredicate::Point >::value))
Both Space points and PointPredicate points must be the same.
PeriodicitySpec const & getPeriodicitySpec() const
BOOST_CONCEPT_ASSERT((concepts::CSeparableMetric< TSeparableMetric >))
void computeOtherStep1D(const Point &row, const Dimension dim) const
const SeparableMetric * metric() const
const PointPredicate * myPointPredicatePtr
Pointer to the point predicate.
const Domain * myDomainPtr
Pointer to the computation domain.
TImageContainer::Domain Domain
Definition of the underlying domain type.
VoronoiMapComplete< TSpace, TPointPredicate, TSeparableMetric, TImageContainer > Self
Self type.
Point myInfinity
Value to act as a +infinity value.
BOOST_STATIC_ASSERT((boost::is_same< std::set< typename TSpace::Vector >, typename TImageContainer::Value >::value))
DGtal::int64_t IntegerLong
Large integer type for SeparableMetricHelper construction.
const SeparableMetric * myMetricPtr
Pointer to the separable metric instance.
TSpace Space
Copy of the space type.
VoronoiMapComplete()=delete
BOOST_CONCEPT_ASSERT((concepts::CPointPredicate< TPointPredicate >))
~VoronoiMapComplete()=default
Point projectPoint(Point aPoint) const
void computeOtherSteps(const Dimension dim) const
BOOST_CONCEPT_ASSERT((concepts::CImage< TImageContainer >))
Space::Dimension Dimension
OutputImage::Value Value
Definition of the image value type.
VoronoiMapComplete(ConstAlias< Domain > aDomain, ConstAlias< PointPredicate > predicate, ConstAlias< SeparableMetric > aMetric)
TPointPredicate PointPredicate
Copy of the point predicate type.
Self & operator=(const Self &aOtherVoronoiMap)=default
Point myUpperBoundCopy
Copy of the image lower bound.
PeriodicitySpec myPeriodicitySpec
Periodicity along each dimension.
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 ClosedIntegerHalfPlane< TSpace > &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.
ImageContainerBySTLVector< HyperRectDomain< Z2i::Space >, std::unordered_set< Z2i::Point > > TImageContainer