DGtal  0.9.4beta
Public Types | Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes
DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer > Class Template Reference

#include <DGtal/geometry/volumes/distance/VoronoiMap.h>

Inheritance diagram for DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >:
[legend]
Collaboration diagram for DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >:
[legend]

Public Types

typedef TSpace Space
 
typedef TPointPredicate PointPredicate
 
typedef TImageContainer::Domain Domain
 
typedef TSeparableMetric SeparableMetric
 
typedef DGtal::int64_t IntegerLong
 
typedef Space::Vector Vector
 
typedef Space::Point Point
 
typedef Space::Dimension Dimension
 
typedef Space::Size Size
 
typedef Space::Point::Coordinate Abscissa
 
typedef TImageContainer OutputImage
 
typedef Vector Value
 
typedef OutputImage::ConstRange ConstRange
 
typedef VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer > Self
 
typedef std::array< bool, Space::dimensionPeriodicitySpec
 

Public Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CSpace< TSpace >))
 
 BOOST_CONCEPT_ASSERT ((concepts::CPointPredicate< TPointPredicate >))
 
 BOOST_CONCEPT_ASSERT ((concepts::CSeparableMetric< TSeparableMetric >))
 
 BOOST_CONCEPT_ASSERT ((concepts::CImage< TImageContainer >))
 
 BOOST_STATIC_ASSERT ((boost::is_same< typename TSpace::Point, typename TPointPredicate::Point >::value))
 
 BOOST_STATIC_ASSERT ((boost::is_same< TSpace, typename TImageContainer::Domain::Space >::value))
 
 BOOST_STATIC_ASSERT ((boost::is_same< typename TSpace::Vector, typename TImageContainer::Value >::value))
 
 BOOST_STATIC_ASSERT ((boost::is_same< HyperRectDomain< TSpace >, typename TImageContainer::Domain >::value))
 
 VoronoiMap (ConstAlias< Domain > aDomain, ConstAlias< PointPredicate > predicate, ConstAlias< SeparableMetric > aMetric)
 
 VoronoiMap (ConstAlias< Domain > aDomain, ConstAlias< PointPredicate > predicate, ConstAlias< SeparableMetric > aMetric, PeriodicitySpec const &aPeriodicitySpec)
 
 ~VoronoiMap ()=default
 
 VoronoiMap ()=delete
 
Selfoperator= (const Self &aOtherVoronoiMap)=default
 
const Domaindomain () const
 
ConstRange constRange () const
 
Value operator() (const Point &aPoint) const
 
const SeparableMetricmetric () const
 
PeriodicitySpec const & getPeriodicitySpec () const
 
bool isPeriodic (const Dimension n) const
 
Point projectPoint (Point aPoint) const
 
void selfDisplay (std::ostream &out) const
 

Protected Attributes

const SeparableMetricmyMetricPtr
 
CountedPtr< OutputImagemyImagePtr
 
PeriodicitySpec myPeriodicitySpec
 

Private Member Functions

void compute ()
 
void computeOtherSteps (const Dimension dim) const
 
void computeOtherStep1D (const Point &row, const Dimension dim) const
 
Point::Coordinate projectCoordinate (typename Point::Coordinate aCoordinate, const Dimension aDim) const
 

Private Attributes

const DomainmyDomainPtr
 
const PointPredicatemyPointPredicatePtr
 
Point myLowerBoundCopy
 
Point myUpperBoundCopy
 
Point myInfinity
 
std::vector< DimensionmyPeriodicityIndex
 
Point myDomainExtent
 

Detailed Description

template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
class DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >

Aim: Implementation of the linear in time Voronoi map construction.

Description of template class 'VoronoiMap'

The algorithm uses a seperable process to construct Voronoi maps which has been described in [53] [22]. Along periodic dimensions, the algorithm is adapted following [23].

Given a domain and a point predicate, an instance returns, for each point in the domain, the closest point for which the predicate if false. Following Computational Geometry terminoliogy, points for which the predicate is false are "sites" for the Voronoi map construction. If a point is equi-distant to two sites (e.g. if the digital point belong to a Voronoi cell boundary in the Euclidean space), this Voronoi map construction will only keep one of them.

By default, the domain is considered non-periodic but per-dimension periodicity can be specified in the constructor. When the domain has periodic dimensions, the closest point coordinates B to a given point A may not be between the lower and upper bounds of the domain, in such a way that the non-periodic distance between A and B is equal to their distance considering the periodicity.

The metric is specified by a model of concepts::CSeparableMetric (for instance, any instance of ExactPredicateLpSeparableMetric or InexactPredicateLpSeparableMetric). If the separable metric has a complexity of O(h) for its "hiddenBy" predicate, the overall Voronoi construction algorithm is in \( O(h.d.n^d)\) for \( n^d\) domains (see class constructor). For Euclidean the \( l_2\) metric, the overall computation is in \( O(d.n^d)\), which is optimal.

If DGtal has been built with OpenMP support (WITH_OPENMP flag set to "true"), the computation is done in parallel (multithreaded) in an optimal way: on p processors, expected runtime is in \( O(h.d.n^d / p)\).

This class is a model of concepts::CConstImage.

See also
  Volumetric Analysis on Toric domains
Template Parameters
TSpacetype of Digital Space (model of concepts::CSpace).
TPointPredicatepoint predicate returning true for points from which we compute the distance (model of concepts::CPointPredicate)
TSeparableMetrica model of concepts::CSeparableMetric
TImageContainerany model of concepts::CImage to store the VoronoiMap (default: ImageContainerBySTLVector). The space of the image container and the TSpace should match. Furthermore the container value type must be TSpace::Vector. Lastly, the domain of the container must be HyperRectDomain.
Examples:
geometry/volumes/distance/voronoimap2D.cpp.

Definition at line 126 of file VoronoiMap.h.

Member Typedef Documentation

template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
typedef Space::Point::Coordinate DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::Abscissa

Definition at line 170 of file VoronoiMap.h.

template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
typedef OutputImage::ConstRange DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::ConstRange

Definition of the image value type.

Definition at line 179 of file VoronoiMap.h.

template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
typedef Space::Dimension DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::Dimension

Definition at line 168 of file VoronoiMap.h.

template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
typedef TImageContainer::Domain DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::Domain

Definition of the underlying domain type.

Definition at line 158 of file VoronoiMap.h.

template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
typedef DGtal::int64_t DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::IntegerLong

Large integer type for SeparableMetricHelper construction.

Definition at line 164 of file VoronoiMap.h.

template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
typedef TImageContainer DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::OutputImage

Type of resulting image.

Definition at line 173 of file VoronoiMap.h.

template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
typedef std::array< bool, Space::dimension > DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::PeriodicitySpec

Periodicity specification type.

Definition at line 187 of file VoronoiMap.h.

template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
typedef Space::Point DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::Point

Definition at line 167 of file VoronoiMap.h.

template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
typedef TPointPredicate DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::PointPredicate

Copy of the point predicate type.

Definition at line 155 of file VoronoiMap.h.

template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
typedef VoronoiMap< TSpace, TPointPredicate, TSeparableMetric,TImageContainer > DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::Self

Self type.

Definition at line 183 of file VoronoiMap.h.

template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
typedef TSeparableMetric DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::SeparableMetric

Definition of the separable metric type.

Definition at line 161 of file VoronoiMap.h.

template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
typedef Space::Size DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::Size

Definition at line 169 of file VoronoiMap.h.

template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
typedef TSpace DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::Space

Copy of the space type.

Definition at line 152 of file VoronoiMap.h.

template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
typedef Vector DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::Value

Definition of the image value type.

Definition at line 176 of file VoronoiMap.h.

template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
typedef Space::Vector DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::Vector

Definition at line 166 of file VoronoiMap.h.

Constructor & Destructor Documentation

template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::VoronoiMap ( ConstAlias< Domain aDomain,
ConstAlias< PointPredicate predicate,
ConstAlias< SeparableMetric aMetric 
)

Constructor in the non-periodic case.

This constructor computes the Voronoi Map of a set of point sites using a SeparableMetric metric, on a non-periodic domain.

The method associates to each point satisfying the foreground predicate, the closest site for which the predicate is false. This algorithm is \( O(h.d.|domain size|)\) if the separable metric "hiddenBy" predicate is in \( O(h)\).

Parameters
aDomaina pointer to the (hyper-rectangular) domain on which the computation is performed.
predicatea pointer to the point predicate to define the Voronoi sites (false points).
aMetrica pointer to the separable metric instance.
template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::VoronoiMap ( ConstAlias< Domain aDomain,
ConstAlias< PointPredicate predicate,
ConstAlias< SeparableMetric aMetric,
PeriodicitySpec const &  aPeriodicitySpec 
)

Constructor with periodicity specification.

This constructor computes the Voronoi Map of a set of point sites using a SeparableMetric metric, on a domain with specified periodicity.

The method associates to each point satisfying the foreground predicate, the closest site for which the predicate is false. This algorithm is \( O(h.d.|domain size|)\) if the separable metric "hiddenBy" predicate is in \( O(h)\).

Parameters
aDomaina pointer to the (hyper-rectangular) domain on which the computation is performed.
predicatea pointer to the point predicate to define the Voronoi sites (false points).
aMetrica pointer to the separable metric instance.
aPeriodicitySpecan array of size equal to the space dimension where the i-th value is true if the i-th dimension of the space is periodic, false otherwise.
template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::~VoronoiMap ( )
default

Default destructor

template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::VoronoiMap ( )
delete

Disabling default constructor.

Member Function Documentation

template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::BOOST_CONCEPT_ASSERT ( (concepts::CSpace< TSpace >)  )
template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::BOOST_CONCEPT_ASSERT ( (concepts::CPointPredicate< TPointPredicate >)  )
template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::BOOST_CONCEPT_ASSERT ( (concepts::CSeparableMetric< TSeparableMetric >)  )
template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::BOOST_CONCEPT_ASSERT ( (concepts::CImage< TImageContainer >)  )
template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::BOOST_STATIC_ASSERT ( (boost::is_same< typename TSpace::Point, typename TPointPredicate::Point >::value)  )

Both Space points and PointPredicate points must be the same.

template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::BOOST_STATIC_ASSERT ( (boost::is_same< TSpace, typename TImageContainer::Domain::Space >::value)  )
template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::BOOST_STATIC_ASSERT ( (boost::is_same< typename TSpace::Vector, typename TImageContainer::Value >::value)  )
template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::BOOST_STATIC_ASSERT ( (boost::is_same< HyperRectDomain< TSpace >, typename TImageContainer::Domain >::value)  )
template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
void DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::compute ( )
private

Compute the Voronoi Map of a set of point sites using a SeparableMetric metric. The method associates to each point satisfying the foreground predicate, the closest site for which the predicate is false. This algorithm is O(h.d.|domain size|).

template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
void DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::computeOtherStep1D ( const Point row,
const Dimension  dim 
) const
private

Given a voronoi map valid at dimension dim-1, this method updates the map to make it consistent at dimension dim along the 1D span starting at row along the dimension dim.

Parameters
[in]rowstarting point of the 1D process.
[in]dimdimension of the update.
template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
void DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::computeOtherSteps ( const Dimension  dim) const
private

Compute the other steps of the separable Voronoi map.

Parameters
[in]dimthe dimension to process
template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
ConstRange DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::constRange ( ) const
inline

Returns a const range on the Voronoi map values.

Returns
a const range

Definition at line 274 of file VoronoiMap.h.

References DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::myImagePtr.

275  {
276  return myImagePtr->constRange();
277  }
CountedPtr< OutputImage > myImagePtr
Voronoi map image.
Definition: VoronoiMap.h:409
template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
const Domain& DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::domain ( ) const
inline

Returns a reference (const) to the Voronoi map domain.

Returns
a domain

Definition at line 265 of file VoronoiMap.h.

References DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::myDomainPtr.

Referenced by DGtal::DistanceTransformation< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::domain().

266  {
267  return *myDomainPtr;
268  }
const Domain * myDomainPtr
Pointer to the computation domain.
Definition: VoronoiMap.h:383
template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
PeriodicitySpec const& DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::getPeriodicitySpec ( ) const
inline

Periodicity specification.

Returns
the periodicity specification array.

Definition at line 302 of file VoronoiMap.h.

References DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::myPeriodicitySpec.

303  {
304  return myPeriodicitySpec;
305  }
PeriodicitySpec myPeriodicitySpec
Periodicity along each dimension.
Definition: VoronoiMap.h:412
template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
bool DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::isPeriodic ( const Dimension  n) const
inline

Periodicity specification along one dimensions.

Parameters
[in]nthe dimension index.
Returns
true if the n-th dimension is periodic, false otherwise.

Definition at line 312 of file VoronoiMap.h.

References DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::myPeriodicitySpec.

313  {
314  return myPeriodicitySpec[ n ];
315  }
PeriodicitySpec myPeriodicitySpec
Periodicity along each dimension.
Definition: VoronoiMap.h:412
template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
const SeparableMetric* DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::metric ( ) const
inline
Returns
Returns an alias to the underlying metric.

Definition at line 293 of file VoronoiMap.h.

References DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::myMetricPtr.

Referenced by DGtal::DistanceTransformation< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::metric().

294  {
295  return myMetricPtr;
296  }
const SeparableMetric * myMetricPtr
Pointer to the separable metric instance.
Definition: VoronoiMap.h:406
template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
Value DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::operator() ( const Point aPoint) const
inline

Access to a Voronoi value (a.k.a. vector to the closest site) at a point.

Parameters
aPointthe point to probe.

Definition at line 285 of file VoronoiMap.h.

References DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::myImagePtr.

286  {
287  return myImagePtr->operator()(aPoint);
288  }
CountedPtr< OutputImage > myImagePtr
Voronoi map image.
Definition: VoronoiMap.h:409
template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
Self& DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::operator= ( const Self aOtherVoronoiMap)
default

Assignment operator from another Voronoi map.

Parameters
aOtherVoronoiMapanother instance of Self
Returns
a reference to Self
template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
Point::Coordinate DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::projectCoordinate ( typename Point::Coordinate  aCoordinate,
const Dimension  aDim 
) const
private

Project a coordinate into the domain, taking into account the periodicity.

Precondition
The given coordinate must come from operator()(const Point &) const (for performance reasons).
Parameters
aCoordinatethe coordinate.
aDimdimension of the coordinate.
Returns
the coordinates projected into the domain bounds accordingly to the periodicity specification.
template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
Point DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::projectPoint ( Point  aPoint) const

Project point coordinates into the domain, taking into account the periodicity.

Precondition
The given point must come from operator()(const Point &) const (for performance reasons).
Parameters
aPointthe point to project
Returns
the coordinates projected into the domain bounds accordingly to the periodicity specification.
template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
void DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::selfDisplay ( std::ostream &  out) const

Field Documentation

template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
Point DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::myDomainExtent
private

Domain extent.

Definition at line 401 of file VoronoiMap.h.

template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
const Domain* DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::myDomainPtr
private

Pointer to the computation domain.

Definition at line 383 of file VoronoiMap.h.

Referenced by DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::domain().

template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
CountedPtr<OutputImage> DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::myImagePtr
protected
template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
Point DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::myInfinity
private

Value to act as a +infinity value.

Definition at line 395 of file VoronoiMap.h.

template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
Point DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::myLowerBoundCopy
private

Copy of the image lower bound.

Definition at line 389 of file VoronoiMap.h.

template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
const SeparableMetric* DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::myMetricPtr
protected
template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
std::vector< Dimension > DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::myPeriodicityIndex
private

Index of the periodic dimensions.

Definition at line 398 of file VoronoiMap.h.

template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
PeriodicitySpec DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::myPeriodicitySpec
protected
template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
const PointPredicate* DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::myPointPredicatePtr
private

Pointer to the point predicate.

Definition at line 386 of file VoronoiMap.h.

template<typename TSpace, typename TPointPredicate, typename TSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<TSpace>, typename TSpace::Vector>>
Point DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::myUpperBoundCopy
private

Copy of the image lower bound.

Definition at line 392 of file VoronoiMap.h.


The documentation for this class was generated from the following file: