OTB  6.7.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Private Member Functions | Private Attributes | 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 Self
ConstPointer
 
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 Types inherited from itk::ProcessObject
typedef SmartPointer< const SelfConstPointer
 
typedef
DataObject::DataObjectIdentifierType 
DataObjectIdentifierType
 
typedef DataObject::Pointer DataObjectPointer
 
typedef std::vector
< DataObjectPointer
DataObjectPointerArray
 
typedef
DataObjectPointerArray::size_type 
DataObjectPointerArraySizeType
 
typedef std::vector
< DataObjectIdentifierType
NameArray
 
typedef SmartPointer< SelfPointer
 
typedef ProcessObject Self
 
typedef Object Superclass
 
- Public Types inherited from itk::Object
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef Object Self
 
typedef LightObject Superclass
 
- Public Types inherited from itk::LightObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightObject Self
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual std::string GetFieldName ()
 
virtual const char * GetNameOfClass () const
 
const OGRDataSourceTypeGetOutput ()
 
virtual bool GetUse8Connected ()
 
virtual void SetFieldName (std::string _arg)
 
virtual void SetUse8Connected (bool _arg)
 
virtual void SetInput (const InputImageType *input)
 
virtual const InputImageTypeGetInput (void)
 
virtual void SetInputMask (const InputImageType *input)
 
virtual const InputImageTypeGetInputMask (void)
 
- Public Member Functions inherited from itk::ProcessObject
virtual void AbortGenerateDataOff ()
 
virtual void AbortGenerateDataOn ()
 
virtual void EnlargeOutputRequestedRegion (DataObject *)
 
virtual const bool & GetAbortGenerateData () const
 
DataObjectPointerArray GetIndexedInputs ()
 
DataObjectPointerArray GetIndexedOutputs ()
 
NameArray GetInputNames () const
 
DataObjectPointerArray GetInputs ()
 
MultiThreader * GetMultiThreader () const
 
DataObjectPointerArraySizeType GetNumberOfIndexedInputs () const
 
DataObjectPointerArraySizeType GetNumberOfIndexedOutputs () const
 
DataObjectPointerArraySizeType GetNumberOfInputs () const
 
DataObjectPointerArraySizeType GetNumberOfOutputs () const
 
virtual const ThreadIdTypeGetNumberOfThreads () const
 
virtual
DataObjectPointerArraySizeType 
GetNumberOfValidRequiredInputs () const
 
NameArray GetOutputNames () const
 
DataObjectPointerArray GetOutputs ()
 
virtual const float & GetProgress () const
 
virtual const bool & GetReleaseDataBeforeUpdateFlag () const
 
virtual bool GetReleaseDataFlag () const
 
NameArray GetRequiredInputNames () const
 
bool HasInput (const DataObjectIdentifierType &key) const
 
bool HasOutput (const DataObjectIdentifierType &key) const
 
virtual DataObjectPointer MakeOutput (const DataObjectIdentifierType &)
 
virtual void PrepareOutputs ()
 
virtual void PropagateRequestedRegion (DataObject *output)
 
virtual void ReleaseDataBeforeUpdateFlagOff ()
 
virtual void ReleaseDataBeforeUpdateFlagOn ()
 
void ReleaseDataFlagOff ()
 
void ReleaseDataFlagOn ()
 
virtual void ResetPipeline ()
 
virtual void SetAbortGenerateData (bool _arg)
 
virtual void SetNumberOfThreads (ThreadIdType _arg)
 
void SetProgress (float progress)
 
virtual void SetReleaseDataBeforeUpdateFlag (bool _arg)
 
virtual void SetReleaseDataFlag (bool flag)
 
virtual void Update ()
 
virtual void UpdateLargestPossibleRegion ()
 
virtual void UpdateOutputData (DataObject *output)
 
virtual void UpdateOutputInformation ()
 
void UpdateProgress (float progress)
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
virtual ModifiedTimeType GetMTime () const
 
virtual const std::string & GetObjectName () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
virtual void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual void SetReferenceCount (int) override
 
virtual void UnRegister () const noexceptoverride
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool flag)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Protected Types

typedef itk::DataObject::Pointer DataObjectPointer
 

Protected Member Functions

void GenerateData () override
 
void GenerateInputRequestedRegion () override
 
 LabelImageToOGRDataSourceFilter ()
 
DataObjectPointer MakeOutput (DataObjectPointerArraySizeType idx) override
 
 ~LabelImageToOGRDataSourceFilter () override
 
- Protected Member Functions inherited from itk::ProcessObject
virtual void AddInput (DataObject *input)
 
virtual void AddOutput (DataObject *output)
 
bool AddRequiredInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx)
 
bool AddRequiredInputName (const DataObjectIdentifierType &)
 
virtual void CacheInputReleaseDataFlags ()
 
virtual void GenerateOutputInformation ()
 
virtual void GenerateOutputRequestedRegion (DataObject *output)
 
const DataObjectGetInput (const DataObjectIdentifierType &key) const
 
DataObjectGetInput (DataObjectPointerArraySizeType idx)
 
const DataObjectGetInput (DataObjectPointerArraySizeType idx) const
 
DataObjectGetInput (const DataObjectIdentifierType &key)
 
virtual const
DataObjectPointerArraySizeType
GetNumberOfRequiredInputs () const
 
virtual const
DataObjectPointerArraySizeType
GetNumberOfRequiredOutputs () const
 
DataObjectGetOutput (const DataObjectIdentifierType &key)
 
const DataObjectGetOutput (const DataObjectIdentifierType &key) const
 
DataObjectGetOutput (DataObjectPointerArraySizeType idx)
 
const DataObjectGetOutput (DataObjectPointerArraySizeType idx) const
 
DataObjectGetPrimaryInput ()
 
const DataObjectGetPrimaryInput () const
 
virtual const char * GetPrimaryInputName (void) const
 
DataObjectGetPrimaryOutput ()
 
const DataObjectGetPrimaryOutput () const
 
virtual const char * GetPrimaryOutputName (void) const
 
bool IsIndexedInputName (const DataObjectIdentifierType &) const
 
bool IsIndexedOutputName (const DataObjectIdentifierType &) const
 
bool IsRequiredInputName (const DataObjectIdentifierType &) const
 
 itkLegacyMacro (virtual void RemoveInput(DataObject *input))
 
 itkLegacyMacro (void SetNumberOfInputs(DataObjectPointerArraySizeType num))
 
 itkLegacyMacro (virtual void RemoveOutput(DataObject *output))
 
 itkLegacyMacro (void SetNumberOfOutputs(DataObjectPointerArraySizeType num))
 
DataObjectPointerArraySizeType MakeIndexFromInputName (const DataObjectIdentifierType &name) const
 
DataObjectPointerArraySizeType MakeIndexFromOutputName (const DataObjectIdentifierType &name) const
 
DataObjectIdentifierType MakeNameFromInputIndex (DataObjectPointerArraySizeType idx) const
 
DataObjectIdentifierType MakeNameFromOutputIndex (DataObjectPointerArraySizeType idx) const
 
virtual void PopBackInput ()
 
virtual void PopFrontInput ()
 
virtual void PrintSelf (std::ostream &os, Indent indent) const override
 
 ProcessObject ()
 
virtual void PropagateResetPipeline ()
 
virtual void PushBackInput (const DataObject *input)
 
virtual void PushFrontInput (const DataObject *input)
 
virtual void ReleaseInputs ()
 
virtual void RemoveInput (const DataObjectIdentifierType &key)
 
virtual void RemoveInput (DataObjectPointerArraySizeType)
 
virtual void RemoveOutput (const DataObjectIdentifierType &key)
 
virtual void RemoveOutput (DataObjectPointerArraySizeType idx)
 
bool RemoveRequiredInputName (const DataObjectIdentifierType &)
 
virtual void RestoreInputReleaseDataFlags ()
 
virtual void SetInput (const DataObjectIdentifierType &key, DataObject *input)
 
virtual void SetNthInput (DataObjectPointerArraySizeType num, DataObject *input)
 
virtual void SetNthOutput (DataObjectPointerArraySizeType num, DataObject *output)
 
void SetNumberOfIndexedInputs (DataObjectPointerArraySizeType num)
 
void SetNumberOfIndexedOutputs (DataObjectPointerArraySizeType num)
 
virtual void SetNumberOfRequiredInputs (DataObjectPointerArraySizeType)
 
virtual void SetNumberOfRequiredOutputs (DataObjectPointerArraySizeType _arg)
 
virtual void SetOutput (const DataObjectIdentifierType &key, DataObject *output)
 
virtual void SetPrimaryInput (DataObject *input)
 
virtual void SetPrimaryInputName (const DataObjectIdentifierType &key)
 
virtual void SetPrimaryOutput (DataObject *output)
 
virtual void SetPrimaryOutputName (const DataObjectIdentifierType &key)
 
void SetRequiredInputNames (const NameArray &)
 
virtual void VerifyInputInformation ()
 
virtual void VerifyPreconditions ()
 
 ~ProcessObject ()
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
virtual ~Object ()
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Private Member Functions

 LabelImageToOGRDataSourceFilter (const Self &)=delete
 
void operator= (const Self &)=delete
 

Private Attributes

std::string m_FieldName
 
bool m_Use8Connected
 

Additional Inherited Members

- Protected Attributes inherited from itk::ProcessObject
TimeStamp m_OutputInformationMTime
 
bool m_Updating
 
- Protected Attributes inherited from itk::LightObject
AtomicInt< int > m_ReferenceCount
 

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

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

Definition at line 57 of file otbLabelImageToOGRDataSourceFilter.h.

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

DataObject pointer

Definition at line 130 of file otbLabelImageToOGRDataSourceFilter.h.

Definition at line 79 of file otbLabelImageToOGRDataSourceFilter.h.

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

Definition at line 73 of file otbLabelImageToOGRDataSourceFilter.h.

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

Definition of the input image

Definition at line 63 of file otbLabelImageToOGRDataSourceFilter.h.

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

Definition at line 68 of file otbLabelImageToOGRDataSourceFilter.h.

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

Definition at line 67 of file otbLabelImageToOGRDataSourceFilter.h.

Definition at line 76 of file otbLabelImageToOGRDataSourceFilter.h.

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

Definition at line 75 of file otbLabelImageToOGRDataSourceFilter.h.

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

Definition at line 77 of file otbLabelImageToOGRDataSourceFilter.h.

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

Definition at line 72 of file otbLabelImageToOGRDataSourceFilter.h.

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

Definition at line 56 of file otbLabelImageToOGRDataSourceFilter.h.

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

Definition at line 70 of file otbLabelImageToOGRDataSourceFilter.h.

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

typedef for the classes standards.

Definition at line 54 of file otbLabelImageToOGRDataSourceFilter.h.

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

Definition at line 69 of file otbLabelImageToOGRDataSourceFilter.h.

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

Definition at line 71 of file otbLabelImageToOGRDataSourceFilter.h.

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

Definition at line 55 of file otbLabelImageToOGRDataSourceFilter.h.

Constructor & Destructor Documentation

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

Definition at line 39 of file otbLabelImageToOGRDataSourceFilter.hxx.

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

Definition at line 122 of file otbLabelImageToOGRDataSourceFilter.h.

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

Member Function Documentation

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

Reimplemented from itk::Object.

template<class TInputImage >
void otb::LabelImageToOGRDataSourceFilter< TInputImage >::GenerateData ( void  )
overrideprotectedvirtual
template<class TInputImage >
void otb::LabelImageToOGRDataSourceFilter< TInputImage >::GenerateInputRequestedRegion ( void  )
overrideprotectedvirtual

Reimplemented from itk::ProcessObject.

Definition at line 115 of file otbLabelImageToOGRDataSourceFilter.hxx.

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

Return the Field name in which labels have been written.

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

Definition at line 80 of file otbLabelImageToOGRDataSourceFilter.hxx.

template<class TInputImage >
const LabelImageToOGRDataSourceFilter< TInputImage >::InputImageType * otb::LabelImageToOGRDataSourceFilter< TInputImage >::GetInputMask ( void  )
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 102 of file otbLabelImageToOGRDataSourceFilter.hxx.

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

Return the name of the class.

Reimplemented from itk::ProcessObject.

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

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

Definition at line 62 of file otbLabelImageToOGRDataSourceFilter.hxx.

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

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

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

Reimplemented from itk::ProcessObject.

Definition at line 54 of file otbLabelImageToOGRDataSourceFilter.hxx.

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

Method for management of the object factory.

template<class TInputImage>
void otb::LabelImageToOGRDataSourceFilter< TInputImage >::operator= ( const Self )
privatedelete
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.

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

Definition at line 71 of file otbLabelImageToOGRDataSourceFilter.hxx.

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 93 of file otbLabelImageToOGRDataSourceFilter.hxx.

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

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

Definition at line 139 of file otbLabelImageToOGRDataSourceFilter.h.

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

Definition at line 140 of file otbLabelImageToOGRDataSourceFilter.h.


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