34 #if defined(VoronoiMap_RECURSES) 35 #error Recursive header files inclusion detected in VoronoiMap.h 36 #else // defined(VoronoiMap_RECURSES) 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,
122 typename TImageContainer =
123 ImageContainerBySTLVector<HyperRectDomain<TSpace>,
183 TSeparableMetric,TImageContainer >
Self;
422 template <
typename S,
typename P,
423 typename Sep,
typename TI>
425 operator<< ( std::ostream & out, const VoronoiMap<S,P,Sep,TI> & object );
433 #include "DGtal/geometry/volumes/distance/VoronoiMap.ih" 438 #endif // !defined VoronoiMap_h 440 #undef VoronoiMap_RECURSES 441 #endif // else defined(VoronoiMap_RECURSES)
Aim: Implementation of the linear in time Voronoi map construction.
Point myLowerBoundCopy
Copy of the image lower bound.
HyperRectDomain< Space > Domain
Component Coordinate
Type for Point elements.
Self & operator=(const Self &aOtherVoronoiMap)=default
ConstRange constRange() const
PeriodicitySpec const & getPeriodicitySpec() const
TSeparableMetric SeparableMetric
Definition of the separable metric type.
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
DGtal::uint32_t Dimension
Value operator()(const Point &aPoint) const
Image::ConstRange ConstRange
OutputImage::ConstRange ConstRange
Definition of the image value type.
Aim: Parallelepidec region of a digital space, model of a 'CDomain'.
BOOST_STATIC_ASSERT((boost::is_same< typename TSpace::Point, typename TPointPredicate::Point >::value))
Both Space points and PointPredicate points must be the same.
Point myDomainExtent
Domain extent.
PeriodicitySpec myPeriodicitySpec
Periodicity along each dimension.
const SeparableMetric * myMetricPtr
Pointer to the separable metric instance.
const SeparableMetric * metric() const
Point myUpperBoundCopy
Copy of the image lower bound.
Space::Point::Coordinate Abscissa
const Domain * myDomainPtr
Pointer to the computation domain.
bool isPeriodic(const Dimension n) const
Point myInfinity
Value to act as a +infinity value.
VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer > Self
Self type.
PointVector< dim, Integer > Vector
Vectors in DGtal::SpaceND.
DGtal::Dimension Dimension
Copy of the type used for the dimension.
DGtal::int64_t IntegerLong
Large integer type for SeparableMetricHelper construction.
Aim: Defines a predicate on a point.
const Domain & domain() const
TImageContainer OutputImage
Type of resulting image.
Aim: Defines the concept describing a digital space, ie a cartesian product of integer lines...
std::vector< Dimension > myPeriodicityIndex
Index of the periodic dimensions.
TSpace Space
Copy of the space type.
Point::Coordinate projectCoordinate(typename Point::Coordinate aCoordinate, const Dimension aDim) const
void computeOtherSteps(const Dimension dim) const
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
TPointPredicate PointPredicate
Copy of the point predicate type.
void computeOtherStep1D(const Point &row, const Dimension dim) const
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: defines the concept of separable metrics.
UnsignedInteger Size
Type used to represent sizes in the digital space.
unsigned int dim(const Vector &z)
FreemanChain< int >::Vector Vector
Vector Value
Definition of the image value type.
CountedPtr< OutputImage > myImagePtr
Voronoi map image.
std::array< bool, Space::dimension > PeriodicitySpec
Periodicity specification type.
Point projectPoint(Point aPoint) const
PointVector< dim, Integer > Point
Points in DGtal::SpaceND.
const PointPredicate * myPointPredicatePtr
Pointer to the point predicate.
TImageContainer::Domain Domain
Definition of the underlying domain type.
Aim: Defines the concept describing a read/write image, having an output iterator.
boost::int64_t int64_t
signed 94-bit integer.
Space::Dimension Dimension
void selfDisplay(std::ostream &out) const