OTB  6.7.0
Orfeo Toolbox
Public Types | List of all members
otb::Functor::MergeLabelObjectFunctor< TLabelObject > Class Template Reference

#include <otbMergeLabelObjectFunctor.h>

Public Types

typedef LineType::IndexType IndexType
 
typedef LabelObjectType::Pointer LabelObjectPointerType
 
typedef TLabelObject LabelObjectType
 
typedef
LabelObjectType::LineContainerType 
LineContainerType
 
typedef LabelObjectType::LineType LineType
 
LabelObjectPointerType operator() (const LabelObjectType *l1, const LabelObjectType *l2) const
 
static bool LexicographicalLineCompare (const LineType &l1, const LineType &l2)
 
static bool LinesOverlap (const LineType &l1, const LineType &l2)
 
static const LineType MergesLines (const LineType &l1, const LineType &l2)
 

Detailed Description

template<class TLabelObject>
class otb::Functor::MergeLabelObjectFunctor< TLabelObject >

Merge two LabelObjects.

This functor merges the two inputs label objects into a third label object where the Run have been merged. The resulting label object holds data from first input label object copied via the CopyDataFrom() method.

Please note that if the two input label objects are disjoint, the resulting label object will have more than one connected component.

This functor is thread safe.

Definition at line 48 of file otbMergeLabelObjectFunctor.h.

Member Typedef Documentation

template<class TLabelObject >
typedef LineType::IndexType otb::Functor::MergeLabelObjectFunctor< TLabelObject >::IndexType

Definition at line 56 of file otbMergeLabelObjectFunctor.h.

template<class TLabelObject >
typedef LabelObjectType::Pointer otb::Functor::MergeLabelObjectFunctor< TLabelObject >::LabelObjectPointerType

Definition at line 53 of file otbMergeLabelObjectFunctor.h.

template<class TLabelObject >
typedef TLabelObject otb::Functor::MergeLabelObjectFunctor< TLabelObject >::LabelObjectType

Template parameters typedefs

Definition at line 52 of file otbMergeLabelObjectFunctor.h.

template<class TLabelObject >
typedef LabelObjectType::LineContainerType otb::Functor::MergeLabelObjectFunctor< TLabelObject >::LineContainerType

Definition at line 54 of file otbMergeLabelObjectFunctor.h.

template<class TLabelObject >
typedef LabelObjectType::LineType otb::Functor::MergeLabelObjectFunctor< TLabelObject >::LineType

Definition at line 55 of file otbMergeLabelObjectFunctor.h.

Member Function Documentation

template<class TLabelObject >
static bool otb::Functor::MergeLabelObjectFunctor< TLabelObject >::LexicographicalLineCompare ( const LineType l1,
const LineType l2 
)
inlinestaticprivate

Compare two line in the lexicographical order with respect to their start index.

Definition at line 123 of file otbMergeLabelObjectFunctor.h.

Referenced by otb::Functor::MergeLabelObjectFunctor< TLabelObject >::operator()().

template<class TLabelObject >
static bool otb::Functor::MergeLabelObjectFunctor< TLabelObject >::LinesOverlap ( const LineType l1,
const LineType l2 
)
inlinestaticprivate

Check if lines overlap (same row and one of the run end inside the other run)

Definition at line 133 of file otbMergeLabelObjectFunctor.h.

Referenced by otb::Functor::MergeLabelObjectFunctor< TLabelObject >::operator()().

template<class TLabelObject >
static const LineType otb::Functor::MergeLabelObjectFunctor< TLabelObject >::MergesLines ( const LineType l1,
const LineType l2 
)
inlinestaticprivate

Merge two lines. l1 and l2 are supposed to be in the same row and to overlap. l1 is supposed to appear before l2

Definition at line 145 of file otbMergeLabelObjectFunctor.h.

Referenced by otb::Functor::MergeLabelObjectFunctor< TLabelObject >::operator()().

template<class TLabelObject >
LabelObjectPointerType otb::Functor::MergeLabelObjectFunctor< TLabelObject >::operator() ( const LabelObjectType l1,
const LabelObjectType l2 
) const
inline
Parameters
l1First label object to merge (data are copied from this one),
l2Second label object to merge
Returns
The merged label object

Definition at line 65 of file otbMergeLabelObjectFunctor.h.

References otb::Functor::MergeLabelObjectFunctor< TLabelObject >::LexicographicalLineCompare(), otb::Functor::MergeLabelObjectFunctor< TLabelObject >::LinesOverlap(), and otb::Functor::MergeLabelObjectFunctor< TLabelObject >::MergesLines().


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