DGtal  0.9.4beta
Public Types | Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes
DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer > Class Template Reference

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

Inheritance diagram for DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >:
[legend]
Collaboration diagram for DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >:
[legend]

Public Types

typedef TWeightImage WeightImage
 
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
 
typedef TPowerSeparableMetric PowerSeparableMetric
 
typedef TImageContainer OutputImage
 
typedef Vector Value
 
typedef OutputImage::ConstRange ConstRange
 
typedef PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer > Self
 
typedef std::array< bool, Space::dimensionPeriodicitySpec
 

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
 
CountedPtr< OutputImagemyImagePtr
 
const WeightImagemyWeightImagePtr
 
PeriodicitySpec myPeriodicitySpec
 

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
 
Point myLowerBoundCopy
 
Point myUpperBoundCopy
 
Point myInfinity
 
std::vector< DimensionmyPeriodicityIndex
 
Point myDomainExtent
 

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 [19]. Along periodic dimensions, the algorithm is adapted following [23].

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

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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

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.

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.
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.
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.

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

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 >)  )
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 >)  )
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 >)  )
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)  )
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)  )
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)  )
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|).

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.
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
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 245 of file PowerMap.h.

246  {
247  return myImagePtr->constRange();
248  }
CountedPtr< OutputImage > myImagePtr
Power map image.
Definition: PowerMap.h:404
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 235 of file PowerMap.h.

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

236  {
237  return *myDomainPtr;
238  }
const Domain * myDomainPtr
Pointer to the computation domain.
Definition: PowerMap.h:382
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 280 of file PowerMap.h.

281  {
282  return myPeriodicitySpec;
283  }
PeriodicitySpec myPeriodicitySpec
Periodicity along each dimension.
Definition: PowerMap.h:410
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 291 of file PowerMap.h.

292  {
293  return myPeriodicitySpec[ n ];
294  }
PeriodicitySpec myPeriodicitySpec
Periodicity along each dimension.
Definition: PowerMap.h:410
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 263 of file PowerMap.h.

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

264  {
265  return myMetricPtr;
266  }
const PowerSeparableMetric * myMetricPtr
Pointer to the separable metric instance.
Definition: PowerMap.h:401
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 255 of file PowerMap.h.

256  {
257  return myImagePtr->operator()(aPoint);
258  }
CountedPtr< OutputImage > myImagePtr
Power map image.
Definition: PowerMap.h:404
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
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.
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.
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.
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
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 271 of file PowerMap.h.

272  {
273  return myWeightImagePtr;
274  }
const WeightImage * myWeightImagePtr
Pointer to the point predicate.
Definition: PowerMap.h:407

Field Documentation

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 397 of file PowerMap.h.

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 382 of file PowerMap.h.

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

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
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 391 of file PowerMap.h.

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 385 of file PowerMap.h.

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

Pointer to the separable metric instance.

Definition at line 401 of file PowerMap.h.

Referenced by DGtal::PowerMap< TWeightImage, TPSeparableMetric, TImageContainer >::metricPtr().

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 394 of file PowerMap.h.

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
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 388 of file PowerMap.h.

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 407 of file PowerMap.h.

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


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