OTB  9.0.0
Orfeo Toolbox
Public Types | Public Member Functions | List of all members
otb::PersistentImageToOGRDataFilter< TImage > Class Template Referenceabstract

#include <otbPersistentImageToOGRDataFilter.h>

+ Inheritance diagram for otb::PersistentImageToOGRDataFilter< TImage >:
+ Collaboration diagram for otb::PersistentImageToOGRDataFilter< TImage >:

Public Types

typedef itk::SmartPointer< const SelfConstPointer
 
typedef InputImageType::IndexType IndexType
 
typedef InputImageType::Pointer InputImagePointer
 
typedef TImage InputImageType
 
typedef InputImageType::InternalPixelType InternalPixelType
 
typedef OGRDataSourceType::Pointer OGRDataSourcePointerType
 
typedef ogr::DataSource OGRDataSourceType
 
typedef ogr::Feature OGRFeatureType
 
typedef ogr::Layer OGRLayerType
 
typedef InputImageType::PixelType PixelType
 
typedef itk::SmartPointer< SelfPointer
 
typedef InputImageType::RegionType RegionType
 
typedef PersistentImageToOGRDataFilter Self
 
typedef InputImageType::SizeType SizeType
 
typedef PersistentImageFilter< TImage, TImage > Superclass
 
- Public Types inherited from otb::PersistentImageFilter< TImage, TImage >
typedef itk::SmartPointer< const SelfConstPointer
 
typedef TImage InputImageType
 
typedef TImage OutputImageType
 
typedef itk::SmartPointer< SelfPointer
 
typedef PersistentImageFilter Self
 
typedef itk::ImageToImageFilter< TImage, TImage > Superclass
 

Public Member Functions

void AllocateOutputs ()
 
virtual const char * GetNameOfClass () const
 
virtual void Initialize (void)
 
virtual void Reset (void)
 
virtual void Synthetize (void)
 
- Public Member Functions inherited from otb::PersistentImageFilter< TImage, TImage >
virtual const char * GetNameOfClass () const
 
std::string m_FieldName
 
std::string m_LayerName
 
OGRwkbGeometryType m_GeometryType
 
SizeType m_StreamSize {0,0}
 
std::vector< std::string > m_OGRLayerCreationOptions
 
OGRFieldType m_FieldType
 
virtual void SetLayerName (const char *_arg)
 
virtual const char * GetLayerName () const
 
virtual void SetFieldName (std::string _arg)
 
virtual std::string GetFieldName ()
 
virtual SizeType GetStreamSize ()
 
virtual void SetGeometryType (OGRwkbGeometryType _arg)
 
virtual OGRwkbGeometryType GetGeometryType ()
 
void SetOGRDataSource (OGRDataSourcePointerType ogrDS)
 
OGRDataSourceTypeGetOGRDataSource (void)
 
void AddOGRLayerCreationOption (const std::string &option)
 
void ClearOGRLayerCreationOptions ()
 
void SetOGRLayerCreationOptions (const std::vector< std::string > &options)
 
const std::vector< std::string > & GetOGRLayerCreationOptions (void)
 
virtual void SetFieldType (OGRFieldType _arg)
 
virtual OGRFieldType GetFieldType ()
 
 PersistentImageToOGRDataFilter ()
 
virtual ~PersistentImageToOGRDataFilter ()
 
void PrintSelf (std::ostream &os, itk::Indent indent) const
 
virtual void GenerateData ()
 
 PersistentImageToOGRDataFilter (const Self &)=delete
 
void operator= (const Self &)=delete
 
virtual OGRDataSourcePointerType ProcessTile ()=0
 

Additional Inherited Members

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

Detailed Description

template<class TImage>
class otb::PersistentImageToOGRDataFilter< TImage >

Perform vectorization in a persistent way.

This filter is a generic filter. It is the base class of the Large scale segmentation framework. The Initialize() method is used to create the new layer (LayerName) in the input OGRDataSource, and the field (FieldName) in the layer. This field will contain the label of the polygon in the input image. The ProcessTile() method is pure virtual and is implemented in sub class (

See also
PersistentStreamingLabelImageToOGRDataFilter). It returns a "memory" DataSource. This filter only copy each feature of the layer in the "memory" DataSource into the LayerName layer in the input OGRDataSource set by SetOGRDataSource() method.
PersistentImageFilter

Definition at line 52 of file otbPersistentImageToOGRDataFilter.h.

Member Typedef Documentation

◆ ConstPointer

template<class TImage >
typedef itk::SmartPointer<const Self> otb::PersistentImageToOGRDataFilter< TImage >::ConstPointer

Definition at line 59 of file otbPersistentImageToOGRDataFilter.h.

◆ IndexType

template<class TImage >
typedef InputImageType::IndexType otb::PersistentImageToOGRDataFilter< TImage >::IndexType

Definition at line 68 of file otbPersistentImageToOGRDataFilter.h.

◆ InputImagePointer

template<class TImage >
typedef InputImageType::Pointer otb::PersistentImageToOGRDataFilter< TImage >::InputImagePointer

Definition at line 65 of file otbPersistentImageToOGRDataFilter.h.

◆ InputImageType

template<class TImage >
typedef TImage otb::PersistentImageToOGRDataFilter< TImage >::InputImageType

Definition at line 62 of file otbPersistentImageToOGRDataFilter.h.

◆ InternalPixelType

template<class TImage >
typedef InputImageType::InternalPixelType otb::PersistentImageToOGRDataFilter< TImage >::InternalPixelType

Definition at line 70 of file otbPersistentImageToOGRDataFilter.h.

◆ OGRDataSourcePointerType

Definition at line 73 of file otbPersistentImageToOGRDataFilter.h.

◆ OGRDataSourceType

template<class TImage >
typedef ogr::DataSource otb::PersistentImageToOGRDataFilter< TImage >::OGRDataSourceType

Definition at line 72 of file otbPersistentImageToOGRDataFilter.h.

◆ OGRFeatureType

template<class TImage >
typedef ogr::Feature otb::PersistentImageToOGRDataFilter< TImage >::OGRFeatureType

Definition at line 75 of file otbPersistentImageToOGRDataFilter.h.

◆ OGRLayerType

template<class TImage >
typedef ogr::Layer otb::PersistentImageToOGRDataFilter< TImage >::OGRLayerType

Definition at line 74 of file otbPersistentImageToOGRDataFilter.h.

◆ PixelType

template<class TImage >
typedef InputImageType::PixelType otb::PersistentImageToOGRDataFilter< TImage >::PixelType

Definition at line 69 of file otbPersistentImageToOGRDataFilter.h.

◆ Pointer

template<class TImage >
typedef itk::SmartPointer<Self> otb::PersistentImageToOGRDataFilter< TImage >::Pointer

Definition at line 58 of file otbPersistentImageToOGRDataFilter.h.

◆ RegionType

template<class TImage >
typedef InputImageType::RegionType otb::PersistentImageToOGRDataFilter< TImage >::RegionType

Definition at line 66 of file otbPersistentImageToOGRDataFilter.h.

◆ Self

template<class TImage >
typedef PersistentImageToOGRDataFilter otb::PersistentImageToOGRDataFilter< TImage >::Self

Standard Self typedef

Definition at line 56 of file otbPersistentImageToOGRDataFilter.h.

◆ SizeType

template<class TImage >
typedef InputImageType::SizeType otb::PersistentImageToOGRDataFilter< TImage >::SizeType

Definition at line 67 of file otbPersistentImageToOGRDataFilter.h.

◆ Superclass

template<class TImage >
typedef PersistentImageFilter<TImage, TImage> otb::PersistentImageToOGRDataFilter< TImage >::Superclass

Definition at line 57 of file otbPersistentImageToOGRDataFilter.h.

Constructor & Destructor Documentation

◆ PersistentImageToOGRDataFilter() [1/2]

template<class TImage >
otb::PersistentImageToOGRDataFilter< TImage >::PersistentImageToOGRDataFilter
protected

Set/Get the name of the output layer to write in the ogr::DataSource.

Definition at line 35 of file otbPersistentImageToOGRDataFilter.hxx.

References otb::PersistentImageToOGRDataFilter< TImage >::m_StreamSize.

◆ ~PersistentImageToOGRDataFilter()

template<class TImage >
otb::PersistentImageToOGRDataFilter< TImage >::~PersistentImageToOGRDataFilter
protectedvirtual

Set/Get the name of the output layer to write in the ogr::DataSource.

Definition at line 44 of file otbPersistentImageToOGRDataFilter.hxx.

◆ PersistentImageToOGRDataFilter() [2/2]

template<class TImage >
otb::PersistentImageToOGRDataFilter< TImage >::PersistentImageToOGRDataFilter ( const Self )
privatedelete

Set/Get the name of the output layer to write in the ogr::DataSource.

Member Function Documentation

◆ AddOGRLayerCreationOption()

template<class TImage >
void otb::PersistentImageToOGRDataFilter< TImage >::AddOGRLayerCreationOption ( const std::string &  option)

Add one option for OGR layer creation

Definition at line 61 of file otbPersistentImageToOGRDataFilter.hxx.

◆ AllocateOutputs()

template<class TImage >
void otb::PersistentImageToOGRDataFilter< TImage >::AllocateOutputs

Definition at line 88 of file otbPersistentImageToOGRDataFilter.hxx.

◆ ClearOGRLayerCreationOptions()

template<class TImage >
void otb::PersistentImageToOGRDataFilter< TImage >::ClearOGRLayerCreationOptions

Clear all OGR layer creation options

Definition at line 68 of file otbPersistentImageToOGRDataFilter.hxx.

◆ GenerateData()

template<class TImage >
void otb::PersistentImageToOGRDataFilter< TImage >::GenerateData
protectedvirtual

◆ GetFieldName()

template<class TImage >
virtual std::string otb::PersistentImageToOGRDataFilter< TImage >::GetFieldName ( )
virtual

Return the Field name in which labels have been written.

◆ GetFieldType()

template<class TImage >
virtual OGRFieldType otb::PersistentImageToOGRDataFilter< TImage >::GetFieldType ( )
virtual

Get the field type for class label

◆ GetGeometryType()

template<class TImage >
virtual OGRwkbGeometryType otb::PersistentImageToOGRDataFilter< TImage >::GetGeometryType ( )
virtual

Get the geometry type

◆ GetLayerName()

template<class TImage >
virtual const char* otb::PersistentImageToOGRDataFilter< TImage >::GetLayerName ( ) const
virtual

Set/Get the name of the output layer to write in the ogr::DataSource.

◆ GetNameOfClass()

template<class TImage >
virtual const char* otb::PersistentImageToOGRDataFilter< TImage >::GetNameOfClass ( ) const
virtual

Runtime information support.

◆ GetOGRDataSource()

template<class TImage >
PersistentImageToOGRDataFilter< TImage >::OGRDataSourceType * otb::PersistentImageToOGRDataFilter< TImage >::GetOGRDataSource ( void  )

Get the ogr::DataSource output.

Definition at line 55 of file otbPersistentImageToOGRDataFilter.hxx.

◆ GetOGRLayerCreationOptions()

template<class TImage >
const std::vector< std::string > & otb::PersistentImageToOGRDataFilter< TImage >::GetOGRLayerCreationOptions ( void  )

Get the OGR layer creation options

Definition at line 82 of file otbPersistentImageToOGRDataFilter.hxx.

◆ GetStreamSize()

template<class TImage >
virtual SizeType otb::PersistentImageToOGRDataFilter< TImage >::GetStreamSize ( )
virtual

Get the size of the tile used for streaming. This is useful if you use for example the OGRFusionTileFilter for fusioning streaming tiles.

◆ Initialize()

template<class TImage >
void otb::PersistentImageToOGRDataFilter< TImage >::Initialize ( void  )
virtual

This method creates the output layer in the OGRDataSource set by the user. The name of the layer is set by SetLayerName .

Note
This method must be called before the call of Update .

Definition at line 104 of file otbPersistentImageToOGRDataFilter.hxx.

References otb::ogr::Layer::CreateField().

◆ operator=()

template<class TImage >
void otb::PersistentImageToOGRDataFilter< TImage >::operator= ( const Self )
privatedelete

Set/Get the name of the output layer to write in the ogr::DataSource.

◆ PrintSelf()

template<class TImage >
void otb::PersistentImageToOGRDataFilter< TImage >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
protected

Set/Get the name of the output layer to write in the ogr::DataSource.

Definition at line 167 of file otbPersistentImageToOGRDataFilter.hxx.

◆ ProcessTile()

template<class TImage >
virtual OGRDataSourcePointerType otb::PersistentImageToOGRDataFilter< TImage >::ProcessTile ( )
privatepure virtual

Set/Get the name of the output layer to write in the ogr::DataSource.

◆ Reset()

template<class TImage >
void otb::PersistentImageToOGRDataFilter< TImage >::Reset ( void  )
virtual

Reset the persistent data of the filter.

Implements otb::PersistentImageFilter< TImage, TImage >.

Definition at line 94 of file otbPersistentImageToOGRDataFilter.hxx.

◆ SetFieldName()

template<class TImage >
virtual void otb::PersistentImageToOGRDataFilter< TImage >::SetFieldName ( std::string  _arg)
virtual

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

◆ SetFieldType()

template<class TImage >
virtual void otb::PersistentImageToOGRDataFilter< TImage >::SetFieldType ( OGRFieldType  _arg)
virtual

Set the field type for class label

◆ SetGeometryType()

template<class TImage >
virtual void otb::PersistentImageToOGRDataFilter< TImage >::SetGeometryType ( OGRwkbGeometryType  _arg)
virtual

Set the geometry type

◆ SetLayerName()

template<class TImage >
virtual void otb::PersistentImageToOGRDataFilter< TImage >::SetLayerName ( const char *  _arg)
virtual

Set/Get the name of the output layer to write in the ogr::DataSource.

◆ SetOGRDataSource()

template<class TImage >
void otb::PersistentImageToOGRDataFilter< TImage >::SetOGRDataSource ( OGRDataSourcePointerType  ogrDS)

Set the ogr::DataSource in which the layer LayerName will be created.

Definition at line 49 of file otbPersistentImageToOGRDataFilter.hxx.

◆ SetOGRLayerCreationOptions()

template<class TImage >
void otb::PersistentImageToOGRDataFilter< TImage >::SetOGRLayerCreationOptions ( const std::vector< std::string > &  options)

Set the OGR layer creation options

Definition at line 75 of file otbPersistentImageToOGRDataFilter.hxx.

◆ Synthetize()

template<class TImage >
void otb::PersistentImageToOGRDataFilter< TImage >::Synthetize ( void  )
virtual

Synthesize the persistent data of the filter.

Implements otb::PersistentImageFilter< TImage, TImage >.

Definition at line 99 of file otbPersistentImageToOGRDataFilter.hxx.

Member Data Documentation

◆ m_FieldName

template<class TImage >
std::string otb::PersistentImageToOGRDataFilter< TImage >::m_FieldName
private

Set/Get the name of the output layer to write in the ogr::DataSource.

Definition at line 154 of file otbPersistentImageToOGRDataFilter.h.

◆ m_FieldType

template<class TImage >
OGRFieldType otb::PersistentImageToOGRDataFilter< TImage >::m_FieldType
private

Set/Get the name of the output layer to write in the ogr::DataSource.

Definition at line 159 of file otbPersistentImageToOGRDataFilter.h.

◆ m_GeometryType

template<class TImage >
OGRwkbGeometryType otb::PersistentImageToOGRDataFilter< TImage >::m_GeometryType
private

Set/Get the name of the output layer to write in the ogr::DataSource.

Definition at line 156 of file otbPersistentImageToOGRDataFilter.h.

◆ m_LayerName

template<class TImage >
std::string otb::PersistentImageToOGRDataFilter< TImage >::m_LayerName
private

Set/Get the name of the output layer to write in the ogr::DataSource.

Definition at line 155 of file otbPersistentImageToOGRDataFilter.h.

◆ m_OGRLayerCreationOptions

template<class TImage >
std::vector<std::string> otb::PersistentImageToOGRDataFilter< TImage >::m_OGRLayerCreationOptions
private

Set/Get the name of the output layer to write in the ogr::DataSource.

Definition at line 158 of file otbPersistentImageToOGRDataFilter.h.

◆ m_StreamSize

template<class TImage >
SizeType otb::PersistentImageToOGRDataFilter< TImage >::m_StreamSize {0,0}
private

Set/Get the name of the output layer to write in the ogr::DataSource.

Definition at line 157 of file otbPersistentImageToOGRDataFilter.h.

Referenced by otb::PersistentImageToOGRDataFilter< TImage >::PersistentImageToOGRDataFilter().


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