21 #ifndef otbSampleAugmentationFilter_h
22 #define otbSampleAugmentationFilter_h
24 #include "itkProcessObject.h"
27 #include "OTBSamplingExport.h"
79 using Superclass::SetInput;
80 virtual void SetInput(
const OGRDataSourceType* ds);
81 const OGRDataSourceType* GetInput(
unsigned int idx);
89 itkSetMacro(ClassFieldName, std::string);
94 itkGetMacro(ClassFieldName, std::string);
97 itkSetMacro(Layer,
size_t);
98 itkGetMacro(Layer,
size_t);
99 itkSetMacro(Label,
int);
100 itkGetMacro(Label,
int);
109 itkSetMacro(NumberOfSamples,
int);
110 itkGetMacro(NumberOfSamples,
int);
113 m_ExcludedFields = ef;
117 return m_ExcludedFields;
119 itkSetMacro(StdFactor,
double);
120 itkGetMacro(StdFactor,
double);
121 itkSetMacro(SmoteNeighbors,
size_t);
122 itkGetMacro(SmoteNeighbors,
size_t);
123 itkSetMacro(Seed,
int);
124 itkGetMacro(Seed,
int);
128 const OGRDataSourceType* GetOutput();
137 void GenerateData()
override;
143 using Superclass::MakeOutput;
147 const std::vector<std::string>& excludedFields = {});
150 const std::string& classField,
int label,
const std::vector<std::string>& excludedFields = {});
152 std::set<size_t> GetExcludedFieldsIds(
const std::vector<std::string>& excludedFields,
const ogr::Layer& inputLayer);
153 bool IsNumericField(
const ogr::Feature& feature,
const int idx);
155 ogr::Feature SelectTemplateFeature(
const ogr::Layer& inputLayer,
const std::string& classField,
int label);
158 SampleAugmentationFilter(
const Self&) =
delete;
159 void operator=(
const Self&) =
delete;