22 #ifndef otbListSampleGenerator_h
23 #define otbListSampleGenerator_h
25 #include "itkProcessObject.h"
26 #include "itkListSample.h"
27 #include "itkMersenneTwisterRandomVariateGenerator.h"
52 template <
class TImage,
class TVectorData>
83 typedef itk::FixedArray<ClassLabelType, 1>
LabelType;
88 using Superclass::SetInput;
103 using Superclass::MakeOutput;
108 itkGetConstMacro(MaxTrainingSize,
long int);
109 itkSetMacro(MaxTrainingSize,
long int);
110 itkGetConstMacro(PolygonEdgeInclusion,
bool);
111 itkSetMacro(PolygonEdgeInclusion,
bool);
112 itkGetConstMacro(MaxValidationSize,
long int);
113 itkSetMacro(MaxValidationSize,
long int);
114 itkGetConstMacro(ValidationTrainingProportion,
double);
115 itkSetClampMacro(ValidationTrainingProportion,
double, 0.0, 1.0);
116 itkGetConstMacro(BoundByMin,
bool);
117 itkSetMacro(BoundByMin,
bool);
120 itkGetConstMacro(NumberOfClasses,
unsigned short);
125 return m_ClassesSamplesNumberTraining;
130 return m_ClassesSamplesNumberValidation;
133 itkGetStringMacro(ClassKey);
134 itkSetStringMacro(ClassKey);
135 itkGetConstMacro(ClassMinSize,
double);
152 return m_ClassesSize;
160 void PrintSelf(std::ostream& os, itk::Indent indent)
const override;
163 void GenerateData(
void)
override;
165 void GenerateInputRequestedRegion(
void)
override;
168 void GenerateClassStatistics();
180 void ComputeClassSelectionProbability();
212 #ifndef OTB_MANUAL_INSTANTIATION
Produces a ListSample from a VectorImage and a VectorData.
std::map< ClassLabelType, double > GetClassesSize() const
unsigned short m_NumberOfClasses
long int m_MaxTrainingSize
std::map< ClassLabelType, double > m_ClassesSize
std::map< ClassLabelType, int > SampleNumberType
bool m_PolygonEdgeInclusion
ListSampleType::Pointer ListSamplePointerType
VectorDataType::Pointer VectorDataPointerType
itk::ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
itk::ProcessObject Superclass
std::map< ClassLabelType, double > m_ClassesProbValidation
itk::SmartPointer< const Self > ConstPointer
itk::FixedArray< ClassLabelType, 1 > LabelType
itk::DataObject::Pointer DataObjectPointer
SampleNumberType GetClassesSamplesNumberValidation(void) const
ImageType::PixelType SampleType
ImageType::Pointer ImagePointerType
ListLabelType::Pointer ListLabelPointerType
long int m_MaxValidationSize
ImageType::IndexType ImageIndexType
itk::SmartPointer< Self > Pointer
TVectorData VectorDataType
std::map< ClassLabelType, double > m_ClassesProbTraining
void operator=(const Self &)=delete
itk::Statistics::ListSample< SampleType > ListSampleType
DataNodeType::PolygonListPointerType PolygonListPointerType
~ListSampleGenerator() override
double m_ValidationTrainingProportion
std::map< ClassLabelType, int > m_ClassesSamplesNumberValidation
SampleNumberType GetClassesSamplesNumberTraining(void) const
itk::Statistics::MersenneTwisterRandomVariateGenerator RandomGeneratorType
DataNodeType::PolygonType PolygonType
ListSampleGenerator(const Self &)=delete
VectorDataType::DataNodeType DataNodeType
DataNodeType::PolygonPointerType PolygonPointerType
std::map< ClassLabelType, int > m_ClassesSamplesNumberTraining
DataNodeType::PolygonListType PolygonListType
ImageType::RegionType ImageRegionType
RandomGeneratorType::Pointer m_RandomGenerator
itk::Statistics::ListSample< LabelType > ListLabelType
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.