DGtal  0.9.2
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
 

Public Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CImage< ImageContainer >))
 
 ReverseDistanceTransformation (ConstAlias< Domain > aDomain, ConstAlias< WeightImage > aWeightImage, ConstAlias< PowerSeparableMetric > aMetric)
 
 ~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::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 ()
 
Selfoperator= (const Self &aOtherPowerMap)
 
const Domaindomain () const
 
ConstRange constRange () const
 
Value operator() (const Point &aPoint) const
 
const PowerSeparableMetricmetricPtr () const
 
const WeightImageweightImagePtr () const
 
void selfDisplay (std::ostream &out) const
 

Protected Member Functions

 ReverseDistanceTransformation ()
 
- Protected Member Functions inherited from DGtal::PowerMap< TWeightImage, TPSeparableMetric, TImageContainer >
 PowerMap ()
 

Additional Inherited Members

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

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

Definition at line 140 of file ReverseDistanceTransformation.h.

142  :
143  PowerMap<TWeightImage,TPSeparableMetric,TImageContainer>(aDomain,
144  aWeightImage,
145  aMetric)
146  {}
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 151 of file ReverseDistanceTransformation.h.

151 {};
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 169 of file ReverseDistanceTransformation.h.

170  {
171  return ConstRange(*this);
172  }
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 160 of file ReverseDistanceTransformation.h.

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

161  {
162  return Parent::domain();
163  }
const Domain & domain() const
Definition: PowerMap.h:187
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 193 of file ReverseDistanceTransformation.h.

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

194  {
195  return this->myImagePtr->operator()(aPoint);
196  }
CountedPtr< OutputImage > myImagePtr
Power map image.
Definition: PowerMap.h:295
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 201 of file ReverseDistanceTransformation.h.

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

202  {
203  return Parent::metricPtr();
204  }
const PowerSeparableMetric * metricPtr() const
Definition: PowerMap.h:215
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 180 of file ReverseDistanceTransformation.h.

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

181  {
182  return this->myMetricPtr->powerDistance(aPoint,
183  this->myImagePtr->operator()(aPoint),
184  this->myWeightImagePtr->operator()( this->myImagePtr->operator()(aPoint)));
185  }
CountedPtr< OutputImage > myImagePtr
Power map image.
Definition: PowerMap.h:295
const WeightImage * myWeightImagePtr
Pointer to the point predicate.
Definition: PowerMap.h:298
const PowerSeparableMetric * myMetricPtr
Pointer to the separable metric instance.
Definition: PowerMap.h:292
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 211 of file ReverseDistanceTransformation.h.

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

212  {
213  out << "[ReverseDistanceTransformation] underlying PowerMap={";
214  Parent::selfDisplay(out);
215  out << "}";
216  }
void selfDisplay(std::ostream &out) const

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