OTB  9.0.0
Orfeo Toolbox
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
otb::SimplifyPathFunctor< TInput, TOutput > Class Template Reference

#include <otbSimplifyPathFunctor.h>

Public Types

typedef OutputPathType::Pointer OutputPathPointerType
 
typedef TOutput OutputPathType
 
typedef TInput::VertexListType::ConstIterator VertexListConstIteratorType
 
typedef TInput::VertexListType::ConstPointer VertexListConstPointerType
 

Public Member Functions

double GetTolerance (void) const
 
OutputPathPointerType operator() (const TInput *input)
 
void SetTolerance (double Tolerance)
 
 SimplifyPathFunctor ()
 
 ~SimplifyPathFunctor ()
 

Private Member Functions

bool TestPathConsistency (VertexListConstIteratorType begin, VertexListConstIteratorType end) const
 

Private Attributes

double m_Tolerance
 

Detailed Description

template<class TInput, class TOutput>
class otb::SimplifyPathFunctor< TInput, TOutput >

This filter performs a simplification of the input path.

It reduces the number of vertices in each path, according to a tolerance criterion. It aims at removing aligned vertices while keeping sharp angular points.

In order to ensure the unicity of its output, each path is considered first from begin to end, then from begin to the first vertex before the end. At each step, the consistency of the path is checked : the equation of the line passing by the first and last vertices is computed. Then, for each vertices between them, the euclidean distance to this line is computed. If for one vertex, this distance is upper than the tolerance threshold, the path is considered to be inconsistent and no vertices can be removed.

If the path is considered consistent (which will occur at least with a 2 vertices path), only the beginning and ending vertices are kept and a new search iteration begin at its end.

This filter is part of the road extraction framework.

See also
UnaryFunctorObjectListFilter

Definition at line 54 of file otbSimplifyPathFunctor.h.

Member Typedef Documentation

◆ OutputPathPointerType

template<class TInput , class TOutput >
typedef OutputPathType::Pointer otb::SimplifyPathFunctor< TInput, TOutput >::OutputPathPointerType

Definition at line 60 of file otbSimplifyPathFunctor.h.

◆ OutputPathType

template<class TInput , class TOutput >
typedef TOutput otb::SimplifyPathFunctor< TInput, TOutput >::OutputPathType

Definition at line 59 of file otbSimplifyPathFunctor.h.

◆ VertexListConstIteratorType

template<class TInput , class TOutput >
typedef TInput::VertexListType::ConstIterator otb::SimplifyPathFunctor< TInput, TOutput >::VertexListConstIteratorType

Definition at line 57 of file otbSimplifyPathFunctor.h.

◆ VertexListConstPointerType

template<class TInput , class TOutput >
typedef TInput::VertexListType::ConstPointer otb::SimplifyPathFunctor< TInput, TOutput >::VertexListConstPointerType

Definition at line 58 of file otbSimplifyPathFunctor.h.

Constructor & Destructor Documentation

◆ SimplifyPathFunctor()

template<class TInput , class TOutput >
otb::SimplifyPathFunctor< TInput, TOutput >::SimplifyPathFunctor ( )
inline

◆ ~SimplifyPathFunctor()

template<class TInput , class TOutput >
otb::SimplifyPathFunctor< TInput, TOutput >::~SimplifyPathFunctor ( )
inline

Definition at line 75 of file otbSimplifyPathFunctor.h.

Member Function Documentation

◆ GetTolerance()

template<class TInput , class TOutput >
double otb::SimplifyPathFunctor< TInput, TOutput >::GetTolerance ( void  ) const
inline

◆ operator()()

template<class TInput , class TOutput >
OutputPathPointerType otb::SimplifyPathFunctor< TInput, TOutput >::operator() ( const TInput *  input)
inline

◆ SetTolerance()

template<class TInput , class TOutput >
void otb::SimplifyPathFunctor< TInput, TOutput >::SetTolerance ( double  Tolerance)
inline

◆ TestPathConsistency()

template<class TInput , class TOutput >
bool otb::SimplifyPathFunctor< TInput, TOutput >::TestPathConsistency ( VertexListConstIteratorType  begin,
VertexListConstIteratorType  end 
) const
inlineprivate

Member Data Documentation

◆ m_Tolerance

template<class TInput , class TOutput >
double otb::SimplifyPathFunctor< TInput, TOutput >::m_Tolerance
private

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