DGtal  0.9.3beta
Public Types | Public Member Functions | Protected Member Functions
DGtal::ReverseDistanceTransformation< TWeightImage, TPSeparableMetric, TImageContainer > Class Template Reference

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

Inheritance diagram for DGtal::ReverseDistanceTransformation< TWeightImage, TPSeparableMetric, TImageContainer >:
[legend]
Collaboration diagram for DGtal::ReverseDistanceTransformation< TWeightImage, TPSeparableMetric, TImageContainer >:
[legend]

Public Types

typedef TWeightImage WeightImage
 
typedef TPSeparableMetric PowerSeparableMetric
 
typedef TImageContainer ImageContainer
 
typedef PowerSeparableMetric::Value Value
 
typedef TWeightImage::Domain::Space::Point Point
 
typedef TWeightImage::Domain::Space::Vector Vector
 
typedef PowerSeparableMetric::Weight Weight
 
typedef ReverseDistanceTransformation< TWeightImage, TPSeparableMetric, TImageContainer > Self
 
typedef PowerMap< TWeightImage, TPSeparableMetric > Parent
 
typedef DefaultConstImageRange< SelfConstRange
 
typedef PowerMap< TWeightImage, TPSeparableMetric, TImageContainer >::Domain Domain
 
- Public Types inherited from DGtal::PowerMap< TWeightImage, TPSeparableMetric, TImageContainer >
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 TPSeparableMetric PowerSeparableMetric
 
typedef TImageContainer OutputImage
 
typedef Vector Value
 
typedef OutputImage::ConstRange ConstRange
 
typedef PowerMap< TWeightImage, TPSeparableMetric, TImageContainer > Self
 
typedef std::array< bool, Space::dimensionPeriodicitySpec
 

Public Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CImage< ImageContainer >))
 
 ReverseDistanceTransformation (ConstAlias< Domain > aDomain, ConstAlias< WeightImage > aWeightImage, ConstAlias< PowerSeparableMetric > aMetric)
 
 ReverseDistanceTransformation (ConstAlias< Domain > aDomain, ConstAlias< WeightImage > aWeightImage, ConstAlias< PowerSeparableMetric > aMetric, typename Parent::PeriodicitySpec const &aPeriodicitySpec)
 
 ~ReverseDistanceTransformation ()
 
const Domaindomain () const
 
ConstRange constRange () const
 
Value operator() (const Point &aPoint) const
 
Vector getPowerVector (const Point &aPoint) const
 
const PowerSeparableMetricmetricPtr () const
 
void selfDisplay (std::ostream &out) const
 
- Public Member Functions inherited from DGtal::PowerMap< TWeightImage, TPSeparableMetric, TImageContainer >
 BOOST_CONCEPT_ASSERT ((concepts::CImage< TImageContainer >))
 
 BOOST_CONCEPT_ASSERT ((concepts::CConstImage< TWeightImage >))
 
 BOOST_CONCEPT_ASSERT ((concepts::CPowerSeparableMetric< TPSeparableMetric >))
 
 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 Member Functions

 ReverseDistanceTransformation ()
 

Additional Inherited Members

- Protected Attributes inherited from DGtal::PowerMap< TWeightImage, TPSeparableMetric, TImageContainer >
const PowerSeparableMetricmyMetricPtr
 
CountedPtr< OutputImagemyImagePtr
 
const WeightImagemyWeightImagePtr
 
PeriodicitySpec myPeriodicitySpec
 

Detailed Description

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

Aim: Implementation of the linear in time reverse distance transformation for separable metrics.

Description of template class 'ReverseDistanceTransformation'

This class is a wrapper around a power map construction (see PowerMap). More precisely, at a point p, since the PowerMap at p returns a vector to the closest power site, this class adapts the operator() in order to returns the power distance to the closest weighted site for the considered metric.

Please refer to PowerMap documentation for details on the computational cost and parameter description.

This class is a model of CConstImage.

Template Parameters
TWeightImagemodel of CConstImage
TPSeparableMetricmodel of 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.

Definition at line 93 of file ReverseDistanceTransformation.h.

Member Typedef Documentation

template<typename TWeightImage, typename TPSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
typedef DefaultConstImageRange<Self> DGtal::ReverseDistanceTransformation< TWeightImage, TPSeparableMetric, TImageContainer >::ConstRange

Definition of the image constRange.

Definition at line 129 of file ReverseDistanceTransformation.h.

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

Definition of the image value type.

Definition at line 134 of file ReverseDistanceTransformation.h.

template<typename TWeightImage, typename TPSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
typedef TImageContainer DGtal::ReverseDistanceTransformation< TWeightImage, TPSeparableMetric, TImageContainer >::ImageContainer

Image Container type.

Definition at line 106 of file ReverseDistanceTransformation.h.

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

Definition at line 126 of file ReverseDistanceTransformation.h.

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

Point type.

Definition at line 113 of file ReverseDistanceTransformation.h.

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

Separable Metric type.

Definition at line 103 of file ReverseDistanceTransformation.h.

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

Definition of the image.

Definition at line 124 of file ReverseDistanceTransformation.h.

template<typename TWeightImage, typename TPSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
typedef PowerSeparableMetric::Value DGtal::ReverseDistanceTransformation< TWeightImage, TPSeparableMetric, TImageContainer >::Value

Separable Metric type value type.

Definition at line 110 of file ReverseDistanceTransformation.h.

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

Vector type.

Definition at line 116 of file ReverseDistanceTransformation.h.

template<typename TWeightImage, typename TPSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
typedef PowerSeparableMetric::Weight DGtal::ReverseDistanceTransformation< TWeightImage, TPSeparableMetric, TImageContainer >::Weight

Separable Metric type weight type.

Definition at line 119 of file ReverseDistanceTransformation.h.

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

Separable Metric type.

Definition at line 100 of file ReverseDistanceTransformation.h.

Constructor & Destructor Documentation

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

Constructor in the non-periodic case.

See documentation of PowerMap constructor.

Definition at line 142 of file ReverseDistanceTransformation.h.

144  :
145  PowerMap<TWeightImage,TPSeparableMetric,TImageContainer>(aDomain,
146  aWeightImage,
147  aMetric)
148  {}
template<typename TWeightImage, typename TPSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
DGtal::ReverseDistanceTransformation< TWeightImage, TPSeparableMetric, TImageContainer >::ReverseDistanceTransformation ( ConstAlias< Domain aDomain,
ConstAlias< WeightImage aWeightImage,
ConstAlias< PowerSeparableMetric aMetric,
typename Parent::PeriodicitySpec const &  aPeriodicitySpec 
)
inline

Constructor with periodicity specification.

See documentation of PowerMap constructor.

Definition at line 155 of file ReverseDistanceTransformation.h.

159  : PowerMap<TWeightImage,TPSeparableMetric,TImageContainer>(aDomain,
160  aWeightImage,
161  aMetric,
162  aPeriodicitySpec)
163  {}
template<typename TWeightImage, typename TPSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
DGtal::ReverseDistanceTransformation< TWeightImage, TPSeparableMetric, TImageContainer >::~ReverseDistanceTransformation ( )
inline

Default destructor

Definition at line 168 of file ReverseDistanceTransformation.h.

168 {};
template<typename TWeightImage, typename TPSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
DGtal::ReverseDistanceTransformation< TWeightImage, TPSeparableMetric, TImageContainer >::ReverseDistanceTransformation ( )
protected

Default Constructor.

Member Function Documentation

template<typename TWeightImage, typename TPSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
DGtal::ReverseDistanceTransformation< TWeightImage, TPSeparableMetric, TImageContainer >::BOOST_CONCEPT_ASSERT ( (concepts::CImage< ImageContainer >)  )
template<typename TWeightImage, typename TPSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
ConstRange DGtal::ReverseDistanceTransformation< TWeightImage, TPSeparableMetric, TImageContainer >::constRange ( ) const
inline

Returns a const range on the ReverseDistanceMap values.

Returns
a const range

Definition at line 186 of file ReverseDistanceTransformation.h.

187  {
188  return ConstRange(*this);
189  }
DefaultConstImageRange< Self > ConstRange
Definition of the image constRange.
template<typename TWeightImage, typename TPSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
const Domain& DGtal::ReverseDistanceTransformation< TWeightImage, TPSeparableMetric, TImageContainer >::domain ( ) const
inline

Returns a const range on the ReverseDistanceMap values.

Returns
a const range

Definition at line 177 of file ReverseDistanceTransformation.h.

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

178  {
179  return Parent::domain();
180  }
const Domain & domain() const
Definition: PowerMap.h:235
template<typename TWeightImage, typename TPSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
Vector DGtal::ReverseDistanceTransformation< TWeightImage, TPSeparableMetric, TImageContainer >::getPowerVector ( const Point aPoint) const
inline

Access to a ReverseDistanceMap value (a.k.a. the norm of the associated Voronoi vector) at a point.

Parameters
aPointthe point to probe.

Definition at line 210 of file ReverseDistanceTransformation.h.

References DGtal::PowerMap< TWeightImage, TPSeparableMetric, TImageContainer >::myImagePtr.

211  {
212  return this->myImagePtr->operator()(aPoint);
213  }
CountedPtr< OutputImage > myImagePtr
Power map image.
Definition: PowerMap.h:404
template<typename TWeightImage, typename TPSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
const PowerSeparableMetric* DGtal::ReverseDistanceTransformation< TWeightImage, TPSeparableMetric, TImageContainer >::metricPtr ( ) const
inline
Returns
Returns the underlying metric.

Definition at line 218 of file ReverseDistanceTransformation.h.

References DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::metricPtr().

219  {
220  return Parent::metricPtr();
221  }
const PowerSeparableMetric * metricPtr() const
Definition: PowerMap.h:263
template<typename TWeightImage, typename TPSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
Value DGtal::ReverseDistanceTransformation< TWeightImage, TPSeparableMetric, TImageContainer >::operator() ( const Point aPoint) const
inline

Access to a ReverseDistanceMap value (a.k.a. the norm of the associated Power vector) at a point.

Parameters
aPointthe point to probe.

Definition at line 197 of file ReverseDistanceTransformation.h.

References DGtal::PowerMap< TWeightImage, TPSeparableMetric, TImageContainer >::myImagePtr, DGtal::PowerMap< TWeightImage, TPSeparableMetric, TImageContainer >::myMetricPtr, and DGtal::PowerMap< TWeightImage, TPSeparableMetric, TImageContainer >::myWeightImagePtr.

198  {
199  return this->myMetricPtr->powerDistance(aPoint,
200  this->myImagePtr->operator()(aPoint),
201  this->myWeightImagePtr->operator()( this->myImagePtr->operator()(aPoint)));
202  }
CountedPtr< OutputImage > myImagePtr
Power map image.
Definition: PowerMap.h:404
const WeightImage * myWeightImagePtr
Pointer to the point predicate.
Definition: PowerMap.h:407
const PowerSeparableMetric * myMetricPtr
Pointer to the separable metric instance.
Definition: PowerMap.h:401
template<typename TWeightImage, typename TPSeparableMetric, typename TImageContainer = ImageContainerBySTLVector<HyperRectDomain<typename TWeightImage::Domain::Space>, typename TWeightImage::Domain::Space::Vector>>
void DGtal::ReverseDistanceTransformation< TWeightImage, TPSeparableMetric, TImageContainer >::selfDisplay ( std::ostream &  out) const
inline

Self Display method.

Parameters
outoutput stream

Definition at line 228 of file ReverseDistanceTransformation.h.

References DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::selfDisplay().

229  {
230  out << "[ReverseDistanceTransformation] underlying PowerMap={";
231  Parent::selfDisplay(out);
232  out << "}";
233  }
void selfDisplay(std::ostream &out) const

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