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

#include <otbOGRDataToClassStatisticsFilter.h>

+ Inheritance diagram for otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >:
+ Collaboration diagram for otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >:

Public Types

typedef std::map< std::string, unsigned long > ClassCountMapType
 
typedef itk::SimpleDataObjectDecorator< ClassCountMapTypeClassCountObjectType
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef itk::DataObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
 
typedef InputImageType::Pointer InputImagePointer
 
typedef TInputImage InputImageType
 
typedef itk::SmartPointer< SelfPointer
 
typedef InputImageType::PointType PointType
 
typedef std::map< unsigned long, unsigned long > PolygonSizeMapType
 
typedef itk::SimpleDataObjectDecorator< PolygonSizeMapTypePolygonSizeObjectType
 
typedef InputImageType::RegionType RegionType
 
typedef PersistentOGRDataToClassStatisticsFilter Self
 
typedef PersistentSamplingFilterBase< TInputImage, TMaskImage > Superclass
 
- Public Types inherited from otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >
typedef itk::SmartPointer< const SelfConstPointer
 
typedef TInputImage InputImageType
 
typedef TMaskImage MaskImageType
 
typedef ogr::DataSource::Pointer OGRDataPointer
 
typedef itk::SmartPointer< SelfPointer
 
typedef TInputImage::RegionType RegionType
 
typedef PersistentSamplingFilterBase Self
 
typedef PersistentImageFilter< TInputImage, TInputImage > Superclass
 
- Public Types inherited from otb::PersistentImageFilter< TInputImage, TInputImage >
typedef itk::SmartPointer< const SelfConstPointer
 
typedef TInputImage InputImageType
 
typedef TInputImage OutputImageType
 
typedef itk::SmartPointer< SelfPointer
 
typedef PersistentImageFilter Self
 
typedef itk::ImageToImageFilter< TInputImage, TInputImage > Superclass
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 
void Reset (void) override
 
void Synthetize (void) override
 
- Public Member Functions inherited from otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >
const TMaskImage * GetMask ()
 
const ogr::DataSourceGetOGRData ()
 
const std::vector< std::string > & GetOGRLayerCreationOptions ()
 
void SetMask (const TMaskImage *mask)
 
void SetOGRData (const ogr::DataSource *vector)
 
void SetOGRLayerCreationOptions (const std::vector< std::string > &options)
 
virtual void SetFieldName (std::string _arg)
 
virtual std::string GetFieldName ()
 
virtual int GetFieldIndex ()
 
virtual void SetLayerIndex (int _arg)
 
virtual int GetLayerIndex ()
 
virtual void SetOutLayerName (std::string _arg)
 
virtual std::string GetOutLayerName ()
 
- Public Member Functions inherited from otb::PersistentImageFilter< TInputImage, TInputImage >
virtual const char * GetNameOfClass () const
 

Static Public Member Functions

static Pointer New ()
 
std::vector< unsigned long > m_NbPixelsThread
 
std::vector< ClassCountMapTypem_ElmtsInClassThread
 
std::vector< PolygonSizeMapTypem_PolygonThread
 
std::vector< std::string > m_CurrentClass
 
std::vector< unsigned long > m_CurrentFID
 
const ClassCountObjectTypeGetClassCountOutput () const
 
ClassCountObjectTypeGetClassCountOutput ()
 
const PolygonSizeObjectTypeGetPolygonSizeOutput () const
 
PolygonSizeObjectTypeGetPolygonSizeOutput ()
 
itk::DataObject::Pointer MakeOutput (DataObjectPointerArraySizeType idx) override
 
 PersistentOGRDataToClassStatisticsFilter ()
 
 ~PersistentOGRDataToClassStatisticsFilter () override
 
void ProcessSample (const ogr::Feature &feature, typename TInputImage::IndexType &imgIndex, typename TInputImage::PointType &imgPoint, itk::ThreadIdType &threadid) override
 
void PrepareFeature (const ogr::Feature &feature, itk::ThreadIdType &threadid) override
 
 PersistentOGRDataToClassStatisticsFilter (const Self &)=delete
 
void operator= (const Self &)=delete
 

Additional Inherited Members

- Protected Member Functions inherited from otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >
 PersistentSamplingFilterBase ()
 
 ~PersistentSamplingFilterBase () override
 
void GenerateOutputInformation () override
 
void GenerateInputRequestedRegion () override
 
void GenerateData (void) override
 
void AllocateOutputs (void) override
 
virtual void ThreadedGenerateVectorData (const ogr::Layer &layerForThread, itk::ThreadIdType threadid)
 
void ExploreGeometry (const ogr::Feature &feature, OGRGeometry *geom, RegionType &region, itk::ThreadIdType &threadid)
 
virtual void ProcessLine (const ogr::Feature &feature, OGRLineString *line, RegionType &region, itk::ThreadIdType &threadid)
 
virtual void ProcessPolygon (const ogr::Feature &feature, OGRPolygon *polygon, RegionType &region, itk::ThreadIdType &threadid)
 
bool IsSampleInsidePolygon (OGRPolygon *poly, OGRPoint *tmpPoint)
 
bool IsSampleOnLine (OGRLineString *line, typename TInputImage::PointType &position, typename TInputImage::SpacingType &absSpacing, OGRPolygon &tmpPolygon)
 
RegionType FeatureBoundingRegion (const TInputImage *image, otb::ogr::Layer::const_iterator &featIt) const
 
virtual void DispatchInputVectors (void)
 
virtual void GatherOutputVectors (void)
 
virtual void FillOneOutput (unsigned int outIdx, ogr::DataSource *outDS, bool update)
 
virtual void InitializeOutputDataSource (ogr::DataSource *inputDS, ogr::DataSource *outputDS)
 
void ClearAdditionalFields ()
 
void CreateAdditionalField (std::string name, OGRFieldType type, int width=0, int precision=0)
 
const std::vector< SimpleFieldDefn > & GetAdditionalFields ()
 
ogr::Layer GetInMemoryInput (unsigned int threadId)
 
ogr::Layer GetInMemoryOutput (unsigned int threadId, unsigned int index=0)
 
- Protected Member Functions inherited from otb::PersistentImageFilter< TInputImage, TInputImage >
 PersistentImageFilter ()
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
 ~PersistentImageFilter () override
 
- Static Protected Member Functions inherited from otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >
static ITK_THREAD_RETURN_TYPE VectorThreaderCallback (void *arg)
 

Detailed Description

template<class TInputImage, class TMaskImage>
class otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >

Persistent filter to compute class statistics based on vectors.

Definition at line 40 of file otbOGRDataToClassStatisticsFilter.h.

Member Typedef Documentation

◆ ClassCountMapType

template<class TInputImage , class TMaskImage >
typedef std::map<std::string, unsigned long> otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::ClassCountMapType

Wrap output type as DataObject

Definition at line 56 of file otbOGRDataToClassStatisticsFilter.h.

◆ ClassCountObjectType

template<class TInputImage , class TMaskImage >
typedef itk::SimpleDataObjectDecorator<ClassCountMapType> otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::ClassCountObjectType

Definition at line 58 of file otbOGRDataToClassStatisticsFilter.h.

◆ ConstPointer

template<class TInputImage , class TMaskImage >
typedef itk::SmartPointer<const Self> otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::ConstPointer

Definition at line 48 of file otbOGRDataToClassStatisticsFilter.h.

◆ DataObjectPointerArraySizeType

template<class TInputImage , class TMaskImage >
typedef itk::DataObject::DataObjectPointerArraySizeType otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::DataObjectPointerArraySizeType

Definition at line 61 of file otbOGRDataToClassStatisticsFilter.h.

◆ InputImagePointer

template<class TInputImage , class TMaskImage >
typedef InputImageType::Pointer otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::InputImagePointer

Definition at line 51 of file otbOGRDataToClassStatisticsFilter.h.

◆ InputImageType

template<class TInputImage , class TMaskImage >
typedef TInputImage otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::InputImageType

Definition at line 50 of file otbOGRDataToClassStatisticsFilter.h.

◆ Pointer

template<class TInputImage , class TMaskImage >
typedef itk::SmartPointer<Self> otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::Pointer

Definition at line 47 of file otbOGRDataToClassStatisticsFilter.h.

◆ PointType

template<class TInputImage , class TMaskImage >
typedef InputImageType::PointType otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::PointType

Definition at line 53 of file otbOGRDataToClassStatisticsFilter.h.

◆ PolygonSizeMapType

template<class TInputImage , class TMaskImage >
typedef std::map<unsigned long, unsigned long> otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::PolygonSizeMapType

Definition at line 57 of file otbOGRDataToClassStatisticsFilter.h.

◆ PolygonSizeObjectType

template<class TInputImage , class TMaskImage >
typedef itk::SimpleDataObjectDecorator<PolygonSizeMapType> otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::PolygonSizeObjectType

Definition at line 59 of file otbOGRDataToClassStatisticsFilter.h.

◆ RegionType

template<class TInputImage , class TMaskImage >
typedef InputImageType::RegionType otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::RegionType

Definition at line 52 of file otbOGRDataToClassStatisticsFilter.h.

◆ Self

template<class TInputImage , class TMaskImage >
typedef PersistentOGRDataToClassStatisticsFilter otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::Self

Standard Self typedef

Definition at line 45 of file otbOGRDataToClassStatisticsFilter.h.

◆ Superclass

template<class TInputImage , class TMaskImage >
typedef PersistentSamplingFilterBase<TInputImage, TMaskImage> otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::Superclass

Definition at line 46 of file otbOGRDataToClassStatisticsFilter.h.

Constructor & Destructor Documentation

◆ PersistentOGRDataToClassStatisticsFilter() [1/2]

template<class TInputImage , class TMaskImage >
otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::PersistentOGRDataToClassStatisticsFilter
protected

Constructor

Definition at line 31 of file otbOGRDataToClassStatisticsFilter.hxx.

◆ ~PersistentOGRDataToClassStatisticsFilter()

template<class TInputImage , class TMaskImage >
otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::~PersistentOGRDataToClassStatisticsFilter ( )
inlineoverrideprotected

Destructor

Definition at line 94 of file otbOGRDataToClassStatisticsFilter.h.

◆ PersistentOGRDataToClassStatisticsFilter() [2/2]

template<class TInputImage , class TMaskImage >
otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::PersistentOGRDataToClassStatisticsFilter ( const Self )
privatedelete

Number of pixels in all the polygons (per thread)

Member Function Documentation

◆ CreateAnother()

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

◆ GetClassCountOutput() [1/2]

template<class TInputImage , class TMaskImage >
ClassCountObjectType* otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::GetClassCountOutput ( )

Number of pixels in all the polygons (per thread)

◆ GetClassCountOutput() [2/2]

template<class TInputImage , class TMaskImage >
PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::ClassCountObjectType * otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::GetClassCountOutput

the class count map is stored as output #2

Definition at line 101 of file otbOGRDataToClassStatisticsFilter.hxx.

◆ GetNameOfClass()

template<class TInputImage , class TMaskImage >
virtual const char* otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::GetNameOfClass ( ) const
virtual

Runtime information support.

Reimplemented from otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >.

◆ GetPolygonSizeOutput() [1/2]

template<class TInputImage , class TMaskImage >
PolygonSizeObjectType* otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::GetPolygonSizeOutput ( )

Number of pixels in all the polygons (per thread)

◆ GetPolygonSizeOutput() [2/2]

template<class TInputImage , class TMaskImage >
PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::PolygonSizeObjectType * otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::GetPolygonSizeOutput

the polygon size map is stored as output #3

Definition at line 123 of file otbOGRDataToClassStatisticsFilter.hxx.

◆ MakeOutput()

template<class TInputImage , class TMaskImage >
itk::DataObject::Pointer otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::MakeOutput ( DataObjectPointerArraySizeType  idx)
override

Make a DataObject of the correct type to be used as the specified output.

Definition at line 144 of file otbOGRDataToClassStatisticsFilter.hxx.

◆ New()

template<class TInputImage , class TMaskImage >
static Pointer otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::New ( )
static

Method for creation through the object factory.

◆ operator=()

template<class TInputImage , class TMaskImage >
void otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::operator= ( const Self )
privatedelete

Number of pixels in all the polygons (per thread)

◆ PrepareFeature()

template<class TInputImage , class TMaskImage >
void otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::PrepareFeature ( const ogr::Feature feature,
itk::ThreadIdType &  threadid 
)
overrideprotectedvirtual

Prepare temporary variables for the current feature

Reimplemented from otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >.

Definition at line 177 of file otbOGRDataToClassStatisticsFilter.hxx.

References otb::ogr::Feature::ogr().

◆ ProcessSample()

template<class TInputImage , class TMaskImage >
void otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::ProcessSample ( const ogr::Feature feature,
typename TInputImage::IndexType &  imgIndex,
typename TInputImage::PointType &  imgPoint,
itk::ThreadIdType &  threadid 
)
overrideprotectedvirtual

Implement generic method called at each candidate position

Reimplemented from otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >.

Definition at line 165 of file otbOGRDataToClassStatisticsFilter.hxx.

◆ Reset()

template<class TInputImage , class TMaskImage >
void otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::Reset ( void  )
overridevirtual

Reset method called before starting the streaming

Implements otb::PersistentImageFilter< TInputImage, TInputImage >.

Definition at line 86 of file otbOGRDataToClassStatisticsFilter.hxx.

◆ Synthetize()

template<class TInputImage , class TMaskImage >
void otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::Synthetize ( void  )
overridevirtual

Synthesize the persistent data of the filter.

Implements otb::PersistentImageFilter< TInputImage, TInputImage >.

Definition at line 40 of file otbOGRDataToClassStatisticsFilter.hxx.

References otb::ogr::Layer::begin(), and otb::ogr::DataSource::GetLayer().

Member Data Documentation

◆ m_CurrentClass

template<class TInputImage , class TMaskImage >
std::vector<std::string> otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::m_CurrentClass
private

Class name of the current feature (per thread)

Definition at line 119 of file otbOGRDataToClassStatisticsFilter.h.

◆ m_CurrentFID

template<class TInputImage , class TMaskImage >
std::vector<unsigned long> otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::m_CurrentFID
private

FID of the current feature (per thread)

Definition at line 122 of file otbOGRDataToClassStatisticsFilter.h.

◆ m_ElmtsInClassThread

template<class TInputImage , class TMaskImage >
std::vector<ClassCountMapType> otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::m_ElmtsInClassThread
private

Number of pixels in each classes (per thread)

Definition at line 113 of file otbOGRDataToClassStatisticsFilter.h.

◆ m_NbPixelsThread

template<class TInputImage , class TMaskImage >
std::vector<unsigned long> otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::m_NbPixelsThread
private

Number of pixels in all the polygons (per thread)

Definition at line 110 of file otbOGRDataToClassStatisticsFilter.h.

◆ m_PolygonThread

template<class TInputImage , class TMaskImage >
std::vector<PolygonSizeMapType> otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >::m_PolygonThread
private

Number of pixels in each polygons (per thread)

Definition at line 116 of file otbOGRDataToClassStatisticsFilter.h.


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