DGtal  0.9.3beta
Public Types | Public Member Functions | Private Member Functions | Private Attributes
DGtal::DSSLengthEstimator< TConstIterator > Class Template Reference

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

Collaboration diagram for DGtal::DSSLengthEstimator< TConstIterator >:
[legend]

Public Types

typedef TConstIterator ConstIterator
 
typedef double Quantity
 
typedef ArithmeticalDSSComputer< ConstIterator, int, 4 > DSSComputer
 
typedef DSSComputer::Point Point
 
typedef DSSComputer::Vector Vector
 

Public Member Functions

 DSSLengthEstimator ()
 
 ~DSSLengthEstimator ()
 
void init (const double h, const ConstIterator &itb, const ConstIterator &ite)
 
Quantity eval () const
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 

Private Member Functions

 DSSLengthEstimator (const DSSLengthEstimator &other)
 
DSSLengthEstimatoroperator= (const DSSLengthEstimator &other)
 
Point lastPoint (const ConstIterator &ite)
 
Point lastPoint (const ConstIterator &c, CirculatorType)
 
Point lastPoint (const ConstIterator &ite, IteratorType)
 

Private Attributes

double myH
 
std::vector< PointmyRep
 
bool myIsInitBefore
 

Detailed Description

template<typename TConstIterator>
class DGtal::DSSLengthEstimator< TConstIterator >

Aim: a model of CGlobalCurveEstimator that segments the digital curve into DSS and computes the length of the resulting (not uniquely defined) polygon.

Description of template class 'DSSLengthEstimator'

Model of CGlobalCurveGeometricEstimator

Template Parameters
TConstIteratora model of CConstIteratorOnPoints.

Definition at line 76 of file DSSLengthEstimator.h.

Member Typedef Documentation

template<typename TConstIterator>
typedef TConstIterator DGtal::DSSLengthEstimator< TConstIterator >::ConstIterator
Todo:
CONCEPT CHECK sur ConstIterator

Definition at line 83 of file DSSLengthEstimator.h.

template<typename TConstIterator>
typedef ArithmeticalDSSComputer<ConstIterator,int,4> DGtal::DSSLengthEstimator< TConstIterator >::DSSComputer

Definition at line 87 of file DSSLengthEstimator.h.

template<typename TConstIterator>
typedef DSSComputer::Point DGtal::DSSLengthEstimator< TConstIterator >::Point

Definition at line 88 of file DSSLengthEstimator.h.

template<typename TConstIterator>
typedef double DGtal::DSSLengthEstimator< TConstIterator >::Quantity

Definition at line 85 of file DSSLengthEstimator.h.

template<typename TConstIterator>
typedef DSSComputer::Vector DGtal::DSSLengthEstimator< TConstIterator >::Vector

Definition at line 89 of file DSSLengthEstimator.h.

Constructor & Destructor Documentation

template<typename TConstIterator>
DGtal::DSSLengthEstimator< TConstIterator >::DSSLengthEstimator ( )

Default Constructor.

template<typename TConstIterator>
DGtal::DSSLengthEstimator< TConstIterator >::~DSSLengthEstimator ( )

Destructor.

template<typename TConstIterator>
DGtal::DSSLengthEstimator< TConstIterator >::DSSLengthEstimator ( const DSSLengthEstimator< TConstIterator > &  other)
private

Copy constructor.

Parameters
otherthe object to clone. Forbidden by default.

Member Function Documentation

template<typename TConstIterator>
Quantity DGtal::DSSLengthEstimator< TConstIterator >::eval ( ) const

Computation of the l1 length of the curve. Complexity: O(|Range|)

Precondition
init() method must be called before.
Returns
the curve length.
template<typename TConstIterator>
void DGtal::DSSLengthEstimator< TConstIterator >::init ( const double  h,
const ConstIterator itb,
const ConstIterator ite 
)

Initialize the measure computation.

Parameters
hgrid size (must be >0).
itbbegin iterator
iteend iterator
template<typename TConstIterator>
bool DGtal::DSSLengthEstimator< TConstIterator >::isValid ( ) const

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.
template<typename TConstIterator>
Point DGtal::DSSLengthEstimator< TConstIterator >::lastPoint ( const ConstIterator ite)
private
template<typename TConstIterator>
Point DGtal::DSSLengthEstimator< TConstIterator >::lastPoint ( const ConstIterator c,
CirculatorType   
)
private
template<typename TConstIterator>
Point DGtal::DSSLengthEstimator< TConstIterator >::lastPoint ( const ConstIterator ite,
IteratorType   
)
private
template<typename TConstIterator>
DSSLengthEstimator& DGtal::DSSLengthEstimator< TConstIterator >::operator= ( const DSSLengthEstimator< TConstIterator > &  other)
private

Assignment.

Parameters
otherthe object to copy.
Returns
a reference on 'this'. Forbidden by default.
template<typename TConstIterator>
void DGtal::DSSLengthEstimator< TConstIterator >::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

Field Documentation

template<typename TConstIterator>
double DGtal::DSSLengthEstimator< TConstIterator >::myH
private

Grid size.

Definition at line 142 of file DSSLengthEstimator.h.

template<typename TConstIterator>
bool DGtal::DSSLengthEstimator< TConstIterator >::myIsInitBefore
private

Boolean to make sure that init() has been called before eval().

Definition at line 148 of file DSSLengthEstimator.h.

template<typename TConstIterator>
std::vector<Point> DGtal::DSSLengthEstimator< TConstIterator >::myRep
private

polygonal representation of the input

Definition at line 145 of file DSSLengthEstimator.h.


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