OTB  9.0.0
Orfeo Toolbox
Public Member Functions | Private Attributes | List of all members
otb::PolygonCompacityFunctor< TInput1 > Class Template Reference

#include <otbPolygonCompacityFunctor.h>

Public Member Functions

double GetThreshold (void) const
 
bool operator() (const TInput1 &input)
 
 PolygonCompacityFunctor ()
 
void SetThreshold (double threshold)
 
 ~PolygonCompacityFunctor ()
 

Private Attributes

double m_Threshold
 

Detailed Description

template<class TInput1>
class otb::PolygonCompacityFunctor< TInput1 >

Select polygons according to their compacity.

This functor compute the compacity of a polygon and return true is the distance is above the threshold, false otherwise.

The compacity is defined as:

$ 4\pi \frac{A}{L^2}$

where $ A $ is the area (obtained by the method GetArea() ) and $ L $ the perimeter (obtained by the method GetLength() ).

Definition at line 47 of file otbPolygonCompacityFunctor.h.

Constructor & Destructor Documentation

◆ PolygonCompacityFunctor()

template<class TInput1 >
otb::PolygonCompacityFunctor< TInput1 >::PolygonCompacityFunctor ( )
inline

◆ ~PolygonCompacityFunctor()

template<class TInput1 >
otb::PolygonCompacityFunctor< TInput1 >::~PolygonCompacityFunctor ( )
inline

Definition at line 63 of file otbPolygonCompacityFunctor.h.

Member Function Documentation

◆ GetThreshold()

template<class TInput1 >
double otb::PolygonCompacityFunctor< TInput1 >::GetThreshold ( void  ) const
inline

◆ operator()()

template<class TInput1 >
bool otb::PolygonCompacityFunctor< TInput1 >::operator() ( const TInput1 &  input)
inline

◆ SetThreshold()

template<class TInput1 >
void otb::PolygonCompacityFunctor< TInput1 >::SetThreshold ( double  threshold)
inline

Member Data Documentation

◆ m_Threshold

template<class TInput1 >
double otb::PolygonCompacityFunctor< TInput1 >::m_Threshold
private

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