OTB  6.7.0
Orfeo Toolbox
Classes | Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Private Member Functions | Private Attributes | List of all members
otb::PersistentSamplingFilterBase< TInputImage, TMaskImage > Class Template Reference

#include <otbPersistentSamplingFilterBase.h>

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

Classes

struct  SimpleFieldDefn
 
struct  VectorThreadStruct
 

Public Types

typedef itk::SmartPointer
< const Self
ConstPointer
 
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 Self
ConstPointer
 
typedef TInputImage InputImageType
 
typedef TInputImage OutputImageType
 
typedef itk::SmartPointer< SelfPointer
 
typedef PersistentImageFilter Self
 
typedef
itk::ImageToImageFilter
< TInputImage, TInputImage > 
Superclass
 
- Public Types inherited from itk::ImageToImageFilter< TInputImage, TInputImage >
typedef SmartPointer< const SelfConstPointer
 
typedef
InputImageType::ConstPointer 
InputImageConstPointer
 
typedef InputImageType::PixelType InputImagePixelType
 
typedef InputImageType::Pointer InputImagePointer
 
typedef InputImageType::RegionType InputImageRegionType
 
typedef TInputImage InputImageType
 
typedef
Superclass::OutputImagePixelType 
OutputImagePixelType
 
typedef
Superclass::OutputImageRegionType 
OutputImageRegionType
 
typedef SmartPointer< SelfPointer
 
typedef ImageToImageFilter Self
 
typedef ImageSource< TInputImage > Superclass
 
- Public Types inherited from itk::ImageSource< TOutputImage >
typedef SmartPointer< const SelfConstPointer
 
typedef
Superclass::DataObjectIdentifierType 
DataObjectIdentifierType
 
typedef DataObject::Pointer DataObjectPointer
 
typedef
Superclass::DataObjectPointerArraySizeType 
DataObjectPointerArraySizeType
 
typedef OutputImageType::PixelType OutputImagePixelType
 
typedef OutputImageType::Pointer OutputImagePointer
 
typedef OutputImageType::RegionType OutputImageRegionType
 
typedef TOutputImage OutputImageType
 
typedef SmartPointer< SelfPointer
 
typedef ImageSource Self
 
typedef 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 int GetFieldIndex ()
 
const TMaskImage * GetMask ()
 
virtual const char * GetNameOfClass () const
 
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 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 void Reset (void)=0
 
virtual void Synthetize (void)=0
 
- Public Member Functions inherited from itk::ImageToImageFilter< TInputImage, TInputImage >
virtual double GetCoordinateTolerance () const
 
virtual double GetDirectionTolerance () const
 
const InputImageTypeGetInput () const
 
const InputImageTypeGetInput (unsigned int idx) const
 
virtual void PopBackInput () override
 
virtual void PopFrontInput () override
 
virtual void PushBackInput (const InputImageType *image)
 
virtual void PushFrontInput (const InputImageType *image)
 
virtual void SetCoordinateTolerance (double _arg)
 
virtual void SetDirectionTolerance (double _arg)
 
virtual void SetInput (const InputImageType *image)
 
virtual void SetInput (unsigned int, const TInputImage *image)
 
- Public Member Functions inherited from itk::ImageSource< TOutputImage >
OutputImageTypeGetOutput (unsigned int idx)
 
OutputImageTypeGetOutput ()
 
const OutputImageTypeGetOutput () const
 
virtual void GraftNthOutput (unsigned int idx, DataObject *output)
 
virtual void GraftOutput (const DataObjectIdentifierType &key, DataObject *output)
 
virtual void GraftOutput (DataObject *output)
 
virtual
ProcessObject::DataObjectPointer 
MakeOutput (ProcessObject::DataObjectPointerArraySizeType idx) override
 
virtual
ProcessObject::DataObjectPointer 
MakeOutput (const ProcessObject::DataObjectIdentifierType &) override
 
- 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 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 LightObject::Pointer CreateAnother () const override
 
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
 

Protected Member Functions

void AllocateOutputs (void) override
 
void ClearAdditionalFields ()
 
void CreateAdditionalField (std::string name, OGRFieldType type, int width=0, int precision=0)
 
virtual void DispatchInputVectors (void)
 
void ExploreGeometry (const ogr::Feature &feature, OGRGeometry *geom, RegionType &region, itk::ThreadIdType &threadid)
 
RegionType FeatureBoundingRegion (const TInputImage *image, otb::ogr::Layer::const_iterator &featIt) const
 
virtual void FillOneOutput (unsigned int outIdx, ogr::DataSource *outDS, bool update)
 
virtual void GatherOutputVectors (void)
 
void GenerateData (void) override
 
void GenerateInputRequestedRegion () override
 
void GenerateOutputInformation () override
 
const std::vector
< SimpleFieldDefn > & 
GetAdditionalFields ()
 
ogr::Layer GetInMemoryInput (unsigned int threadId)
 
ogr::Layer GetInMemoryOutput (unsigned int threadId, unsigned int index=0)
 
virtual void InitializeOutputDataSource (ogr::DataSource *inputDS, ogr::DataSource *outputDS)
 
bool IsSampleInsidePolygon (OGRPolygon *poly, OGRPoint *tmpPoint)
 
bool IsSampleOnLine (OGRLineString *line, typename TInputImage::PointType &position, typename TInputImage::SpacingType &absSpacing, OGRPolygon &tmpPolygon)
 
 PersistentSamplingFilterBase ()
 
virtual void PrepareFeature (const ogr::Feature &feature, 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)
 
virtual void ProcessSample (const ogr::Feature &feature, typename TInputImage::IndexType &imgIndex, typename TInputImage::PointType &imgPoint, itk::ThreadIdType &threadid)
 
virtual void ThreadedGenerateVectorData (const ogr::Layer &layerForThread, itk::ThreadIdType threadid)
 
 ~PersistentSamplingFilterBase () override
 
- Protected Member Functions inherited from otb::PersistentImageFilter< TInputImage, TInputImage >
 PersistentImageFilter ()
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
 ~PersistentImageFilter () override
 
- Protected Member Functions inherited from itk::ImageToImageFilter< TInputImage, TInputImage >
virtual void CallCopyInputRegionToOutputRegion (OutputImageRegionType &destRegion, const InputImageRegionType &srcRegion)
 
virtual void CallCopyOutputRegionToInputRegion (InputImageRegionType &destRegion, const OutputImageRegionType &srcRegion)
 
 ImageToImageFilter ()
 
void PushBackInput (const DataObject *input) override
 
void PushFrontInput (const DataObject *input) override
 
virtual void VerifyInputInformation () override
 
 ~ImageToImageFilter ()
 
- Protected Member Functions inherited from itk::ImageSource< TOutputImage >
virtual void AfterThreadedGenerateData ()
 
virtual void BeforeThreadedGenerateData ()
 
virtual const
ImageRegionSplitterBase
GetImageRegionSplitter () const
 
 ImageSource ()
 
virtual unsigned int SplitRequestedRegion (unsigned int i, unsigned int pieces, OutputImageRegionType &splitRegion)
 
virtual void ThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId)
 
virtual ~ImageSource ()
 
- 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 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
 
 ProcessObject ()
 
virtual void PropagateResetPipeline ()
 
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 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 ()
 

Static Protected Member Functions

static ITK_THREAD_RETURN_TYPE VectorThreaderCallback (void *arg)
 
- Static Protected Member Functions inherited from itk::ImageSource< TOutputImage >
static const
ImageRegionSplitterBase
GetGlobalDefaultSplitter ()
 
static ITK_THREAD_RETURN_TYPE ThreaderCallback (void *arg)
 

Private Member Functions

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

Private Attributes

std::vector< SimpleFieldDefnm_AdditionalFields
 
int m_FieldIndex
 
std::string m_FieldName
 
std::vector< OGRDataPointerm_InMemoryInputs
 
std::vector< std::vector
< OGRDataPointer > > 
m_InMemoryOutputs
 
int m_LayerIndex
 
std::vector< std::string > m_OGRLayerCreationOptions
 
std::string m_OutLayerName
 

Additional Inherited Members

- 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 ()
 
- Static Public Attributes inherited from itk::ImageToImageFilter< TInputImage, TInputImage >
static const unsigned int InputImageDimension
 
static const unsigned int OutputImageDimension
 
- Static Public Attributes inherited from itk::ImageSource< TOutputImage >
static const unsigned int OutputImageDimension
 
- Protected Types inherited from itk::ImageToImageFilter< TInputImage, TInputImage >
typedef
ImageToImageFilterDetail::ImageRegionCopier
< itkGetStaticConstMacro(OutputImageDimension),
itkGetStaticConstMacro(InputImageDimension) > 
InputToOutputRegionCopierType
 
typedef
ImageToImageFilterDetail::ImageRegionCopier
< itkGetStaticConstMacro(InputImageDimension),
itkGetStaticConstMacro(OutputImageDimension) > 
OutputToInputRegionCopierType
 
- 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 TMaskImage = otb::Image<unsigned char,2>>
class otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >

Base class for persistent filter doing sampling tasks.

Note
This class contains pure virtual method, and can not be instantiated.
See Also
PersistentOGRDataToClassStatisticsFilter
PersistentOGRDataToSamplePositionFilter

Definition at line 42 of file otbPersistentSamplingFilterBase.h.

Member Typedef Documentation

template<class TInputImage, class TMaskImage = otb::Image<unsigned char,2>>
typedef itk::SmartPointer<const Self> otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::ConstPointer

Definition at line 50 of file otbPersistentSamplingFilterBase.h.

template<class TInputImage, class TMaskImage = otb::Image<unsigned char,2>>
typedef TInputImage otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::InputImageType

Template parameters typedefs

Definition at line 53 of file otbPersistentSamplingFilterBase.h.

template<class TInputImage, class TMaskImage = otb::Image<unsigned char,2>>
typedef TMaskImage otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::MaskImageType

Definition at line 57 of file otbPersistentSamplingFilterBase.h.

template<class TInputImage, class TMaskImage = otb::Image<unsigned char,2>>
typedef ogr::DataSource::Pointer otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::OGRDataPointer

Definition at line 61 of file otbPersistentSamplingFilterBase.h.

template<class TInputImage, class TMaskImage = otb::Image<unsigned char,2>>
typedef itk::SmartPointer<Self> otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::Pointer

Definition at line 49 of file otbPersistentSamplingFilterBase.h.

template<class TInputImage, class TMaskImage = otb::Image<unsigned char,2>>
typedef TInputImage::RegionType otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::RegionType

Definition at line 59 of file otbPersistentSamplingFilterBase.h.

template<class TInputImage, class TMaskImage = otb::Image<unsigned char,2>>
typedef PersistentSamplingFilterBase otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::Self

Standard typedefs

Definition at line 47 of file otbPersistentSamplingFilterBase.h.

template<class TInputImage, class TMaskImage = otb::Image<unsigned char,2>>
typedef PersistentImageFilter<TInputImage, TInputImage> otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::Superclass

Definition at line 48 of file otbPersistentSamplingFilterBase.h.

Constructor & Destructor Documentation

template<class TInputImage , class TMaskImage >
otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::PersistentSamplingFilterBase ( )
protected

Constructor

Definition at line 37 of file otbPersistentSamplingFilterBase.hxx.

template<class TInputImage, class TMaskImage = otb::Image<unsigned char,2>>
otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::~PersistentSamplingFilterBase ( )
inlineoverrideprotected

Destructor

Definition at line 105 of file otbPersistentSamplingFilterBase.h.

template<class TInputImage, class TMaskImage = otb::Image<unsigned char,2>>
otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::PersistentSamplingFilterBase ( const Self )
privatedelete

Member Function Documentation

template<class TInputImage , class TMaskImage >
void otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::AllocateOutputs ( void  )
overrideprotectedvirtual
template<class TInputImage , class TMaskImage >
void otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::ClearAdditionalFields ( )
protected

Clear current additional fields

Definition at line 849 of file otbPersistentSamplingFilterBase.hxx.

template<class TInputImage , class TMaskImage >
void otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::CreateAdditionalField ( std::string  name,
OGRFieldType  type,
int  width = 0,
int  precision = 0 
)
protected
template<class TInputImage , class TMaskImage >
void otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::DispatchInputVectors ( void  )
protectedvirtual
template<class TInputImage , class TMaskImage >
void otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::ExploreGeometry ( const ogr::Feature feature,
OGRGeometry *  geom,
RegionType region,
itk::ThreadIdType threadid 
)
protected

Process a geometry, recursive method when the geometry is a collection

Definition at line 388 of file otbPersistentSamplingFilterBase.hxx.

References otbWarningMacro.

template<class TInputImage, class TMaskImage >
PersistentSamplingFilterBase< TInputImage, TMaskImage >::RegionType otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::FeatureBoundingRegion ( const TInputImage *  image,
otb::ogr::Layer::const_iterator featIt 
) const
protected

Get the region bounding a set of features

Definition at line 662 of file otbPersistentSamplingFilterBase.hxx.

template<class TInputImage , class TMaskImage >
void otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::FillOneOutput ( unsigned int  outIdx,
ogr::DataSource outDS,
bool  update 
)
protectedvirtual
template<class TInputImage , class TMaskImage >
void otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::GatherOutputVectors ( void  )
protectedvirtual

Gather the content of in-memory output layer into the filter outputs

Definition at line 278 of file otbPersistentSamplingFilterBase.hxx.

References otb::Stopwatch::GetElapsedMilliseconds(), itk::ProcessObject::GetOutput(), otbMsgDebugMacro, otb::Stopwatch::StartNew(), and otb::Stopwatch::Stop().

template<class TInputImage , class TMaskImage >
void otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::GenerateData ( void  )
overrideprotectedvirtual
template<class TInputImage , class TMaskImage >
void otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::GenerateInputRequestedRegion ( void  )
overrideprotectedvirtual

Use an empty region to input image (pixel values not needed) and set the requested region for the mask

Reimplemented from itk::ImageToImageFilter< TInputImage, TInputImage >.

Definition at line 148 of file otbPersistentSamplingFilterBase.hxx.

template<class TInputImage , class TMaskImage >
void otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::GenerateOutputInformation ( void  )
overrideprotectedvirtual

Use the same output information as input image, check the field index and the mask footprint

Reimplemented from itk::ProcessObject.

Definition at line 111 of file otbPersistentSamplingFilterBase.hxx.

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

template<class TInputImage , class TMaskImage >
const std::vector< typename PersistentSamplingFilterBase< TInputImage, TMaskImage >::SimpleFieldDefn > & otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::GetAdditionalFields ( )
protected

Get a reference over the additional fields

Definition at line 875 of file otbPersistentSamplingFilterBase.hxx.

template<class TInputImage, class TMaskImage = otb::Image<unsigned char,2>>
virtual int otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::GetFieldIndex ( )
virtual

Get macro for the field index (deduced from the field name)

template<class TInputImage, class TMaskImage = otb::Image<unsigned char,2>>
virtual std::string otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::GetFieldName ( )
virtual

Set/Get macro for the field name containing class names in the input vectors.

template<class TInputImage , class TMaskImage >
ogr::Layer otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::GetInMemoryInput ( unsigned int  threadId)
protected

Give access to in-memory input layers

Definition at line 903 of file otbPersistentSamplingFilterBase.hxx.

template<class TInputImage , class TMaskImage >
ogr::Layer otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::GetInMemoryOutput ( unsigned int  threadId,
unsigned int  index = 0 
)
protected

Give access to in-memory output layers

Definition at line 915 of file otbPersistentSamplingFilterBase.hxx.

template<class TInputImage, class TMaskImage = otb::Image<unsigned char,2>>
virtual int otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::GetLayerIndex ( )
virtual

Set/Get macro for the layer index containing the sampling areas

template<class TInputImage , class TMaskImage >
const TMaskImage * otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::GetMask ( )

Get the input mask (may be null)

Definition at line 82 of file otbPersistentSamplingFilterBase.hxx.

References itk::ProcessObject::GetInput().

template<class TInputImage, class TMaskImage = otb::Image<unsigned char,2>>
virtual const char* otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::GetNameOfClass ( ) const
virtual
template<class TInputImage , class TMaskImage >
const otb::ogr::DataSource * otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::GetOGRData ( )

Get the input OGRDataSource with sampling regions

Definition at line 62 of file otbPersistentSamplingFilterBase.hxx.

References itk::ProcessObject::GetInput().

template<class TInputImage , class TMaskImage >
const std::vector< std::string > & otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::GetOGRLayerCreationOptions ( void  )

Get the OGR layer creation options

Definition at line 103 of file otbPersistentSamplingFilterBase.hxx.

template<class TInputImage, class TMaskImage = otb::Image<unsigned char,2>>
virtual std::string otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::GetOutLayerName ( )
virtual

Set/Get macro for the layer name

template<class TInputImage , class TMaskImage >
void otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::InitializeOutputDataSource ( ogr::DataSource inputDS,
ogr::DataSource outputDS 
)
protectedvirtual
template<class TInputImage , class TMaskImage >
bool otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::IsSampleInsidePolygon ( OGRPolygon *  poly,
OGRPoint *  tmpPoint 
)
inlineprotected

Common function to test if a point is inside a polygon

Definition at line 610 of file otbPersistentSamplingFilterBase.hxx.

template<class TInputImage, class TMaskImage >
bool otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::IsSampleOnLine ( OGRLineString *  line,
typename TInputImage::PointType &  position,
typename TInputImage::SpacingType &  absSpacing,
OGRPolygon &  tmpPolygon 
)
inlineprotected

Common function to test if a pixel crosses the line

Definition at line 631 of file otbPersistentSamplingFilterBase.hxx.

template<class TInputImage, class TMaskImage = otb::Image<unsigned char,2>>
void otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::operator= ( const Self )
privatedelete
template<class TInputImage , class TMaskImage >
void otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::PrepareFeature ( const ogr::Feature feature,
itk::ThreadIdType threadid 
)
protectedvirtual

Generic method called once before processing each feature

Reimplemented in otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >.

Definition at line 601 of file otbPersistentSamplingFilterBase.hxx.

template<class TInputImage , class TMaskImage >
void otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::ProcessLine ( const ogr::Feature feature,
OGRLineString *  line,
RegionType region,
itk::ThreadIdType threadid 
)
protectedvirtual

Process a line string : use pixels that cross the line

Definition at line 470 of file otbPersistentSamplingFilterBase.hxx.

template<class TInputImage , class TMaskImage >
void otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::ProcessPolygon ( const ogr::Feature feature,
OGRPolygon *  polygon,
RegionType region,
itk::ThreadIdType threadid 
)
protectedvirtual

Process a polygon : use pixels inside the polygon

Definition at line 533 of file otbPersistentSamplingFilterBase.hxx.

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

Generic method called for each matching pixel position (NOT IMPLEMENTED)

Reimplemented in otb::PersistentOGRDataToSamplePositionFilter< TInputImage, TMaskImage, TSampler >, and otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >.

Definition at line 590 of file otbPersistentSamplingFilterBase.hxx.

template<class TInputImage, class TMaskImage = otb::Image<unsigned char,2>>
virtual void otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::SetFieldName ( std::string  _arg)
virtual

Set/Get macro for the field name containing class names in the input vectors.

template<class TInputImage, class TMaskImage = otb::Image<unsigned char,2>>
virtual void otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::SetLayerIndex ( int  _arg)
virtual

Set/Get macro for the layer index containing the sampling areas

template<class TInputImage , class TMaskImage>
void otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::SetMask ( const TMaskImage *  mask)

Set an input mask (optional)

Definition at line 74 of file otbPersistentSamplingFilterBase.hxx.

template<class TInputImage , class TMaskImage >
void otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::SetOGRData ( const ogr::DataSource vector)

Set the input OGRDataSource that contains sampling areas for each class

Definition at line 54 of file otbPersistentSamplingFilterBase.hxx.

template<class TInputImage , class TMaskImage >
void otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::SetOGRLayerCreationOptions ( const std::vector< std::string > &  options)

Set the OGR layer creation options

Definition at line 94 of file otbPersistentSamplingFilterBase.hxx.

template<class TInputImage, class TMaskImage = otb::Image<unsigned char,2>>
virtual void otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::SetOutLayerName ( std::string  _arg)
virtual

Set/Get macro for the layer name

template<class TInputImage , class TMaskImage >
void otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::ThreadedGenerateVectorData ( const ogr::Layer layerForThread,
itk::ThreadIdType  threadid 
)
protectedvirtual
template<class TInputImage , class TMaskImage >
ITK_THREAD_RETURN_TYPE otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::VectorThreaderCallback ( void *  arg)
staticprotected

Callback function to launch VectorThreadedGenerateData in each thread

Definition at line 883 of file otbPersistentSamplingFilterBase.hxx.

References otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::VectorThreadStruct::Filter, and ITK_THREAD_RETURN_VALUE.

Member Data Documentation

template<class TInputImage, class TMaskImage = otb::Image<unsigned char,2>>
std::vector<SimpleFieldDefn> otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::m_AdditionalFields
private

Additional field definitions to add in output data sources

Definition at line 233 of file otbPersistentSamplingFilterBase.h.

template<class TInputImage, class TMaskImage = otb::Image<unsigned char,2>>
int otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::m_FieldIndex
private

Field index corresponding to the field name m_FieldName

Definition at line 221 of file otbPersistentSamplingFilterBase.h.

template<class TInputImage, class TMaskImage = otb::Image<unsigned char,2>>
std::string otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::m_FieldName
private

Field name containing the class name

Definition at line 218 of file otbPersistentSamplingFilterBase.h.

template<class TInputImage, class TMaskImage = otb::Image<unsigned char,2>>
std::vector<OGRDataPointer> otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::m_InMemoryInputs
private

In-memory containers storing input geometries for each thread

Definition at line 236 of file otbPersistentSamplingFilterBase.h.

template<class TInputImage, class TMaskImage = otb::Image<unsigned char,2>>
std::vector<std::vector<OGRDataPointer> > otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::m_InMemoryOutputs
private

In-memory containers storing position during iteration loop

Definition at line 239 of file otbPersistentSamplingFilterBase.h.

template<class TInputImage, class TMaskImage = otb::Image<unsigned char,2>>
int otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::m_LayerIndex
private

Layer to use in the input vector file, default to 0

Definition at line 224 of file otbPersistentSamplingFilterBase.h.

template<class TInputImage, class TMaskImage = otb::Image<unsigned char,2>>
std::vector<std::string> otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::m_OGRLayerCreationOptions
private

Creation option for output layers

Definition at line 230 of file otbPersistentSamplingFilterBase.h.

template<class TInputImage, class TMaskImage = otb::Image<unsigned char,2>>
std::string otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::m_OutLayerName
private

name of the output layers

Definition at line 227 of file otbPersistentSamplingFilterBase.h.


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