File failed to load: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.3/config/TeX-MML-AM_CHTML/MathJax.js
DGtal 2.0.0
DGtal::detail::PosDepScaleIndepSCEstimator< TSegmentComputer, Functor, ReturnType > Class Template Reference

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

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

Public Types

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

Public Member Functions

bool isValid () const
 PosDepScaleIndepSCEstimator ()
void init (const double, 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

ConstIterator myBegin
ConstIterator myEnd
const SegmentComputermySCPtr
Functor myFunctor

Detailed Description

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

Description of class 'PosDepScaleIndepSCEstimator'

Aim: estimates a geometric quantity from a segment computer. The estimation is not scale dependent but position dependent (e.g. tangent or normal estimation from high-order primitives).

Template Parameters
TSegmentComputera model of segment computer.

The computation is delegated to a functor.

Template Parameters
Functora binary functor

This class is a model of CSegmentComputerEstimator

Definition at line 389 of file SegmentComputerEstimators.h.

Member Typedef Documentation

◆ ConstIterator

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

Definition at line 396 of file SegmentComputerEstimators.h.

◆ Quantity

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

Definition at line 397 of file SegmentComputerEstimators.h.

◆ SegmentComputer

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

Definition at line 395 of file SegmentComputerEstimators.h.

Constructor & Destructor Documentation

◆ PosDepScaleIndepSCEstimator()

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

Member Function Documentation

◆ attach()

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

Attach the estimator to aSC

Parameters
aSCan instance of segment computer.

Definition at line 453 of file SegmentComputerEstimators.h.

◆ eval() [1/2]

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

Unique estimation

Parameters
itany iterator
Returns
the estimated quantity

Definition at line 463 of file SegmentComputerEstimators.h.

464 {
465 ASSERT( mySCPtr );
466 return myFunctor( it, *mySCPtr );
467 }

◆ eval() [2/2]

template<typename TSegmentComputer, typename Functor, typename ReturnType = typename Functor::Value>
template<typename OutputIterator>
OutputIterator DGtal::detail::PosDepScaleIndepSCEstimator< 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 479 of file SegmentComputerEstimators.h.

481 {
482 ASSERT( mySCPtr );
483
484 // do-while loop to deal with the case of a whole circular range
485 if (isNotEmpty(itb, ite))
486 {
488 do
489 {
490 *result++ = myFunctor( it, *mySCPtr );
491 ++it;
492 } while (it != ite);
493 }
494
495 return result;
496 }
bool isNotEmpty(const IC &itb, const IC &ite, IteratorType)

◆ init()

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

Initialisation.

Parameters
itbbegin iterator
iteend iterator

Definition at line 443 of file SegmentComputerEstimators.h.

444 {
445 myBegin = itb;
446 myEnd = ite;
447 }

◆ isValid()

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

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.

Definition at line 425 of file SegmentComputerEstimators.h.

426 {
427 return (mySCPtr != 0);
428 };

Field Documentation

◆ myBegin

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

Begin iterator

Definition at line 404 of file SegmentComputerEstimators.h.

◆ myEnd

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

End iterator

Definition at line 408 of file SegmentComputerEstimators.h.

◆ myFunctor

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

◆ mySCPtr

template<typename TSegmentComputer, typename Functor, typename ReturnType = typename Functor::Value>
const SegmentComputer* DGtal::detail::PosDepScaleIndepSCEstimator< TSegmentComputer, Functor, ReturnType >::mySCPtr

Aliasing pointer on a constant segment computer

Definition at line 412 of file SegmentComputerEstimators.h.


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