OTB  9.0.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | List of all members
otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor > Class Template Reference

#include <otbLabelMapToVectorDataFilter.h>

+ Inheritance diagram for otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >:
+ Collaboration diagram for otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >:

Public Types

typedef InputLabelMapType::ConstIterator ConstIteratorType
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef otb::CorrectPolygonFunctor< PolygonTypeCorrectFunctorType
 
typedef DataNodeType::Pointer DataNodePointerType
 
typedef OutputVectorDataType::DataNodeType DataNodeType
 
typedef TFieldsFunctor FieldsFunctorType
 
typedef otb::Functor::LabelObjectToPolygonFunctor< LabelObjectType, PolygonTypeFunctorType
 
typedef TLabelMap InputLabelMapType
 
typedef InputLabelMapType::LabelObjectType LabelObjectType
 
typedef OutputVectorDataType::ConstPointer OutputVectorDataConstPointer
 
typedef OutputVectorDataType::Pointer OutputVectorDataPointer
 
typedef TVectorData OutputVectorDataType
 
typedef itk::SmartPointer< SelfPointer
 
typedef PolygonType::Pointer PolygonPointerType
 
typedef DataNodeType::PolygonType PolygonType
 
typedef LabelMapToVectorDataFilter Self
 
typedef VectorDataSource< TVectorData > Superclass
 
- Public Types inherited from otb::VectorDataSource< TVectorData >
typedef itk::SmartPointer< const SelfConstPointer
 
typedef itk::ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
 
typedef TVectorData ::Pointer OutputVectorDataPointer
 
typedef TVectorData OutputVectorDataType
 
typedef itk::SmartPointer< SelfPointer
 
typedef VectorDataSource Self
 
typedef itk::ProcessObject Superclass
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 
- Public Member Functions inherited from otb::VectorDataSource< TVectorData >
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 
virtual void GraftOutput (itk::DataObject *output)
 
virtual void GraftNthOutput (unsigned int idx, itk::DataObject *output)
 
virtual OutputVectorDataTypeGetOutput (void)
 
virtual OutputVectorDataTypeGetOutput (DataObjectPointerArraySizeType idx)
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from otb::VectorDataSource< TVectorData >
static Pointer New ()
 
FieldsFunctorType m_FieldsFunctor
 
virtual void SetInput (const InputLabelMapType *input)
 
virtual void SetInput (unsigned int idx, const InputLabelMapType *input)
 
const InputLabelMapTypeGetInput (void)
 
const InputLabelMapTypeGetInput (unsigned int idx)
 
void SetFieldsFunctor (const FieldsFunctorType &functor)
 
FieldsFunctorTypeGetFieldsFunctor ()
 
 LabelMapToVectorDataFilter ()
 
 ~LabelMapToVectorDataFilter () override
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
void GenerateData () override
 
 LabelMapToVectorDataFilter (const Self &)=delete
 
void operator= (const Self &)=delete
 

Additional Inherited Members

- Protected Member Functions inherited from otb::VectorDataSource< TVectorData >
 VectorDataSource ()
 
 ~VectorDataSource () override
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
virtual void AllocateOutputs ()
 

Detailed Description

template<class TLabelMap, class TVectorData, class TFieldsFunctor = Functor::LabelObjectFieldsFunctor<typename TLabelMap::LabelObjectType>>
class otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >

This class vectorizes a LabelObject to a VectorData.

LabelMapToVectorDataFilter converts a LabelMap to a VectorData where all the pixels get the attribute value of the label object they belong. It uses the class otbLabelObjectToPolygonFunctor which follows a finite states machine described in

"An algorithm for the rapid computation of boundaries of run-length encoded regions", Francis K. H. Queck, in Pattern Recognition 33 (2000), p 1637-1649.

Note : the output vector data contains index coordinates (not physical coordinates). For instance, a polygon around the pixel at index (0,0) would have the following points : [-0.5,-0.5] , [0.5,-0.5] , [0.5,0.5] , [-0.5,0.5]

See also
VectorDataSource

Definition at line 58 of file otbLabelMapToVectorDataFilter.h.

Member Typedef Documentation

◆ ConstIteratorType

template<class TLabelMap , class TVectorData , class TFieldsFunctor = Functor::LabelObjectFieldsFunctor<typename TLabelMap::LabelObjectType>>
typedef InputLabelMapType::ConstIterator otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::ConstIteratorType

Definition at line 77 of file otbLabelMapToVectorDataFilter.h.

◆ ConstPointer

template<class TLabelMap , class TVectorData , class TFieldsFunctor = Functor::LabelObjectFieldsFunctor<typename TLabelMap::LabelObjectType>>
typedef itk::SmartPointer<const Self> otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::ConstPointer

Definition at line 65 of file otbLabelMapToVectorDataFilter.h.

◆ CorrectFunctorType

template<class TLabelMap , class TVectorData , class TFieldsFunctor = Functor::LabelObjectFieldsFunctor<typename TLabelMap::LabelObjectType>>
typedef otb::CorrectPolygonFunctor<PolygonType> otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::CorrectFunctorType

Definition at line 85 of file otbLabelMapToVectorDataFilter.h.

◆ DataNodePointerType

template<class TLabelMap , class TVectorData , class TFieldsFunctor = Functor::LabelObjectFieldsFunctor<typename TLabelMap::LabelObjectType>>
typedef DataNodeType::Pointer otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::DataNodePointerType

Definition at line 79 of file otbLabelMapToVectorDataFilter.h.

◆ DataNodeType

template<class TLabelMap , class TVectorData , class TFieldsFunctor = Functor::LabelObjectFieldsFunctor<typename TLabelMap::LabelObjectType>>
typedef OutputVectorDataType::DataNodeType otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::DataNodeType

Definition at line 78 of file otbLabelMapToVectorDataFilter.h.

◆ FieldsFunctorType

template<class TLabelMap , class TVectorData , class TFieldsFunctor = Functor::LabelObjectFieldsFunctor<typename TLabelMap::LabelObjectType>>
typedef TFieldsFunctor otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::FieldsFunctorType

Definition at line 70 of file otbLabelMapToVectorDataFilter.h.

◆ FunctorType

template<class TLabelMap , class TVectorData , class TFieldsFunctor = Functor::LabelObjectFieldsFunctor<typename TLabelMap::LabelObjectType>>
typedef otb::Functor::LabelObjectToPolygonFunctor<LabelObjectType, PolygonType> otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::FunctorType

Some typedefs specific to functors

Definition at line 84 of file otbLabelMapToVectorDataFilter.h.

◆ InputLabelMapType

template<class TLabelMap , class TVectorData , class TFieldsFunctor = Functor::LabelObjectFieldsFunctor<typename TLabelMap::LabelObjectType>>
typedef TLabelMap otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::InputLabelMapType

Some convenient typedefs.

Definition at line 68 of file otbLabelMapToVectorDataFilter.h.

◆ LabelObjectType

template<class TLabelMap , class TVectorData , class TFieldsFunctor = Functor::LabelObjectFieldsFunctor<typename TLabelMap::LabelObjectType>>
typedef InputLabelMapType::LabelObjectType otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::LabelObjectType

Definition at line 75 of file otbLabelMapToVectorDataFilter.h.

◆ OutputVectorDataConstPointer

template<class TLabelMap , class TVectorData , class TFieldsFunctor = Functor::LabelObjectFieldsFunctor<typename TLabelMap::LabelObjectType>>
typedef OutputVectorDataType::ConstPointer otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::OutputVectorDataConstPointer

Definition at line 73 of file otbLabelMapToVectorDataFilter.h.

◆ OutputVectorDataPointer

template<class TLabelMap , class TVectorData , class TFieldsFunctor = Functor::LabelObjectFieldsFunctor<typename TLabelMap::LabelObjectType>>
typedef OutputVectorDataType::Pointer otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::OutputVectorDataPointer

Definition at line 72 of file otbLabelMapToVectorDataFilter.h.

◆ OutputVectorDataType

template<class TLabelMap , class TVectorData , class TFieldsFunctor = Functor::LabelObjectFieldsFunctor<typename TLabelMap::LabelObjectType>>
typedef TVectorData otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::OutputVectorDataType

Definition at line 69 of file otbLabelMapToVectorDataFilter.h.

◆ Pointer

template<class TLabelMap , class TVectorData , class TFieldsFunctor = Functor::LabelObjectFieldsFunctor<typename TLabelMap::LabelObjectType>>
typedef itk::SmartPointer<Self> otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::Pointer

Definition at line 64 of file otbLabelMapToVectorDataFilter.h.

◆ PolygonPointerType

template<class TLabelMap , class TVectorData , class TFieldsFunctor = Functor::LabelObjectFieldsFunctor<typename TLabelMap::LabelObjectType>>
typedef PolygonType::Pointer otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::PolygonPointerType

Definition at line 81 of file otbLabelMapToVectorDataFilter.h.

◆ PolygonType

template<class TLabelMap , class TVectorData , class TFieldsFunctor = Functor::LabelObjectFieldsFunctor<typename TLabelMap::LabelObjectType>>
typedef DataNodeType::PolygonType otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::PolygonType

Definition at line 80 of file otbLabelMapToVectorDataFilter.h.

◆ Self

template<class TLabelMap , class TVectorData , class TFieldsFunctor = Functor::LabelObjectFieldsFunctor<typename TLabelMap::LabelObjectType>>
typedef LabelMapToVectorDataFilter otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::Self

Standard class typedefs.

Definition at line 62 of file otbLabelMapToVectorDataFilter.h.

◆ Superclass

template<class TLabelMap , class TVectorData , class TFieldsFunctor = Functor::LabelObjectFieldsFunctor<typename TLabelMap::LabelObjectType>>
typedef VectorDataSource<TVectorData> otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::Superclass

Definition at line 63 of file otbLabelMapToVectorDataFilter.h.

Constructor & Destructor Documentation

◆ LabelMapToVectorDataFilter() [1/2]

template<class TLabelMap , class TVectorData , class TFieldsFunctor >
otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::LabelMapToVectorDataFilter
protected

Create usual root elements of the output vectordata

the label object

Get the polygon image of the labelobject using the functor

correct polygon if necessary

Store the label in the NodeId

Store additional fields given by functor

Add the polygon to the VectorData

Definition at line 30 of file otbLabelMapToVectorDataFilter.hxx.

◆ ~LabelMapToVectorDataFilter()

template<class TLabelMap , class TVectorData , class TFieldsFunctor = Functor::LabelObjectFieldsFunctor<typename TLabelMap::LabelObjectType>>
otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::~LabelMapToVectorDataFilter ( )
inlineoverrideprotected

Create usual root elements of the output vectordata

the label object

Get the polygon image of the labelobject using the functor

correct polygon if necessary

Store the label in the NodeId

Store additional fields given by functor

Add the polygon to the VectorData

Definition at line 116 of file otbLabelMapToVectorDataFilter.h.

◆ LabelMapToVectorDataFilter() [2/2]

template<class TLabelMap , class TVectorData , class TFieldsFunctor = Functor::LabelObjectFieldsFunctor<typename TLabelMap::LabelObjectType>>
otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::LabelMapToVectorDataFilter ( const Self )
privatedelete

Create usual root elements of the output vectordata

the label object

Get the polygon image of the labelobject using the functor

correct polygon if necessary

Store the label in the NodeId

Store additional fields given by functor

Add the polygon to the VectorData

Member Function Documentation

◆ CreateAnother()

template<class TLabelMap , class TVectorData , class TFieldsFunctor = Functor::LabelObjectFieldsFunctor<typename TLabelMap::LabelObjectType>>
virtual::itk::LightObject::Pointer otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::CreateAnother ( void  ) const

◆ GenerateData()

template<class TLabelMap , class TVectorData , class TFieldsFunctor >
void otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::GenerateData
overrideprotected

Create usual root elements of the output vectordata

the label object

Get the polygon image of the labelobject using the functor

correct polygon if necessary

Store the label in the NodeId

Store additional fields given by functor

Add the polygon to the VectorData

Definition at line 69 of file otbLabelMapToVectorDataFilter.hxx.

References otb::DOCUMENT, otb::FEATURE_POLYGON, and otb::FOLDER.

◆ GetFieldsFunctor()

template<class TLabelMap , class TVectorData , class TFieldsFunctor = Functor::LabelObjectFieldsFunctor<typename TLabelMap::LabelObjectType>>
FieldsFunctorType& otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::GetFieldsFunctor ( )
inline

Create usual root elements of the output vectordata

the label object

Get the polygon image of the labelobject using the functor

correct polygon if necessary

Store the label in the NodeId

Store additional fields given by functor

Add the polygon to the VectorData

Definition at line 109 of file otbLabelMapToVectorDataFilter.h.

◆ GetInput() [1/2]

template<class TLabelMap , class TVectorData , class TFieldsFunctor >
const LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::InputLabelMapType * otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::GetInput ( unsigned int  idx)

Create usual root elements of the output vectordata

the label object

Get the polygon image of the labelobject using the functor

correct polygon if necessary

Store the label in the NodeId

Store additional fields given by functor

Add the polygon to the VectorData

Definition at line 63 of file otbLabelMapToVectorDataFilter.hxx.

◆ GetInput() [2/2]

template<class TLabelMap , class TVectorData , class TFieldsFunctor >
const LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::InputLabelMapType * otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::GetInput ( void  )

Create usual root elements of the output vectordata

the label object

Get the polygon image of the labelobject using the functor

correct polygon if necessary

Store the label in the NodeId

Store additional fields given by functor

Add the polygon to the VectorData

Definition at line 51 of file otbLabelMapToVectorDataFilter.hxx.

◆ GetNameOfClass()

template<class TLabelMap , class TVectorData , class TFieldsFunctor = Functor::LabelObjectFieldsFunctor<typename TLabelMap::LabelObjectType>>
virtual const char* otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::GetNameOfClass ( ) const
virtual

Runtime information support.

◆ New()

template<class TLabelMap , class TVectorData , class TFieldsFunctor = Functor::LabelObjectFieldsFunctor<typename TLabelMap::LabelObjectType>>
static Pointer otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::New ( )
static

Standard New method.

◆ operator=()

template<class TLabelMap , class TVectorData , class TFieldsFunctor = Functor::LabelObjectFieldsFunctor<typename TLabelMap::LabelObjectType>>
void otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::operator= ( const Self )
privatedelete

Create usual root elements of the output vectordata

the label object

Get the polygon image of the labelobject using the functor

correct polygon if necessary

Store the label in the NodeId

Store additional fields given by functor

Add the polygon to the VectorData

◆ PrintSelf()

template<class TLabelMap , class TVectorData , class TFieldsFunctor >
void otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotected

Create usual root elements of the output vectordata

the label object

Get the polygon image of the labelobject using the functor

correct polygon if necessary

Store the label in the NodeId

Store additional fields given by functor

Add the polygon to the VectorData

Definition at line 129 of file otbLabelMapToVectorDataFilter.hxx.

◆ SetFieldsFunctor()

template<class TLabelMap , class TVectorData , class TFieldsFunctor = Functor::LabelObjectFieldsFunctor<typename TLabelMap::LabelObjectType>>
void otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::SetFieldsFunctor ( const FieldsFunctorType functor)
inline

Create usual root elements of the output vectordata

the label object

Get the polygon image of the labelobject using the functor

correct polygon if necessary

Store the label in the NodeId

Store additional fields given by functor

Add the polygon to the VectorData

Definition at line 102 of file otbLabelMapToVectorDataFilter.h.

◆ SetInput() [1/2]

template<class TLabelMap , class TVectorData , class TFieldsFunctor >
void otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::SetInput ( const InputLabelMapType input)
virtual

Create usual root elements of the output vectordata

the label object

Get the polygon image of the labelobject using the functor

correct polygon if necessary

Store the label in the NodeId

Store additional fields given by functor

Add the polygon to the VectorData

Definition at line 36 of file otbLabelMapToVectorDataFilter.hxx.

◆ SetInput() [2/2]

template<class TLabelMap , class TVectorData , class TFieldsFunctor >
void otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::SetInput ( unsigned int  idx,
const InputLabelMapType input 
)
virtual

Create usual root elements of the output vectordata

the label object

Get the polygon image of the labelobject using the functor

correct polygon if necessary

Store the label in the NodeId

Store additional fields given by functor

Add the polygon to the VectorData

Definition at line 43 of file otbLabelMapToVectorDataFilter.hxx.

Member Data Documentation

◆ m_FieldsFunctor

template<class TLabelMap , class TVectorData , class TFieldsFunctor = Functor::LabelObjectFieldsFunctor<typename TLabelMap::LabelObjectType>>
FieldsFunctorType otb::LabelMapToVectorDataFilter< TLabelMap, TVectorData, TFieldsFunctor >::m_FieldsFunctor
private

Create usual root elements of the output vectordata

the label object

Get the polygon image of the labelobject using the functor

correct polygon if necessary

Store the label in the NodeId

Store additional fields given by functor

Add the polygon to the VectorData

Definition at line 126 of file otbLabelMapToVectorDataFilter.h.


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