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

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

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

Public Types

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

Public Member Functions

 PosIndepScaleDepSCEstimator ()
 
 PosIndepScaleDepSCEstimator (const PosIndepScaleDepSCEstimator &other)
 
PosIndepScaleDepSCEstimatoroperator= (const PosIndepScaleDepSCEstimator &other)
 
 ~PosIndepScaleDepSCEstimator ()
 
bool isValid () const
 
void init (const double h, const ConstIterator &itb, const ConstIterator &ite)
 
void attach (const SegmentComputer &aSC)
 
Quantity eval (const ConstIterator &) 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::PosIndepScaleDepSCEstimator< TSegmentComputer, Functor, ReturnType >

Description of class 'PosIndepScaleDepSCEstimator'

Aim: estimates a geometric quantity from a segment computer. The estimation is not position-dependent, but is scale-dependent (e.g. curvature or radius estimation from 'circular' 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 217 of file SegmentComputerEstimators.h.

Member Typedef Documentation

◆ ConstIterator

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

Definition at line 224 of file SegmentComputerEstimators.h.

◆ Quantity

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

Definition at line 225 of file SegmentComputerEstimators.h.

◆ SegmentComputer

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

Definition at line 223 of file SegmentComputerEstimators.h.

Constructor & Destructor Documentation

◆ PosIndepScaleDepSCEstimator() [1/2]

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

◆ PosIndepScaleDepSCEstimator() [2/2]

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

Copy constructor.

Parameters
otherthe object to copy.

Definition at line 265 of file SegmentComputerEstimators.h.

266 : myH( other.myH ), myBegin( other.myBegin ), myEnd( other.myEnd ),
267 mySCPtr( other.mySCPtr ), myFunctor( other.myFunctor )
268 {
269 }

◆ ~PosIndepScaleDepSCEstimator()

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

Destructor

Definition at line 289 of file SegmentComputerEstimators.h.

289{}

Member Function Documentation

◆ attach()

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

Attach the estimator to aSC

Parameters
aSCan instance of segment computer.

Definition at line 323 of file SegmentComputerEstimators.h.

324 {
325 mySCPtr = &aSC;
326 ASSERT( mySCPtr );
327 };

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

◆ eval() [1/2]

◆ eval() [2/2]

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

351 {
352 ASSERT( isValid() );
353
354 // do-while loop to deal with the case of a whole circular range
355 if (isNotEmpty(itb, ite))
356 {
357 ConstIterator it = itb;
358 do
359 {
360 *result++ = myFunctor( *mySCPtr, myH );
361 ++it;
362 } while (it != ite);
363 }
364 return result;
365 }
MyDigitalSurface::ConstIterator ConstIterator
bool isNotEmpty(const IC &itb, const IC &ite, IteratorType)

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

◆ init()

template<typename TSegmentComputer , typename Functor , typename ReturnType = typename Functor::Value>
void DGtal::detail::PosIndepScaleDepSCEstimator< 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::PosIndepScaleDepSCEstimator< TSegmentComputer, Functor, ReturnType >::isValid ( ) const
inline

◆ operator=()

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

Field Documentation

◆ myBegin

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

◆ myEnd

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

◆ myFunctor

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

◆ myH

◆ mySCPtr


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