DGtal 1.3.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Data Fields | Private Types | Private Member Functions
DGtal::L2SecondOrderLocalDistance< TImage, TSet > Class Template Reference

Aim: Class for the computation of the Euclidean distance at some point p, from the available distance values of some points lying in the neighborhood of p, such that only one of their coordinate differ from the coordinates of p by at most two. More...

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

Public Types

typedef TImage Image
 
typedef Image::Point Point
 
typedef Image::Value Value
 
typedef TSet Set
 

Public Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CImage< TImage >))
 image More...
 
 BOOST_CONCEPT_ASSERT ((concepts::CDigitalSet< TSet >))
 set More...
 
 BOOST_STATIC_ASSERT ((boost::is_same< Point, typename TSet::Point >::value))
 
 L2SecondOrderLocalDistance (Image &aImg, TSet &aSet)
 
 L2SecondOrderLocalDistance (const L2SecondOrderLocalDistance &other)
 
L2SecondOrderLocalDistanceoperator= (const L2SecondOrderLocalDistance &other)
 
 ~L2SecondOrderLocalDistance ()
 
Value operator() (const Point &aPoint)
 
void selfDisplay (std::ostream &out) const
 

Data Fields

ImagemyImgPtr
 Aliasing pointer on the underlying image. More...
 
SetmySetPtr
 Aliasing pointer on the underlying set. More...
 

Private Types

typedef std::pair< double, ValueCoeffValue
 
typedef std::vector< CoeffValueList
 

Private Member Functions

Value compute (List &aList) const
 
Value getValue (const Value &aValue1, const Value &aValue2) const
 

Detailed Description

template<typename TImage, typename TSet>
class DGtal::L2SecondOrderLocalDistance< TImage, TSet >

Aim: Class for the computation of the Euclidean distance at some point p, from the available distance values of some points lying in the neighborhood of p, such that only one of their coordinate differ from the coordinates of p by at most two.

Description of template class 'L2SecondOrderLocalDistance'

Like L2FirstOrderLocalDistance, the computed value is such that the upwind gradient of the distance map is one, but instead of using first-order accurate forward and backward differences, L2SecondOrderLocalDistance uses second-order accurate forward and backward difference whenever there are enough points whose distance values are known in order to evaluate these differences.

Note
This class deals with positive or negative distance values (0 is arbitrarily considered as a positive value, ie. starting with a seed of null value, you must get positive values). However, the behavior is undefined when there are both positive and negative distance values in the neighborhood of p.

It is a model of CPointFunctor.

Template Parameters
TImagemodel of CImage used for the mapping point-distance value
TSetmodel of CDigitalSet for storing points whose distance value is known
See also
FMM

Definition at line 228 of file FMMPointFunctors.h.

Member Typedef Documentation

◆ CoeffValue

template<typename TImage , typename TSet >
typedef std::pair<double, Value> DGtal::L2SecondOrderLocalDistance< TImage, TSet >::CoeffValue
private

Definition at line 248 of file FMMPointFunctors.h.

◆ Image

template<typename TImage , typename TSet >
typedef TImage DGtal::L2SecondOrderLocalDistance< TImage, TSet >::Image

Definition at line 237 of file FMMPointFunctors.h.

◆ List

template<typename TImage , typename TSet >
typedef std::vector<CoeffValue> DGtal::L2SecondOrderLocalDistance< TImage, TSet >::List
private

Definition at line 249 of file FMMPointFunctors.h.

◆ Point

template<typename TImage , typename TSet >
typedef Image::Point DGtal::L2SecondOrderLocalDistance< TImage, TSet >::Point

Definition at line 238 of file FMMPointFunctors.h.

◆ Set

template<typename TImage , typename TSet >
typedef TSet DGtal::L2SecondOrderLocalDistance< TImage, TSet >::Set

Definition at line 243 of file FMMPointFunctors.h.

◆ Value

template<typename TImage , typename TSet >
typedef Image::Value DGtal::L2SecondOrderLocalDistance< TImage, TSet >::Value

Definition at line 239 of file FMMPointFunctors.h.

Constructor & Destructor Documentation

◆ L2SecondOrderLocalDistance() [1/2]

template<typename TImage , typename TSet >
DGtal::L2SecondOrderLocalDistance< TImage, TSet >::L2SecondOrderLocalDistance ( Image aImg,
TSet &  aSet 
)

Constructor from an image and a set. NB: only pointers are stored

Parameters
aImgany distance map
aSetany digital set

◆ L2SecondOrderLocalDistance() [2/2]

template<typename TImage , typename TSet >
DGtal::L2SecondOrderLocalDistance< TImage, TSet >::L2SecondOrderLocalDistance ( const L2SecondOrderLocalDistance< TImage, TSet > &  other)

Copy constructor.

Parameters
otherthe object to clone.

◆ ~L2SecondOrderLocalDistance()

template<typename TImage , typename TSet >
DGtal::L2SecondOrderLocalDistance< TImage, TSet >::~L2SecondOrderLocalDistance ( )

Destructor. Does nothing.

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT() [1/2]

template<typename TImage , typename TSet >
DGtal::L2SecondOrderLocalDistance< TImage, TSet >::BOOST_CONCEPT_ASSERT ( (concepts::CDigitalSet< TSet >)  )

set

◆ BOOST_CONCEPT_ASSERT() [2/2]

template<typename TImage , typename TSet >
DGtal::L2SecondOrderLocalDistance< TImage, TSet >::BOOST_CONCEPT_ASSERT ( (concepts::CImage< TImage >)  )

image

◆ BOOST_STATIC_ASSERT()

template<typename TImage , typename TSet >
DGtal::L2SecondOrderLocalDistance< TImage, TSet >::BOOST_STATIC_ASSERT ( (boost::is_same< Point, typename TSet::Point >::value)  )

◆ compute()

template<typename TImage , typename TSet >
Value DGtal::L2SecondOrderLocalDistance< TImage, TSet >::compute ( List aList) const
private

Returns an approximation of the Euclidean distance at some point, knowing the distance of its neighbors

Parameters
aListthe distance of (some of) the neighbors
Returns
the computed distance.

◆ getValue()

template<typename TImage , typename TSet >
Value DGtal::L2SecondOrderLocalDistance< TImage, TSet >::getValue ( const Value aValue1,
const Value aValue2 
) const
private

Returns the combination of two distance values for the second-order accurate difference

Parameters
aValue1first value
aValue2second value
Returns
the resulting value.

◆ operator()()

template<typename TImage , typename TSet >
Value DGtal::L2SecondOrderLocalDistance< TImage, TSet >::operator() ( const Point aPoint)

Euclidean distance computation at aPoint , from the available distance values of the 1-neighbors of aPoint .

Parameters
aPointthe point for which the distance is computed
Returns
the distance value at aPoint.

◆ operator=()

template<typename TImage , typename TSet >
L2SecondOrderLocalDistance & DGtal::L2SecondOrderLocalDistance< TImage, TSet >::operator= ( const L2SecondOrderLocalDistance< TImage, TSet > &  other)

Assignment.

Parameters
otherthe object to copy.
Returns
a reference on 'this'.

◆ selfDisplay()

template<typename TImage , typename TSet >
void DGtal::L2SecondOrderLocalDistance< TImage, TSet >::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

Field Documentation

◆ myImgPtr

template<typename TImage , typename TSet >
Image* DGtal::L2SecondOrderLocalDistance< TImage, TSet >::myImgPtr

Aliasing pointer on the underlying image.

Definition at line 254 of file FMMPointFunctors.h.

◆ mySetPtr

template<typename TImage , typename TSet >
Set* DGtal::L2SecondOrderLocalDistance< TImage, TSet >::mySetPtr

Aliasing pointer on the underlying set.

Definition at line 256 of file FMMPointFunctors.h.


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