OTB  9.0.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | List of all members
otb::LabelImageToOGRDataSourceFilter< TInputImage > Class Template Reference

#include <otbLabelImageToOGRDataSourceFilter.h>

+ Inheritance diagram for otb::LabelImageToOGRDataSourceFilter< TInputImage >:
+ Collaboration diagram for otb::LabelImageToOGRDataSourceFilter< TInputImage >:

Public Types

typedef itk::SmartPointer< const SelfConstPointer
 
typedef itk::ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
 
typedef InputImageType::IndexType IndexType
 
typedef TInputImage InputImageType
 
typedef InputImageType::IndexType InputIndexType
 
typedef InputImageType::PixelType InputPixelType
 
typedef OGRDataSourceType::Pointer OGRDataSourcePointerType
 
typedef ogr::DataSource OGRDataSourceType
 
typedef ogr::Layer OGRLayerType
 
typedef InputImageType::PointType OriginType
 
typedef itk::SmartPointer< SelfPointer
 
typedef InputImageType::RegionType RegionType
 
typedef LabelImageToOGRDataSourceFilter Self
 
typedef InputImageType::SizeType SizeType
 
typedef InputImageType::SpacingType SpacingType
 
typedef itk::ProcessObject Superclass
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 

Static Public Member Functions

static Pointer New ()
 
typedef itk::DataObject::Pointer DataObjectPointer
 
std::string m_FieldName
 
bool m_Use8Connected
 
virtual void SetInput (const InputImageType *input)
 
virtual const InputImageTypeGetInput (void)
 
virtual void SetInputMask (const InputImageType *input)
 
virtual const InputImageTypeGetInputMask (void)
 
virtual void SetFieldName (std::string _arg)
 
virtual std::string GetFieldName ()
 
virtual void SetUse8Connected (bool _arg)
 
virtual bool GetUse8Connected ()
 
const OGRDataSourceTypeGetOutput ()
 
 LabelImageToOGRDataSourceFilter ()
 
 ~LabelImageToOGRDataSourceFilter () override
 
void GenerateInputRequestedRegion () override
 
void GenerateData () override
 
DataObjectPointer MakeOutput (DataObjectPointerArraySizeType idx) override
 
 LabelImageToOGRDataSourceFilter (const Self &)=delete
 
void operator= (const Self &)=delete
 

Detailed Description

template<class TInputImage>
class otb::LabelImageToOGRDataSourceFilter< TInputImage >

this class uses GDALPolygonize() method to transform a Label image into a "memory" OGRDataSource. The layer in the DataSource is named "Layer". Each Feature of the layer has a Integer Field which name is specified by SetFieldName() (default is "DN"). Label of the input image are written into this field. An optional input mask can be used to exclude pixels from vectorization process. All pixels with a value of 0 in the input mask image will not be suitable for vectorization.

Note
The Use8Connected parameter can be turn on and it will be used in GDALPolygonize(). But be carreful, it can create cross polygons !
It is a non-streamed version.

Definition at line 48 of file otbLabelImageToOGRDataSourceFilter.h.

Member Typedef Documentation

◆ ConstPointer

template<class TInputImage >
typedef itk::SmartPointer<const Self> otb::LabelImageToOGRDataSourceFilter< TInputImage >::ConstPointer

Definition at line 55 of file otbLabelImageToOGRDataSourceFilter.h.

◆ DataObjectPointer

template<class TInputImage >
typedef itk::DataObject::Pointer otb::LabelImageToOGRDataSourceFilter< TInputImage >::DataObjectPointer
protected

DataObject pointer

Definition at line 130 of file otbLabelImageToOGRDataSourceFilter.h.

◆ DataObjectPointerArraySizeType

template<class TInputImage >
typedef itk::ProcessObject::DataObjectPointerArraySizeType otb::LabelImageToOGRDataSourceFilter< TInputImage >::DataObjectPointerArraySizeType

Definition at line 77 of file otbLabelImageToOGRDataSourceFilter.h.

◆ IndexType

template<class TInputImage >
typedef InputImageType::IndexType otb::LabelImageToOGRDataSourceFilter< TInputImage >::IndexType

Definition at line 71 of file otbLabelImageToOGRDataSourceFilter.h.

◆ InputImageType

template<class TInputImage >
typedef TInputImage otb::LabelImageToOGRDataSourceFilter< TInputImage >::InputImageType

Definition of the input image

Definition at line 61 of file otbLabelImageToOGRDataSourceFilter.h.

◆ InputIndexType

template<class TInputImage >
typedef InputImageType::IndexType otb::LabelImageToOGRDataSourceFilter< TInputImage >::InputIndexType

Definition at line 66 of file otbLabelImageToOGRDataSourceFilter.h.

◆ InputPixelType

template<class TInputImage >
typedef InputImageType::PixelType otb::LabelImageToOGRDataSourceFilter< TInputImage >::InputPixelType

Definition at line 65 of file otbLabelImageToOGRDataSourceFilter.h.

◆ OGRDataSourcePointerType

Definition at line 74 of file otbLabelImageToOGRDataSourceFilter.h.

◆ OGRDataSourceType

template<class TInputImage >
typedef ogr::DataSource otb::LabelImageToOGRDataSourceFilter< TInputImage >::OGRDataSourceType

Definition at line 73 of file otbLabelImageToOGRDataSourceFilter.h.

◆ OGRLayerType

template<class TInputImage >
typedef ogr::Layer otb::LabelImageToOGRDataSourceFilter< TInputImage >::OGRLayerType

Definition at line 75 of file otbLabelImageToOGRDataSourceFilter.h.

◆ OriginType

template<class TInputImage >
typedef InputImageType::PointType otb::LabelImageToOGRDataSourceFilter< TInputImage >::OriginType

Definition at line 70 of file otbLabelImageToOGRDataSourceFilter.h.

◆ Pointer

template<class TInputImage >
typedef itk::SmartPointer<Self> otb::LabelImageToOGRDataSourceFilter< TInputImage >::Pointer

Definition at line 54 of file otbLabelImageToOGRDataSourceFilter.h.

◆ RegionType

template<class TInputImage >
typedef InputImageType::RegionType otb::LabelImageToOGRDataSourceFilter< TInputImage >::RegionType

Definition at line 68 of file otbLabelImageToOGRDataSourceFilter.h.

◆ Self

template<class TInputImage >
typedef LabelImageToOGRDataSourceFilter otb::LabelImageToOGRDataSourceFilter< TInputImage >::Self

typedef for the classes standards.

Definition at line 52 of file otbLabelImageToOGRDataSourceFilter.h.

◆ SizeType

template<class TInputImage >
typedef InputImageType::SizeType otb::LabelImageToOGRDataSourceFilter< TInputImage >::SizeType

Definition at line 67 of file otbLabelImageToOGRDataSourceFilter.h.

◆ SpacingType

template<class TInputImage >
typedef InputImageType::SpacingType otb::LabelImageToOGRDataSourceFilter< TInputImage >::SpacingType

Definition at line 69 of file otbLabelImageToOGRDataSourceFilter.h.

◆ Superclass

template<class TInputImage >
typedef itk::ProcessObject otb::LabelImageToOGRDataSourceFilter< TInputImage >::Superclass

Definition at line 53 of file otbLabelImageToOGRDataSourceFilter.h.

Constructor & Destructor Documentation

◆ LabelImageToOGRDataSourceFilter() [1/2]

template<class TInputImage >
otb::LabelImageToOGRDataSourceFilter< TInputImage >::LabelImageToOGRDataSourceFilter
protected

◆ ~LabelImageToOGRDataSourceFilter()

template<class TInputImage >
otb::LabelImageToOGRDataSourceFilter< TInputImage >::~LabelImageToOGRDataSourceFilter ( )
inlineoverrideprotected

DataObject pointer

Definition at line 120 of file otbLabelImageToOGRDataSourceFilter.h.

◆ LabelImageToOGRDataSourceFilter() [2/2]

template<class TInputImage >
otb::LabelImageToOGRDataSourceFilter< TInputImage >::LabelImageToOGRDataSourceFilter ( const Self )
privatedelete

DataObject pointer

Member Function Documentation

◆ CreateAnother()

template<class TInputImage >
virtual::itk::LightObject::Pointer otb::LabelImageToOGRDataSourceFilter< TInputImage >::CreateAnother ( void  ) const

◆ GenerateData()

template<class TInputImage >
void otb::LabelImageToOGRDataSourceFilter< TInputImage >::GenerateData
overrideprotected

◆ GenerateInputRequestedRegion()

template<class TInputImage >
void otb::LabelImageToOGRDataSourceFilter< TInputImage >::GenerateInputRequestedRegion
overrideprotected

DataObject pointer

Definition at line 98 of file otbLabelImageToOGRDataSourceFilter.hxx.

◆ GetFieldName()

template<class TInputImage >
virtual std::string otb::LabelImageToOGRDataSourceFilter< TInputImage >::GetFieldName ( )
virtual

Return the Field name in which labels have been written.

◆ GetInput()

template<class TInputImage >
const LabelImageToOGRDataSourceFilter< TInputImage >::InputImageType * otb::LabelImageToOGRDataSourceFilter< TInputImage >::GetInput ( void  )
virtual

DataObject pointer

Definition at line 70 of file otbLabelImageToOGRDataSourceFilter.hxx.

◆ GetInputMask()

template<class TInputImage >
const LabelImageToOGRDataSourceFilter< TInputImage >::InputImageType * otb::LabelImageToOGRDataSourceFilter< TInputImage >::GetInputMask ( void  )
virtual

DataObject pointer

Definition at line 87 of file otbLabelImageToOGRDataSourceFilter.hxx.

◆ GetNameOfClass()

template<class TInputImage >
virtual const char* otb::LabelImageToOGRDataSourceFilter< TInputImage >::GetNameOfClass ( ) const
virtual

Return the name of the class.

◆ GetOutput()

template<class TInputImage >
const LabelImageToOGRDataSourceFilter< TInputImage >::OGRDataSourceType * otb::LabelImageToOGRDataSourceFilter< TInputImage >::GetOutput

Get the output ogr::DataSource which is a "memory" datasource.

Definition at line 58 of file otbLabelImageToOGRDataSourceFilter.hxx.

◆ GetUse8Connected()

template<class TInputImage >
virtual bool otb::LabelImageToOGRDataSourceFilter< TInputImage >::GetUse8Connected ( )
virtual

Get the value of 8-connected neighborhood option used in GDALPolygonize

◆ MakeOutput()

template<class TInputImage >
LabelImageToOGRDataSourceFilter< TInputImage >::DataObjectPointer otb::LabelImageToOGRDataSourceFilter< TInputImage >::MakeOutput ( DataObjectPointerArraySizeType  idx)
overrideprotected

◆ New()

template<class TInputImage >
static Pointer otb::LabelImageToOGRDataSourceFilter< TInputImage >::New ( )
static

Method for management of the object factory.

◆ operator=()

template<class TInputImage >
void otb::LabelImageToOGRDataSourceFilter< TInputImage >::operator= ( const Self )
privatedelete

DataObject pointer

◆ SetFieldName()

template<class TInputImage >
virtual void otb::LabelImageToOGRDataSourceFilter< TInputImage >::SetFieldName ( std::string  _arg)
virtual

Set the Field Name in which labels will be written. (default is "DN") A field "FieldName" of type integer is created in the output memory layer.

◆ SetInput()

template<class TInputImage >
void otb::LabelImageToOGRDataSourceFilter< TInputImage >::SetInput ( const InputImageType input)
virtual

DataObject pointer

Definition at line 64 of file otbLabelImageToOGRDataSourceFilter.hxx.

◆ SetInputMask()

template<class TInputImage >
void otb::LabelImageToOGRDataSourceFilter< TInputImage >::SetInputMask ( const InputImageType input)
virtual

Set the input mask image. All pixels in the mask with a value of 0 will not be considered suitable for vectorization.

Definition at line 81 of file otbLabelImageToOGRDataSourceFilter.hxx.

◆ SetUse8Connected()

template<class TInputImage >
virtual void otb::LabelImageToOGRDataSourceFilter< TInputImage >::SetUse8Connected ( bool  _arg)
virtual

Set the value of 8-connected neighborhood option used in GDALPolygonize

Member Data Documentation

◆ m_FieldName

template<class TInputImage >
std::string otb::LabelImageToOGRDataSourceFilter< TInputImage >::m_FieldName
private

DataObject pointer

Definition at line 139 of file otbLabelImageToOGRDataSourceFilter.h.

◆ m_Use8Connected

template<class TInputImage >
bool otb::LabelImageToOGRDataSourceFilter< TInputImage >::m_Use8Connected
private

DataObject pointer

Definition at line 140 of file otbLabelImageToOGRDataSourceFilter.h.


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