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

#include <otbOGRDataSourceToLabelImageFilter.h>

+ Inheritance diagram for otb::OGRDataSourceToLabelImageFilter< TOutputImage >:
+ Collaboration diagram for otb::OGRDataSourceToLabelImageFilter< TOutputImage >:

Public Types

typedef itk::SmartPointer< const SelfConstPointer
 
typedef itk::ImageBase< OutputImageType::ImageDimension > ImageBaseType
 
typedef OGRDataSourceType::Pointer OGRDataSourcePointerType
 
typedef ogr::DataSource OGRDataSourceType
 
typedef ogr::Layer OGRLayerType
 
typedef OutputImageType::InternalPixelType OutputImageInternalPixelType
 
typedef OutputImageType::PixelType OutputImagePixelType
 
typedef OutputImageType::Pointer OutputImagePointer
 
typedef OutputImageType::RegionType OutputImageRegionType
 
typedef TOutputImage OutputImageType
 
typedef OutputImageType::IndexType OutputIndexType
 
typedef OutputImageType::PointType OutputOriginType
 
typedef OutputImageType::SizeType OutputSizeType
 
typedef OutputImageType::SpacingType OutputSpacingType
 
typedef itk::SmartPointer< SelfPointer
 
typedef OGRDataSourceToLabelImageFilter Self
 
typedef itk::ImageSource< TOutputImage > Superclass
 

Public Member Functions

virtual void AddOGRDataSource (const OGRDataSourceType *ds)
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
const OGRDataSourceTypeGetInput (unsigned int idx)
 
virtual const char * GetNameOfClass () const
 
virtual const OutputSizeTypeGetOutputSize () const
 
virtual void SetOutputSize (OutputSizeType _arg)
 

Static Public Member Functions

static Pointer New ()
 
std::vector< OGRLayerH > m_SrcDataSetLayers
 
std::vector< int > m_BandsToBurn
 
std::string m_BurnAttribute
 
std::string m_OutputProjectionRef
 
OutputSpacingType m_OutputSpacing
 
OutputOriginType m_OutputOrigin
 
OutputSizeType m_OutputSize
 
OutputIndexType m_OutputStartIndex
 
OutputImageInternalPixelType m_BackgroundValue
 
OutputImageInternalPixelType m_ForegroundValue
 
bool m_BurnAttributeMode
 
bool m_AllTouchedMode
 
virtual void SetOutputOrigin (OutputOriginType _arg)
 
virtual void SetOutputOrigin (const double origin[2])
 
virtual void SetOutputOrigin (const float origin[2])
 
virtual const OutputOriginTypeGetOutputOrigin () const
 
virtual void SetOutputSpacing (const OutputSpacingType &spacing)
 
virtual void SetOutputSpacing (const double spacing[2])
 
virtual void SetOutputSpacing (const float spacing[2])
 
virtual void SetOutputProjectionRef (const char *_arg)
 
virtual const char * GetOutputProjectionRef () const
 
virtual void SetBurnAttribute (const char *_arg)
 
virtual const char * GetBurnAttribute () const
 
virtual void SetBackgroundValue (OutputImageInternalPixelType _arg)
 
virtual const OutputImageInternalPixelTypeGetBackgroundValue () const
 
virtual void SetForegroundValue (OutputImageInternalPixelType _arg)
 
virtual const OutputImageInternalPixelTypeGetForegroundValue () const
 
virtual void SetBurnAttributeMode (bool _arg)
 
virtual const bool & GetBurnAttributeMode () const
 
virtual void BurnAttributeModeOn ()
 
virtual void BurnAttributeModeOff ()
 
virtual void SetAllTouchedMode (bool _arg)
 
virtual const bool & GetAllTouchedMode () const
 
virtual void AllTouchedModeOn ()
 
virtual void AllTouchedModeOff ()
 
template<class ImagePointerType >
void SetOutputParametersFromImage (const ImagePointerType image)
 
void GenerateData () override
 
 OGRDataSourceToLabelImageFilter ()
 
 ~OGRDataSourceToLabelImageFilter () override=default
 
void GenerateOutputInformation () override
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
 OGRDataSourceToLabelImageFilter (const Self &)=delete
 
void operator= (const Self &)=delete
 

Detailed Description

template<class TOutputImage>
class otb::OGRDataSourceToLabelImageFilter< TOutputImage >

Burn geometries from the specified VectorData into raster.

This class handles burning several input OGRDataSource into the output raster. It has two different modes:

Please note that the background value is also used in BurnAttributeModeOn() to fill areas where there are no geometries.

Setting the output raster information can be done in two ways by:

Definition at line 59 of file otbOGRDataSourceToLabelImageFilter.h.

Member Typedef Documentation

◆ ConstPointer

template<class TOutputImage >
typedef itk::SmartPointer<const Self> otb::OGRDataSourceToLabelImageFilter< TOutputImage >::ConstPointer

Definition at line 66 of file otbOGRDataSourceToLabelImageFilter.h.

◆ ImageBaseType

template<class TOutputImage >
typedef itk::ImageBase<OutputImageType::ImageDimension> otb::OGRDataSourceToLabelImageFilter< TOutputImage >::ImageBaseType

Definition at line 89 of file otbOGRDataSourceToLabelImageFilter.h.

◆ OGRDataSourcePointerType

template<class TOutputImage >
typedef OGRDataSourceType::Pointer otb::OGRDataSourceToLabelImageFilter< TOutputImage >::OGRDataSourcePointerType

Definition at line 86 of file otbOGRDataSourceToLabelImageFilter.h.

◆ OGRDataSourceType

template<class TOutputImage >
typedef ogr::DataSource otb::OGRDataSourceToLabelImageFilter< TOutputImage >::OGRDataSourceType

VectorData typedefs

Definition at line 85 of file otbOGRDataSourceToLabelImageFilter.h.

◆ OGRLayerType

template<class TOutputImage >
typedef ogr::Layer otb::OGRDataSourceToLabelImageFilter< TOutputImage >::OGRLayerType

Definition at line 87 of file otbOGRDataSourceToLabelImageFilter.h.

◆ OutputImageInternalPixelType

template<class TOutputImage >
typedef OutputImageType::InternalPixelType otb::OGRDataSourceToLabelImageFilter< TOutputImage >::OutputImageInternalPixelType

Definition at line 82 of file otbOGRDataSourceToLabelImageFilter.h.

◆ OutputImagePixelType

template<class TOutputImage >
typedef OutputImageType::PixelType otb::OGRDataSourceToLabelImageFilter< TOutputImage >::OutputImagePixelType

Definition at line 81 of file otbOGRDataSourceToLabelImageFilter.h.

◆ OutputImagePointer

template<class TOutputImage >
typedef OutputImageType::Pointer otb::OGRDataSourceToLabelImageFilter< TOutputImage >::OutputImagePointer

Definition at line 75 of file otbOGRDataSourceToLabelImageFilter.h.

◆ OutputImageRegionType

template<class TOutputImage >
typedef OutputImageType::RegionType otb::OGRDataSourceToLabelImageFilter< TOutputImage >::OutputImageRegionType

Definition at line 80 of file otbOGRDataSourceToLabelImageFilter.h.

◆ OutputImageType

template<class TOutputImage >
typedef TOutputImage otb::OGRDataSourceToLabelImageFilter< TOutputImage >::OutputImageType

Definition at line 72 of file otbOGRDataSourceToLabelImageFilter.h.

◆ OutputIndexType

template<class TOutputImage >
typedef OutputImageType::IndexType otb::OGRDataSourceToLabelImageFilter< TOutputImage >::OutputIndexType

Definition at line 77 of file otbOGRDataSourceToLabelImageFilter.h.

◆ OutputOriginType

template<class TOutputImage >
typedef OutputImageType::PointType otb::OGRDataSourceToLabelImageFilter< TOutputImage >::OutputOriginType

Definition at line 79 of file otbOGRDataSourceToLabelImageFilter.h.

◆ OutputSizeType

template<class TOutputImage >
typedef OutputImageType::SizeType otb::OGRDataSourceToLabelImageFilter< TOutputImage >::OutputSizeType

Definition at line 76 of file otbOGRDataSourceToLabelImageFilter.h.

◆ OutputSpacingType

template<class TOutputImage >
typedef OutputImageType::SpacingType otb::OGRDataSourceToLabelImageFilter< TOutputImage >::OutputSpacingType

Definition at line 78 of file otbOGRDataSourceToLabelImageFilter.h.

◆ Pointer

template<class TOutputImage >
typedef itk::SmartPointer<Self> otb::OGRDataSourceToLabelImageFilter< TOutputImage >::Pointer

Definition at line 65 of file otbOGRDataSourceToLabelImageFilter.h.

◆ Self

template<class TOutputImage >
typedef OGRDataSourceToLabelImageFilter otb::OGRDataSourceToLabelImageFilter< TOutputImage >::Self

Standard class typedefs

Definition at line 63 of file otbOGRDataSourceToLabelImageFilter.h.

◆ Superclass

template<class TOutputImage >
typedef itk::ImageSource<TOutputImage> otb::OGRDataSourceToLabelImageFilter< TOutputImage >::Superclass

Definition at line 64 of file otbOGRDataSourceToLabelImageFilter.h.

Constructor & Destructor Documentation

◆ OGRDataSourceToLabelImageFilter() [1/2]

template<class TOutputImage >
otb::OGRDataSourceToLabelImageFilter< TOutputImage >::OGRDataSourceToLabelImageFilter
protected

◆ ~OGRDataSourceToLabelImageFilter()

template<class TOutputImage >
otb::OGRDataSourceToLabelImageFilter< TOutputImage >::~OGRDataSourceToLabelImageFilter ( )
overrideprotecteddefault

Set the origin of the output image.

See also
GetOrigin()

◆ OGRDataSourceToLabelImageFilter() [2/2]

template<class TOutputImage >
otb::OGRDataSourceToLabelImageFilter< TOutputImage >::OGRDataSourceToLabelImageFilter ( const Self )
privatedelete

Set the origin of the output image.

See also
GetOrigin()

Member Function Documentation

◆ AddOGRDataSource()

template<class TOutputImage >
void otb::OGRDataSourceToLabelImageFilter< TOutputImage >::AddOGRDataSource ( const OGRDataSourceType ds)
virtual

Method for adding a OGRDataSource to rasterize

Definition at line 53 of file otbOGRDataSourceToLabelImageFilter.hxx.

◆ AllTouchedModeOff()

template<class TOutputImage >
virtual void otb::OGRDataSourceToLabelImageFilter< TOutputImage >::AllTouchedModeOff ( )
virtual

Set the origin of the output image.

See also
GetOrigin()

◆ AllTouchedModeOn()

template<class TOutputImage >
virtual void otb::OGRDataSourceToLabelImageFilter< TOutputImage >::AllTouchedModeOn ( )
virtual

Set the origin of the output image.

See also
GetOrigin()

◆ BurnAttributeModeOff()

template<class TOutputImage >
virtual void otb::OGRDataSourceToLabelImageFilter< TOutputImage >::BurnAttributeModeOff ( )
virtual

Set the origin of the output image.

See also
GetOrigin()

◆ BurnAttributeModeOn()

template<class TOutputImage >
virtual void otb::OGRDataSourceToLabelImageFilter< TOutputImage >::BurnAttributeModeOn ( )
virtual

Set the origin of the output image.

See also
GetOrigin()

◆ CreateAnother()

template<class TOutputImage >
virtual::itk::LightObject::Pointer otb::OGRDataSourceToLabelImageFilter< TOutputImage >::CreateAnother ( void  ) const

◆ GenerateData()

template<class TOutputImage >
void otb::OGRDataSourceToLabelImageFilter< TOutputImage >::GenerateData
overrideprotected

Set the origin of the output image.

See also
GetOrigin()

Definition at line 160 of file otbOGRDataSourceToLabelImageFilter.hxx.

References otb::ogr::StringListConverter::to_ogr().

◆ GenerateOutputInformation()

template<class TOutputImage >
void otb::OGRDataSourceToLabelImageFilter< TOutputImage >::GenerateOutputInformation
overrideprotected

Set the origin of the output image.

See also
GetOrigin()

Definition at line 117 of file otbOGRDataSourceToLabelImageFilter.hxx.

References otb::ogr::DataSource::GetLayersCount(), and otb::WriteNoDataFlags().

◆ GetAllTouchedMode()

template<class TOutputImage >
virtual const bool& otb::OGRDataSourceToLabelImageFilter< TOutputImage >::GetAllTouchedMode ( ) const
virtual

Set the origin of the output image.

See also
GetOrigin()

◆ GetBackgroundValue()

template<class TOutputImage >
virtual const OutputImageInternalPixelType& otb::OGRDataSourceToLabelImageFilter< TOutputImage >::GetBackgroundValue ( ) const
virtual

Set the origin of the output image.

See also
GetOrigin()

◆ GetBurnAttribute()

template<class TOutputImage >
virtual const char* otb::OGRDataSourceToLabelImageFilter< TOutputImage >::GetBurnAttribute ( ) const
virtual

Set the origin of the output image.

See also
GetOrigin()

◆ GetBurnAttributeMode()

template<class TOutputImage >
virtual const bool& otb::OGRDataSourceToLabelImageFilter< TOutputImage >::GetBurnAttributeMode ( ) const
virtual

Set the origin of the output image.

See also
GetOrigin()

◆ GetForegroundValue()

template<class TOutputImage >
virtual const OutputImageInternalPixelType& otb::OGRDataSourceToLabelImageFilter< TOutputImage >::GetForegroundValue ( ) const
virtual

Set the origin of the output image.

See also
GetOrigin()

◆ GetInput()

template<class TOutputImage >
const OGRDataSourceToLabelImageFilter< TOutputImage >::OGRDataSourceType * otb::OGRDataSourceToLabelImageFilter< TOutputImage >::GetInput ( unsigned int  idx)

Get Nth input OGRDataSource

Definition at line 59 of file otbOGRDataSourceToLabelImageFilter.hxx.

◆ GetNameOfClass()

template<class TOutputImage >
virtual const char* otb::OGRDataSourceToLabelImageFilter< TOutputImage >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

◆ GetOutputOrigin()

template<class TOutputImage >
virtual const OutputOriginType& otb::OGRDataSourceToLabelImageFilter< TOutputImage >::GetOutputOrigin ( ) const
virtual

Set the origin of the output image.

See also
GetOrigin()

◆ GetOutputProjectionRef()

template<class TOutputImage >
virtual const char* otb::OGRDataSourceToLabelImageFilter< TOutputImage >::GetOutputProjectionRef ( ) const
virtual

Set the origin of the output image.

See also
GetOrigin()

◆ GetOutputSize()

template<class TOutputImage >
virtual const OutputSizeType& otb::OGRDataSourceToLabelImageFilter< TOutputImage >::GetOutputSize ( ) const
virtual

Get the size of the output image.

◆ New()

template<class TOutputImage >
static Pointer otb::OGRDataSourceToLabelImageFilter< TOutputImage >::New ( )
static

Method for creation through the object factory.

◆ operator=()

template<class TOutputImage >
void otb::OGRDataSourceToLabelImageFilter< TOutputImage >::operator= ( const Self )
privatedelete

Set the origin of the output image.

See also
GetOrigin()

◆ PrintSelf()

template<class TOutputImage >
void otb::OGRDataSourceToLabelImageFilter< TOutputImage >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotected

Set the origin of the output image.

See also
GetOrigin()

Definition at line 239 of file otbOGRDataSourceToLabelImageFilter.hxx.

◆ SetAllTouchedMode()

template<class TOutputImage >
virtual void otb::OGRDataSourceToLabelImageFilter< TOutputImage >::SetAllTouchedMode ( bool  _arg)
virtual

Set/Get the AllTouchedMode flag

◆ SetBackgroundValue()

template<class TOutputImage >
virtual void otb::OGRDataSourceToLabelImageFilter< TOutputImage >::SetBackgroundValue ( OutputImageInternalPixelType  _arg)
virtual

Set/Get the background value

◆ SetBurnAttribute()

template<class TOutputImage >
virtual void otb::OGRDataSourceToLabelImageFilter< TOutputImage >::SetBurnAttribute ( const char *  _arg)
virtual

Set the attribute field on the OGRFeature to be used as burn value in the output image

◆ SetBurnAttributeMode()

template<class TOutputImage >
virtual void otb::OGRDataSourceToLabelImageFilter< TOutputImage >::SetBurnAttributeMode ( bool  _arg)
virtual

Set/Get the BurnAttributeMode flag

◆ SetForegroundValue()

template<class TOutputImage >
virtual void otb::OGRDataSourceToLabelImageFilter< TOutputImage >::SetForegroundValue ( OutputImageInternalPixelType  _arg)
virtual

Set/Get the foreground value

◆ SetOutputOrigin() [1/3]

template<class TOutputImage >
void otb::OGRDataSourceToLabelImageFilter< TOutputImage >::SetOutputOrigin ( const double  origin[2])
virtual

Set the origin of the output image.

See also
GetOrigin()

Definition at line 91 of file otbOGRDataSourceToLabelImageFilter.hxx.

◆ SetOutputOrigin() [2/3]

template<class TOutputImage >
void otb::OGRDataSourceToLabelImageFilter< TOutputImage >::SetOutputOrigin ( const float  origin[2])
virtual

Set the origin of the output image.

See also
GetOrigin()

Definition at line 98 of file otbOGRDataSourceToLabelImageFilter.hxx.

◆ SetOutputOrigin() [3/3]

template<class TOutputImage >
virtual void otb::OGRDataSourceToLabelImageFilter< TOutputImage >::SetOutputOrigin ( OutputOriginType  _arg)
virtual

Set the origin of the output image.

See also
GetOrigin()

◆ SetOutputParametersFromImage()

template<class TOutputImage >
template<class ImagePointerType >
void otb::OGRDataSourceToLabelImageFilter< TOutputImage >::SetOutputParametersFromImage ( const ImagePointerType  image)

Useful to set the output parameters from an existing image pointer

Definition at line 108 of file otbOGRDataSourceToLabelImageFilter.hxx.

◆ SetOutputProjectionRef()

template<class TOutputImage >
virtual void otb::OGRDataSourceToLabelImageFilter< TOutputImage >::SetOutputProjectionRef ( const char *  _arg)
virtual

Set/Get Output Projection Ref

◆ SetOutputSize()

template<class TOutputImage >
virtual void otb::OGRDataSourceToLabelImageFilter< TOutputImage >::SetOutputSize ( OutputSizeType  _arg)
virtual

Set the size of the output image.

◆ SetOutputSpacing() [1/3]

template<class TOutputImage >
void otb::OGRDataSourceToLabelImageFilter< TOutputImage >::SetOutputSpacing ( const double  spacing[2])
virtual

Set the origin of the output image.

See also
GetOrigin()

Definition at line 75 of file otbOGRDataSourceToLabelImageFilter.hxx.

◆ SetOutputSpacing() [2/3]

template<class TOutputImage >
void otb::OGRDataSourceToLabelImageFilter< TOutputImage >::SetOutputSpacing ( const float  spacing[2])
virtual

Set the origin of the output image.

See also
GetOrigin()

Definition at line 82 of file otbOGRDataSourceToLabelImageFilter.hxx.

◆ SetOutputSpacing() [3/3]

template<class TOutputImage >
void otb::OGRDataSourceToLabelImageFilter< TOutputImage >::SetOutputSpacing ( const OutputSpacingType spacing)
virtual

Set the spacing (size of a pixel) of the output image.

See also
GetSignedSpacing()

Definition at line 65 of file otbOGRDataSourceToLabelImageFilter.hxx.

Member Data Documentation

◆ m_AllTouchedMode

template<class TOutputImage >
bool otb::OGRDataSourceToLabelImageFilter< TOutputImage >::m_AllTouchedMode
private

Set the origin of the output image.

See also
GetOrigin()

Definition at line 186 of file otbOGRDataSourceToLabelImageFilter.h.

◆ m_BackgroundValue

template<class TOutputImage >
OutputImageInternalPixelType otb::OGRDataSourceToLabelImageFilter< TOutputImage >::m_BackgroundValue
private

Set the origin of the output image.

See also
GetOrigin()

Definition at line 183 of file otbOGRDataSourceToLabelImageFilter.h.

◆ m_BandsToBurn

template<class TOutputImage >
std::vector<int> otb::OGRDataSourceToLabelImageFilter< TOutputImage >::m_BandsToBurn
private

Set the origin of the output image.

See also
GetOrigin()

Definition at line 172 of file otbOGRDataSourceToLabelImageFilter.h.

Referenced by otb::OGRDataSourceToLabelImageFilter< TOutputImage >::OGRDataSourceToLabelImageFilter().

◆ m_BurnAttribute

template<class TOutputImage >
std::string otb::OGRDataSourceToLabelImageFilter< TOutputImage >::m_BurnAttribute
private

Set the origin of the output image.

See also
GetOrigin()

Definition at line 175 of file otbOGRDataSourceToLabelImageFilter.h.

◆ m_BurnAttributeMode

template<class TOutputImage >
bool otb::OGRDataSourceToLabelImageFilter< TOutputImage >::m_BurnAttributeMode
private

Set the origin of the output image.

See also
GetOrigin()

Definition at line 185 of file otbOGRDataSourceToLabelImageFilter.h.

◆ m_ForegroundValue

template<class TOutputImage >
OutputImageInternalPixelType otb::OGRDataSourceToLabelImageFilter< TOutputImage >::m_ForegroundValue
private

Set the origin of the output image.

See also
GetOrigin()

Definition at line 184 of file otbOGRDataSourceToLabelImageFilter.h.

◆ m_OutputOrigin

template<class TOutputImage >
OutputOriginType otb::OGRDataSourceToLabelImageFilter< TOutputImage >::m_OutputOrigin
private

Set the origin of the output image.

See also
GetOrigin()

Definition at line 180 of file otbOGRDataSourceToLabelImageFilter.h.

◆ m_OutputProjectionRef

template<class TOutputImage >
std::string otb::OGRDataSourceToLabelImageFilter< TOutputImage >::m_OutputProjectionRef
private

Set the origin of the output image.

See also
GetOrigin()

Definition at line 178 of file otbOGRDataSourceToLabelImageFilter.h.

◆ m_OutputSize

template<class TOutputImage >
OutputSizeType otb::OGRDataSourceToLabelImageFilter< TOutputImage >::m_OutputSize
private

Set the origin of the output image.

See also
GetOrigin()

Definition at line 181 of file otbOGRDataSourceToLabelImageFilter.h.

Referenced by otb::OGRDataSourceToLabelImageFilter< TOutputImage >::OGRDataSourceToLabelImageFilter().

◆ m_OutputSpacing

template<class TOutputImage >
OutputSpacingType otb::OGRDataSourceToLabelImageFilter< TOutputImage >::m_OutputSpacing
private

Set the origin of the output image.

See also
GetOrigin()

Definition at line 179 of file otbOGRDataSourceToLabelImageFilter.h.

Referenced by otb::OGRDataSourceToLabelImageFilter< TOutputImage >::OGRDataSourceToLabelImageFilter().

◆ m_OutputStartIndex

template<class TOutputImage >
OutputIndexType otb::OGRDataSourceToLabelImageFilter< TOutputImage >::m_OutputStartIndex
private

Set the origin of the output image.

See also
GetOrigin()

Definition at line 182 of file otbOGRDataSourceToLabelImageFilter.h.

Referenced by otb::OGRDataSourceToLabelImageFilter< TOutputImage >::OGRDataSourceToLabelImageFilter().

◆ m_SrcDataSetLayers

template<class TOutputImage >
std::vector<OGRLayerH> otb::OGRDataSourceToLabelImageFilter< TOutputImage >::m_SrcDataSetLayers
private

Set the origin of the output image.

See also
GetOrigin()

Definition at line 171 of file otbOGRDataSourceToLabelImageFilter.h.


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