OTB
9.0.0
Orfeo Toolbox
|
#include <otbPersistentSamplingFilterBase.h>
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< Self > | Pointer |
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< Self > | Pointer |
typedef PersistentImageFilter | Self |
typedef itk::ImageToImageFilter< TInputImage, TInputImage > | Superclass |
Public Member Functions | |
const TMaskImage * | GetMask () |
virtual const char * | GetNameOfClass () const |
const ogr::DataSource * | GetOGRData () |
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) |
Public Member Functions inherited from otb::PersistentImageFilter< TInputImage, TInputImage > | |
virtual const char * | GetNameOfClass () const |
virtual void | Reset (void)=0 |
virtual void | Synthetize (void)=0 |
std::string | m_FieldName |
int | m_FieldIndex |
int | m_LayerIndex |
std::string | m_OutLayerName |
std::vector< std::string > | m_OGRLayerCreationOptions |
std::vector< SimpleFieldDefn > | m_AdditionalFields |
std::vector< OGRDataPointer > | m_InMemoryInputs |
std::vector< std::vector< OGRDataPointer > > | m_InMemoryOutputs |
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 () |
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 ®ion, itk::ThreadIdType &threadid) |
virtual void | ProcessLine (const ogr::Feature &feature, OGRLineString *line, RegionType ®ion, itk::ThreadIdType &threadid) |
virtual void | ProcessPolygon (const ogr::Feature &feature, OGRPolygon *polygon, RegionType ®ion, itk::ThreadIdType &threadid) |
virtual void | ProcessSample (const ogr::Feature &feature, typename TInputImage::IndexType &imgIndex, typename TInputImage::PointType &imgPoint, itk::ThreadIdType &threadid) |
virtual void | PrepareFeature (const ogr::Feature &feature, 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) |
static ITK_THREAD_RETURN_TYPE | VectorThreaderCallback (void *arg) |
PersistentSamplingFilterBase (const Self &)=delete | |
void | operator= (const Self &)=delete |
Additional Inherited Members | |
Protected Member Functions inherited from otb::PersistentImageFilter< TInputImage, TInputImage > | |
PersistentImageFilter () | |
void | PrintSelf (std::ostream &os, itk::Indent indent) const override |
~PersistentImageFilter () override | |
Base class for persistent filter doing sampling tasks.
Definition at line 42 of file otbPersistentSamplingFilterBase.h.
typedef itk::SmartPointer<const Self> otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::ConstPointer |
Definition at line 49 of file otbPersistentSamplingFilterBase.h.
typedef TInputImage otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::InputImageType |
Template parameters typedefs
Definition at line 52 of file otbPersistentSamplingFilterBase.h.
typedef TMaskImage otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::MaskImageType |
Definition at line 56 of file otbPersistentSamplingFilterBase.h.
typedef ogr::DataSource::Pointer otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::OGRDataPointer |
Definition at line 60 of file otbPersistentSamplingFilterBase.h.
typedef itk::SmartPointer<Self> otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::Pointer |
Definition at line 48 of file otbPersistentSamplingFilterBase.h.
typedef TInputImage::RegionType otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::RegionType |
Definition at line 58 of file otbPersistentSamplingFilterBase.h.
typedef PersistentSamplingFilterBase otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::Self |
Standard typedefs
Definition at line 46 of file otbPersistentSamplingFilterBase.h.
typedef PersistentImageFilter<TInputImage, TInputImage> otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::Superclass |
Definition at line 47 of file otbPersistentSamplingFilterBase.h.
|
protected |
Constructor
Definition at line 36 of file otbPersistentSamplingFilterBase.hxx.
|
inlineoverrideprotected |
Destructor
Definition at line 104 of file otbPersistentSamplingFilterBase.h.
|
privatedelete |
Field name containing the class name
|
overrideprotected |
Allocate in-memory layers for input and outputs
Definition at line 177 of file otbPersistentSamplingFilterBase.hxx.
|
protected |
Clear current additional fields
Definition at line 757 of file otbPersistentSamplingFilterBase.hxx.
|
protected |
Create a new additional field
Definition at line 763 of file otbPersistentSamplingFilterBase.hxx.
|
protectedvirtual |
Method to split the input OGRDataSource between several containers for each thread. Default is to put the same number of features for each thread.
Reimplemented in otb::PersistentOGRDataToSamplePositionFilter< TInputImage, TMaskImage, TSampler >.
Definition at line 619 of file otbPersistentSamplingFilterBase.hxx.
|
protected |
Process a geometry, recursive method when the geometry is a collection
Definition at line 348 of file otbPersistentSamplingFilterBase.hxx.
|
protected |
Get the region bounding a set of features
Definition at line 580 of file otbPersistentSamplingFilterBase.hxx.
|
protectedvirtual |
Fill output vectors for a particular output
Reimplemented in otb::PersistentOGRDataToSamplePositionFilter< TInputImage, TMaskImage, TSampler >.
Definition at line 272 of file otbPersistentSamplingFilterBase.hxx.
|
protectedvirtual |
Gather the content of in-memory output layer into the filter outputs
Definition at line 247 of file otbPersistentSamplingFilterBase.hxx.
|
overrideprotected |
Generate data should thread over
Definition at line 149 of file otbPersistentSamplingFilterBase.hxx.
|
overrideprotected |
Use an empty region to input image (pixel values not needed) and set the requested region for the mask
Definition at line 130 of file otbPersistentSamplingFilterBase.hxx.
|
overrideprotected |
Use the same output information as input image, check the field index and the mask footprint
Definition at line 96 of file otbPersistentSamplingFilterBase.hxx.
|
protected |
Get a reference over the additional fields
Definition at line 775 of file otbPersistentSamplingFilterBase.hxx.
|
virtual |
Get macro for the field index (deduced from the field name)
|
virtual |
Field name containing the class name
|
protected |
Give access to in-memory input layers
Definition at line 799 of file otbPersistentSamplingFilterBase.hxx.
|
protected |
Give access to in-memory output layers
Definition at line 809 of file otbPersistentSamplingFilterBase.hxx.
|
virtual |
Field name containing the class name
const TMaskImage * otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::GetMask |
Get the input mask (may be null)
Definition at line 73 of file otbPersistentSamplingFilterBase.hxx.
|
virtual |
Creation through object factory macro
Reimplemented in otb::PersistentOGRDataToSamplePositionFilter< TInputImage, TMaskImage, TSampler >, and otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >.
const otb::ogr::DataSource * otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::GetOGRData |
Get the input OGRDataSource with sampling regions
Definition at line 57 of file otbPersistentSamplingFilterBase.hxx.
const std::vector< std::string > & otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::GetOGRLayerCreationOptions |
Get the OGR layer creation options
Definition at line 90 of file otbPersistentSamplingFilterBase.hxx.
|
virtual |
Field name containing the class name
|
protectedvirtual |
Utility method to add new fields on an output layer
Definition at line 682 of file otbPersistentSamplingFilterBase.hxx.
|
inlineprotected |
Common function to test if a point is inside a polygon
Definition at line 549 of file otbPersistentSamplingFilterBase.hxx.
|
inlineprotected |
Common function to test if a pixel crosses the line
Definition at line 567 of file otbPersistentSamplingFilterBase.hxx.
|
privatedelete |
Field name containing the class name
|
protectedvirtual |
Generic method called once before processing each feature
Reimplemented in otb::PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage >.
Definition at line 543 of file otbPersistentSamplingFilterBase.hxx.
|
protectedvirtual |
Process a line string : use pixels that cross the line
Definition at line 426 of file otbPersistentSamplingFilterBase.hxx.
|
protectedvirtual |
Process a polygon : use pixels inside the polygon
Definition at line 485 of file otbPersistentSamplingFilterBase.hxx.
|
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 536 of file otbPersistentSamplingFilterBase.hxx.
|
virtual |
Set/Get macro for the field name containing class names in the input vectors.
|
virtual |
Set/Get macro for the layer index containing the sampling areas
void otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::SetMask | ( | const TMaskImage * | mask | ) |
Set an input mask (optional)
Definition at line 67 of file otbPersistentSamplingFilterBase.hxx.
void otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::SetOGRData | ( | const ogr::DataSource * | vector | ) |
Set the input OGRDataSource that contains sampling areas for each class
Definition at line 51 of file otbPersistentSamplingFilterBase.hxx.
void otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::SetOGRLayerCreationOptions | ( | const std::vector< std::string > & | options | ) |
Set the OGR layer creation options
Definition at line 83 of file otbPersistentSamplingFilterBase.hxx.
|
virtual |
Set/Get macro for the layer name
|
protectedvirtual |
Start of main processing loop
Reimplemented in otb::PersistentImageSampleExtractorFilter< TInputImage >.
Definition at line 321 of file otbPersistentSamplingFilterBase.hxx.
|
staticprotected |
Callback function to launch VectorThreadedGenerateData in each thread
Definition at line 781 of file otbPersistentSamplingFilterBase.hxx.
|
private |
Additional field definitions to add in output data sources
Definition at line 216 of file otbPersistentSamplingFilterBase.h.
|
private |
Field index corresponding to the field name m_FieldName
Definition at line 204 of file otbPersistentSamplingFilterBase.h.
|
private |
Field name containing the class name
Definition at line 201 of file otbPersistentSamplingFilterBase.h.
|
private |
In-memory containers storing input geometries for each thread
Definition at line 219 of file otbPersistentSamplingFilterBase.h.
|
private |
In-memory containers storing position during iteration loop
Definition at line 222 of file otbPersistentSamplingFilterBase.h.
|
private |
Layer to use in the input vector file, default to 0
Definition at line 207 of file otbPersistentSamplingFilterBase.h.
|
private |
Creation option for output layers
Definition at line 213 of file otbPersistentSamplingFilterBase.h.
|
private |
name of the output layers
Definition at line 210 of file otbPersistentSamplingFilterBase.h.