DGtal 1.3.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes
DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer > Class Template Reference

Aim: Implementation of the linear in time Power map construction. More...

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

Inheritance diagram for DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >:
DGtal::ReverseDistanceTransformation< TWeightImage, TPSeparableMetric, TImageContainer >

Public Types

typedef TWeightImage WeightImage
 Copy of the distance image types. More...
 
typedef TWeightImage::Value Weight
 
typedef WeightImage::Domain::Space Space
 
typedef Space::Vector Vector
 
typedef Space::Point Point
 
typedef Space::Dimension Dimension
 
typedef Space::Size Size
 
typedef Space::Point::Coordinate Abscissa
 
typedef TImageContainer::Domain Domain
 Definition of the underlying domain type. More...
 
typedef TPowerSeparableMetric PowerSeparableMetric
 We construct the type associated to the separable metric. More...
 
typedef TImageContainer OutputImage
 Type of resulting image. More...
 
typedef Vector Value
 Definition of the image model value type. More...
 
typedef OutputImage::ConstRange ConstRange
 Definition of the image value type. More...
 
typedef PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainerSelf
 Self type. More...
 
typedef std::array< bool, Space::dimensionPeriodicitySpec
 Periodicity specification type. More...
 

Public Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CImage< TImageContainer >))
 
 BOOST_CONCEPT_ASSERT ((concepts::CConstImage< TWeightImage >))
 
 BOOST_CONCEPT_ASSERT ((concepts::CPowerSeparableMetric< TPowerSeparableMetric >))
 
 BOOST_STATIC_ASSERT ((boost::is_same< typename TWeightImage::Domain::Space, typename TImageContainer::Domain::Space >::value))
 
 BOOST_STATIC_ASSERT ((boost::is_same< typename TWeightImage::Domain::Space::Vector, typename TImageContainer::Value >::value))
 
 BOOST_STATIC_ASSERT ((boost::is_same< HyperRectDomain< typename TWeightImage::Domain::Space >, typename TImageContainer::Domain >::value))
 
 PowerMap (ConstAlias< Domain > aDomain, ConstAlias< WeightImage > aWeightImage, ConstAlias< PowerSeparableMetric > aMetric)
 
 PowerMap (ConstAlias< Domain > aDomain, ConstAlias< WeightImage > aWeightImage, ConstAlias< PowerSeparableMetric > aMetric, PeriodicitySpec const &aPeriodicitySpec)
 
 PowerMap ()=delete
 
 ~PowerMap ()=default
 
Selfoperator= (const Self &aOtherPowerMap)=default
 
const Domaindomain () const
 
ConstRange constRange () const
 
Value operator() (const Point &aPoint) const
 
const PowerSeparableMetricmetricPtr () const
 
const WeightImageweightImagePtr () 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 PowerSeparableMetricmyMetricPtr
 Pointer to the separable metric instance. More...
 
CountedPtr< OutputImagemyImagePtr
 Power map image. More...
 
const WeightImagemyWeightImagePtr
 Pointer to the point predicate. More...
 
PeriodicitySpec myPeriodicitySpec
 Periodicity along each dimension. More...
 

Private Member Functions

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

Private Attributes

const DomainmyDomainPtr
 Pointer to the computation domain. More...
 
Point myLowerBoundCopy
 Copy of the image lower bound. More...
 
Point myUpperBoundCopy
 Copy of the image lower bound. More...
 
Point myInfinity
 Value to act as a +infinity value. More...
 
std::vector< DimensionmyPeriodicityIndex
 Index of the periodic dimensions. More...
 
Point myDomainExtent
 Domain extent. More...
 

Detailed Description

template<typename TWeightImage, typename TPowerSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
class DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >

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

Description of template class 'PowerMap'

The algorithm uses a separable process to construct Power maps as discussed in [25]. Along periodic dimensions, the algorithm is adapted following [32].

Given an image mapping points to values and a power separable metric, the class computes the power map of the weighted points specified in the image. Similarly to the VoronoiMap class, if two points are equi-distant according to the power distance, this power map will only consider 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 power distance between A and B is equal to their power distance considering the periodicity.

If the separable metric has a complexity of O(h) for its "hiddenByPower" predicate, the overall Power map 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.

This class is a model of concepts::CConstImage.

See also
  Volumetric Analysis on Toric domains
Template Parameters
TWeightImagemodel of CConstImage
TPowerSeparableMetricmodel of concepts::CPowerSeparableMetric
TImageContainerany model of CImage to store the PowerMap (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.

Definition at line 110 of file PowerMap.h.

Member Typedef Documentation

◆ Abscissa

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
typedef Space::Point::Coordinate DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::Abscissa

Definition at line 127 of file PowerMap.h.

◆ ConstRange

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
typedef OutputImage::ConstRange DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::ConstRange

Definition of the image value type.

Definition at line 153 of file PowerMap.h.

◆ Dimension

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
typedef Space::Dimension DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::Dimension

Definition at line 125 of file PowerMap.h.

◆ Domain

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
typedef TImageContainer::Domain DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::Domain

Definition of the underlying domain type.

Definition at line 142 of file PowerMap.h.

◆ OutputImage

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
typedef TImageContainer DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::OutputImage

Type of resulting image.

Definition at line 148 of file PowerMap.h.

◆ PeriodicitySpec

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
typedef std::array< bool, Space::dimension > DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::PeriodicitySpec

Periodicity specification type.

Definition at line 159 of file PowerMap.h.

◆ Point

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
typedef Space::Point DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::Point

Definition at line 124 of file PowerMap.h.

◆ PowerSeparableMetric

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
typedef TPowerSeparableMetric DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::PowerSeparableMetric

We construct the type associated to the separable metric.

Definition at line 145 of file PowerMap.h.

◆ Self

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
typedef PowerMap<TWeightImage, TPowerSeparableMetric, TImageContainer> DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::Self

Self type.

Definition at line 156 of file PowerMap.h.

◆ Size

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
typedef Space::Size DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::Size

Definition at line 126 of file PowerMap.h.

◆ Space

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
typedef WeightImage::Domain::Space DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::Space

Definition at line 122 of file PowerMap.h.

◆ Value

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
typedef Vector DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::Value

Definition of the image model value type.

Definition at line 151 of file PowerMap.h.

◆ Vector

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
typedef Space::Vector DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::Vector

Definition at line 123 of file PowerMap.h.

◆ Weight

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
typedef TWeightImage::Value DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::Weight

Definition at line 121 of file PowerMap.h.

◆ WeightImage

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
typedef TWeightImage DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::WeightImage

Copy of the distance image types.

Definition at line 120 of file PowerMap.h.

Constructor & Destructor Documentation

◆ PowerMap() [1/3]

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::PowerMap ( ConstAlias< Domain aDomain,
ConstAlias< WeightImage aWeightImage,
ConstAlias< PowerSeparableMetric aMetric 
)

Constructor.

This constructor computes the Power 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.

All parameters are aliased in this class.

Note
if weights come from distance transform values, do not forget to square the distance values (for the l2 metric). I.e: \( w_i(c_i)=r_i^2\) for a ball \(B_i(c_i,r_i)\).
Parameters
aDomaindefines the (hyper-rectangular) domain on which the computation is performed.
aWeightImagean image returning the weight for some points
aMetrica power seprable metric instance.

◆ PowerMap() [2/3]

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::PowerMap ( ConstAlias< Domain aDomain,
ConstAlias< WeightImage aWeightImage,
ConstAlias< PowerSeparableMetric aMetric,
PeriodicitySpec const &  aPeriodicitySpec 
)

Constructor with periodicity specification.

This constructor computes the Power 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.

All parameters are aliased in this class.

Parameters
aDomaindefines the (hyper-rectangular) domain on which the computation is performed.
aWeightImagean image returning the weight for some points.
aMetrica power 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.

◆ PowerMap() [3/3]

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::PowerMap ( )
delete

Disable default constructor.

◆ ~PowerMap()

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::~PowerMap ( )
default

Default destructor

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT() [1/3]

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::BOOST_CONCEPT_ASSERT ( (concepts::CConstImage< TWeightImage >)  )

◆ BOOST_CONCEPT_ASSERT() [2/3]

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::BOOST_CONCEPT_ASSERT ( (concepts::CImage< TImageContainer >)  )

◆ BOOST_CONCEPT_ASSERT() [3/3]

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::BOOST_CONCEPT_ASSERT ( (concepts::CPowerSeparableMetric< TPowerSeparableMetric >)  )

◆ BOOST_STATIC_ASSERT() [1/3]

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::BOOST_STATIC_ASSERT ( (boost::is_same< HyperRectDomain< typename TWeightImage::Domain::Space >, typename TImageContainer::Domain >::value)  )

◆ BOOST_STATIC_ASSERT() [2/3]

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::BOOST_STATIC_ASSERT ( (boost::is_same< typename TWeightImage::Domain::Space, typename TImageContainer::Domain::Space >::value)  )

◆ BOOST_STATIC_ASSERT() [3/3]

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::BOOST_STATIC_ASSERT ( (boost::is_same< typename TWeightImage::Domain::Space::Vector, typename TImageContainer::Value >::value)  )

◆ compute()

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
void DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::compute ( )
private

Compute the Power 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(d.|domain size|).

◆ computeOtherStep1D()

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
void DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, 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
rowstarting point of the 1D process.
dimdimension of the update.

◆ computeOtherSteps()

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
void DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::computeOtherSteps ( const Dimension  dim) const
private

Compute the other steps of the separable Power map.

Parameters
dimthe dimension to process

◆ constRange()

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
ConstRange DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::constRange ( ) const
inline

Returns a const range on the Power map values.

Returns
a const range

Definition at line 249 of file PowerMap.h.

250 {
251 return myImagePtr->constRange();
252 }
CountedPtr< OutputImage > myImagePtr
Power map image.
Definition: PowerMap.h:408

References DGtal::ImageContainerBySTLVector< TDomain, TValue >::constRange(), and DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::myImagePtr.

◆ domain()

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
const Domain & DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::domain ( ) const
inline

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

Returns
a domain

Definition at line 239 of file PowerMap.h.

240 {
241 return *myDomainPtr;
242 }
const Domain * myDomainPtr
Pointer to the computation domain.
Definition: PowerMap.h:386

References DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::myDomainPtr.

Referenced by checkPowerMap(), and DGtal::ReverseDistanceTransformation< TWeightImage, TPSeparableMetric, TImageContainer >::domain().

◆ getPeriodicitySpec()

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
PeriodicitySpec const & DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::getPeriodicitySpec ( ) const
inline

Periodicity specification.

Returns
the periodicity specification array.

Definition at line 284 of file PowerMap.h.

285 {
286 return myPeriodicitySpec;
287 }
PeriodicitySpec myPeriodicitySpec
Periodicity along each dimension.
Definition: PowerMap.h:414

References DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::myPeriodicitySpec.

◆ isPeriodic()

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
bool DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, 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 295 of file PowerMap.h.

296 {
297 return myPeriodicitySpec[ n ];
298 }

References DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::myPeriodicitySpec.

Referenced by checkPowerMap().

◆ metricPtr()

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
const PowerSeparableMetric * DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::metricPtr ( ) const
inline
Returns
Returns the underlying metric.

Definition at line 267 of file PowerMap.h.

268 {
269 return myMetricPtr;
270 }
const PowerSeparableMetric * myMetricPtr
Pointer to the separable metric instance.
Definition: PowerMap.h:405

References DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::myMetricPtr.

Referenced by checkPowerMap(), and DGtal::ReverseDistanceTransformation< TWeightImage, TPSeparableMetric, TImageContainer >::metricPtr().

◆ operator()()

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
Value DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::operator() ( const Point aPoint) const
inline

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

Parameters
aPointthe point to probe.

Definition at line 259 of file PowerMap.h.

260 {
261 return myImagePtr->operator()(aPoint);
262 }
const Point aPoint(3, 4)

References aPoint(), and DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::myImagePtr.

◆ operator=()

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
Self & DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::operator= ( const Self aOtherPowerMap)
default

Assignment operator from another Power map.

Parameters
aOtherPowerMapanother instance of Self
Returns
a reference to Self

◆ projectCoordinate()

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
Point::Coordinate DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, 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.

◆ projectPoint() [1/2]

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
Point DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, 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.

Referenced by checkPowerMap().

◆ projectPoint() [2/2]

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
Point DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::projectPoint ( Point  aPoint,
const Dimension  aMaxDim 
) const
private

Project point coordinates into the domain, taking into account the periodicity up to a fixed dimension.

Precondition
The given point must come from operator()(const Point &) const (for performance reasons).
Parameters
aPointthe point to project
aMaxDimmaximal dimension along which to project the coordinates.
Returns
the coordinates projected into the domain bounds accordingly to the periodicity specification, and only for dimension lower or equal to aMaxDim.

◆ selfDisplay()

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
void DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::selfDisplay ( std::ostream &  out) const

◆ weightImagePtr()

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
const WeightImage * DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::weightImagePtr ( ) const
inline
Returns
Returns the underlying weight image.

Definition at line 275 of file PowerMap.h.

276 {
277 return myWeightImagePtr;
278 }
const WeightImage * myWeightImagePtr
Pointer to the point predicate.
Definition: PowerMap.h:411

References DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::myWeightImagePtr.

Referenced by checkPowerMap().

Field Documentation

◆ myDomainExtent

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
Point DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::myDomainExtent
private

Domain extent.

Definition at line 401 of file PowerMap.h.

◆ myDomainPtr

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
const Domain* DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::myDomainPtr
private

Pointer to the computation domain.

Definition at line 386 of file PowerMap.h.

Referenced by DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::domain().

◆ myImagePtr

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
CountedPtr<OutputImage> DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::myImagePtr
protected

◆ myInfinity

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
Point DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::myInfinity
private

Value to act as a +infinity value.

Definition at line 395 of file PowerMap.h.

◆ myLowerBoundCopy

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
Point DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::myLowerBoundCopy
private

Copy of the image lower bound.

Definition at line 389 of file PowerMap.h.

◆ myMetricPtr

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
const PowerSeparableMetric* DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::myMetricPtr
protected

◆ myPeriodicityIndex

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
std::vector< Dimension > DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::myPeriodicityIndex
private

Index of the periodic dimensions.

Definition at line 398 of file PowerMap.h.

◆ myPeriodicitySpec

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
PeriodicitySpec DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::myPeriodicitySpec
protected

◆ myUpperBoundCopy

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
Point DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::myUpperBoundCopy
private

Copy of the image lower bound.

Definition at line 392 of file PowerMap.h.

◆ myWeightImagePtr

template<typename TWeightImage , typename TPowerSeparableMetric , typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
const WeightImage* DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::myWeightImagePtr
protected

Pointer to the point predicate.

Definition at line 411 of file PowerMap.h.

Referenced by DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::weightImagePtr().


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