OTB
9.0.0
Orfeo Toolbox
|
#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 |
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.
Definition at line 54 of file otbSimplifyPathFunctor.h.
typedef OutputPathType::Pointer otb::SimplifyPathFunctor< TInput, TOutput >::OutputPathPointerType |
Definition at line 60 of file otbSimplifyPathFunctor.h.
typedef TOutput otb::SimplifyPathFunctor< TInput, TOutput >::OutputPathType |
Definition at line 59 of file otbSimplifyPathFunctor.h.
typedef TInput::VertexListType::ConstIterator otb::SimplifyPathFunctor< TInput, TOutput >::VertexListConstIteratorType |
Definition at line 57 of file otbSimplifyPathFunctor.h.
typedef TInput::VertexListType::ConstPointer otb::SimplifyPathFunctor< TInput, TOutput >::VertexListConstPointerType |
Definition at line 58 of file otbSimplifyPathFunctor.h.
|
inline |
Definition at line 71 of file otbSimplifyPathFunctor.h.
References otb::SimplifyPathFunctor< TInput, TOutput >::m_Tolerance.
|
inline |
Definition at line 75 of file otbSimplifyPathFunctor.h.
|
inline |
Definition at line 66 of file otbSimplifyPathFunctor.h.
References otb::SimplifyPathFunctor< TInput, TOutput >::m_Tolerance.
|
inline |
Definition at line 79 of file otbSimplifyPathFunctor.h.
References otb::SimplifyPathFunctor< TInput, TOutput >::TestPathConsistency().
|
inline |
Definition at line 62 of file otbSimplifyPathFunctor.h.
References otb::SimplifyPathFunctor< TInput, TOutput >::m_Tolerance.
Referenced by otb::CorrectPolygonFunctor< TPolygon >::operator()().
|
inlineprivate |
Definition at line 115 of file otbSimplifyPathFunctor.h.
References otb::SimplifyPathFunctor< TInput, TOutput >::m_Tolerance.
Referenced by otb::SimplifyPathFunctor< TInput, TOutput >::operator()().
|
private |
Definition at line 113 of file otbSimplifyPathFunctor.h.
Referenced by otb::SimplifyPathFunctor< TInput, TOutput >::GetTolerance(), otb::SimplifyPathFunctor< TInput, TOutput >::SetTolerance(), otb::SimplifyPathFunctor< TInput, TOutput >::SimplifyPathFunctor(), and otb::SimplifyPathFunctor< TInput, TOutput >::TestPathConsistency().