DGtal 1.4.0
Loading...
Searching...
No Matches
DGtal::detail::PosDepScaleDepSCEstimator< TSegmentComputer, Functor, ReturnType > Class Template Reference

#include <DGtal/geometry/curves/estimation/SegmentComputerEstimators.h>

Inheritance diagram for DGtal::detail::PosDepScaleDepSCEstimator< TSegmentComputer, Functor, ReturnType >:
[legend]

Public Types

typedef TSegmentComputer SegmentComputer
 
typedef SegmentComputer::ConstIterator ConstIterator
 
typedef ReturnType Quantity
 

Public Member Functions

 PosDepScaleDepSCEstimator ()
 
 PosDepScaleDepSCEstimator (const PosDepScaleDepSCEstimator &other)
 
PosDepScaleDepSCEstimatoroperator= (const PosDepScaleDepSCEstimator &other)
 
 ~PosDepScaleDepSCEstimator ()
 
bool isValid () const
 
void init (const double h, const ConstIterator &itb, const ConstIterator &ite)
 
void attach (const SegmentComputer &aSC)
 
Quantity eval (const ConstIterator &it) const
 
template<typename OutputIterator >
OutputIterator eval (const ConstIterator &itb, const ConstIterator &ite, OutputIterator result) const
 

Data Fields

double myH
 
ConstIterator myBegin
 
ConstIterator myEnd
 
const SegmentComputermySCPtr
 
Functor myFunctor
 

Detailed Description

template<typename TSegmentComputer, typename Functor, typename ReturnType = typename Functor::Value>
class DGtal::detail::PosDepScaleDepSCEstimator< TSegmentComputer, Functor, ReturnType >

Description of class 'PosDepScaleDepSCEstimator'

Aim: estimates a geometric quantity from a segment computer. The estimation is both position-dependent and scale-dependent (typically distance of a point to an underlying curve).

Template Parameters
TSegmentComputera model of segment computer.

The computation is delegated to a Functor.

Template Parameters
Functora functor

This class is a model of CSegmentComputerEstimator

Definition at line 520 of file SegmentComputerEstimators.h.

Member Typedef Documentation

◆ ConstIterator

template<typename TSegmentComputer , typename Functor , typename ReturnType = typename Functor::Value>
typedef SegmentComputer::ConstIterator DGtal::detail::PosDepScaleDepSCEstimator< TSegmentComputer, Functor, ReturnType >::ConstIterator

Definition at line 527 of file SegmentComputerEstimators.h.

◆ Quantity

template<typename TSegmentComputer , typename Functor , typename ReturnType = typename Functor::Value>
typedef ReturnType DGtal::detail::PosDepScaleDepSCEstimator< TSegmentComputer, Functor, ReturnType >::Quantity

Definition at line 528 of file SegmentComputerEstimators.h.

◆ SegmentComputer

template<typename TSegmentComputer , typename Functor , typename ReturnType = typename Functor::Value>
typedef TSegmentComputer DGtal::detail::PosDepScaleDepSCEstimator< TSegmentComputer, Functor, ReturnType >::SegmentComputer

Definition at line 526 of file SegmentComputerEstimators.h.

Constructor & Destructor Documentation

◆ PosDepScaleDepSCEstimator() [1/2]

template<typename TSegmentComputer , typename Functor , typename ReturnType = typename Functor::Value>
DGtal::detail::PosDepScaleDepSCEstimator< TSegmentComputer, Functor, ReturnType >::PosDepScaleDepSCEstimator ( )
inline

◆ PosDepScaleDepSCEstimator() [2/2]

template<typename TSegmentComputer , typename Functor , typename ReturnType = typename Functor::Value>
DGtal::detail::PosDepScaleDepSCEstimator< TSegmentComputer, Functor, ReturnType >::PosDepScaleDepSCEstimator ( const PosDepScaleDepSCEstimator< TSegmentComputer, Functor, ReturnType > & other)
inline

Copy constructor.

Parameters
otherthe object to copy.

Definition at line 568 of file SegmentComputerEstimators.h.

569 : myH( other.myH ), myBegin( other.myBegin ), myEnd( other.myEnd ),
570 mySCPtr( other.mySCPtr ), myFunctor( other.myFunctor )
571 {
572 }

◆ ~PosDepScaleDepSCEstimator()

template<typename TSegmentComputer , typename Functor , typename ReturnType = typename Functor::Value>
DGtal::detail::PosDepScaleDepSCEstimator< TSegmentComputer, Functor, ReturnType >::~PosDepScaleDepSCEstimator ( )
inline

Destructor

Definition at line 592 of file SegmentComputerEstimators.h.

592{}

Member Function Documentation

◆ attach()

template<typename TSegmentComputer , typename Functor , typename ReturnType = typename Functor::Value>
void DGtal::detail::PosDepScaleDepSCEstimator< TSegmentComputer, Functor, ReturnType >::attach ( const SegmentComputer & aSC)
inline

Attach the estimator to aSC

Parameters
aSCan instance of segment computer.

Definition at line 626 of file SegmentComputerEstimators.h.

627 {
628 mySCPtr = &aSC;
629 ASSERT( mySCPtr );
630 };

References DGtal::detail::PosDepScaleDepSCEstimator< TSegmentComputer, Functor, ReturnType >::mySCPtr.

◆ eval() [1/2]

template<typename TSegmentComputer , typename Functor , typename ReturnType = typename Functor::Value>
Quantity DGtal::detail::PosDepScaleDepSCEstimator< TSegmentComputer, Functor, ReturnType >::eval ( const ConstIterator & it) const
inline

◆ eval() [2/2]

template<typename TSegmentComputer , typename Functor , typename ReturnType = typename Functor::Value>
template<typename OutputIterator >
OutputIterator DGtal::detail::PosDepScaleDepSCEstimator< TSegmentComputer, Functor, ReturnType >::eval ( const ConstIterator & itb,
const ConstIterator & ite,
OutputIterator result ) const
inline

Estimation for a subrange [itb , ite )

Parameters
itbsubrange begin iterator
itesubrange end iterator
resultoutput iterator on the estimated quantity
Returns
the estimated quantity from itb till ite (excluded)

Definition at line 653 of file SegmentComputerEstimators.h.

655 {
656 ASSERT( isValid() );
657
658 // do-while loop to deal with the case of a whole circular range
659 if (isNotEmpty(itb, ite))
660 {
661 ConstIterator it = itb;
662 do
663 {
664 *result++ = myFunctor( it, *mySCPtr, myH );
665 ++it;
666 } while (it != ite);
667 }
668
669 return result;
670 }
MyDigitalSurface::ConstIterator ConstIterator
bool isNotEmpty(const IC &itb, const IC &ite, IteratorType)

References DGtal::detail::isNotEmpty(), DGtal::detail::PosDepScaleDepSCEstimator< TSegmentComputer, Functor, ReturnType >::isValid(), DGtal::detail::PosDepScaleDepSCEstimator< TSegmentComputer, Functor, ReturnType >::myFunctor, DGtal::detail::PosDepScaleDepSCEstimator< TSegmentComputer, Functor, ReturnType >::myH, and DGtal::detail::PosDepScaleDepSCEstimator< TSegmentComputer, Functor, ReturnType >::mySCPtr.

◆ init()

template<typename TSegmentComputer , typename Functor , typename ReturnType = typename Functor::Value>
void DGtal::detail::PosDepScaleDepSCEstimator< TSegmentComputer, Functor, ReturnType >::init ( const double h,
const ConstIterator & itb,
const ConstIterator & ite )
inline

◆ isValid()

template<typename TSegmentComputer , typename Functor , typename ReturnType = typename Functor::Value>
bool DGtal::detail::PosDepScaleDepSCEstimator< TSegmentComputer, Functor, ReturnType >::isValid ( ) const
inline

◆ operator=()

template<typename TSegmentComputer , typename Functor , typename ReturnType = typename Functor::Value>
PosDepScaleDepSCEstimator & DGtal::detail::PosDepScaleDepSCEstimator< TSegmentComputer, Functor, ReturnType >::operator= ( const PosDepScaleDepSCEstimator< TSegmentComputer, Functor, ReturnType > & other)
inline

Field Documentation

◆ myBegin

template<typename TSegmentComputer , typename Functor , typename ReturnType = typename Functor::Value>
ConstIterator DGtal::detail::PosDepScaleDepSCEstimator< TSegmentComputer, Functor, ReturnType >::myBegin

◆ myEnd

template<typename TSegmentComputer , typename Functor , typename ReturnType = typename Functor::Value>
ConstIterator DGtal::detail::PosDepScaleDepSCEstimator< TSegmentComputer, Functor, ReturnType >::myEnd

◆ myFunctor

template<typename TSegmentComputer , typename Functor , typename ReturnType = typename Functor::Value>
Functor DGtal::detail::PosDepScaleDepSCEstimator< TSegmentComputer, Functor, ReturnType >::myFunctor

◆ myH

◆ mySCPtr


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