22 #ifndef otbListSampleGenerator_h
23 #define otbListSampleGenerator_h
25 #include "itkProcessObject.h"
26 #include "itkListSample.h"
27 #include "itkPreOrderTreeIterator.h"
28 #include "itkMersenneTwisterRandomVariateGenerator.h"
53 template <
class TImage,
class TVectorData>
84 typedef itk::FixedArray<ClassLabelType, 1>
LabelType;
89 using Superclass::SetInput;
104 using Superclass::MakeOutput;
109 itkGetConstMacro(MaxTrainingSize,
long int);
110 itkSetMacro(MaxTrainingSize,
long int);
111 itkGetConstMacro(PolygonEdgeInclusion,
bool);
112 itkSetMacro(PolygonEdgeInclusion,
bool);
113 itkGetConstMacro(MaxValidationSize,
long int);
114 itkSetMacro(MaxValidationSize,
long int);
115 itkGetConstMacro(ValidationTrainingProportion,
double);
116 itkSetClampMacro(ValidationTrainingProportion,
double, 0.0, 1.0);
117 itkGetConstMacro(BoundByMin,
bool);
118 itkSetMacro(BoundByMin,
bool);
121 itkGetConstMacro(NumberOfClasses,
unsigned short);
126 return m_ClassesSamplesNumberTraining;
131 return m_ClassesSamplesNumberValidation;
134 itkGetStringMacro(ClassKey);
135 itkSetStringMacro(ClassKey);
136 itkGetConstMacro(ClassMinSize,
double);
139 ListSampleType* GetTrainingListSample();
142 ListLabelType* GetTrainingListLabel();
145 ListSampleType* GetValidationListSample();
148 ListLabelType* GetValidationListLabel();
153 return m_ClassesSize;
161 void PrintSelf(std::ostream& os, itk::Indent indent)
const override;
164 void GenerateData(
void)
override;
166 void GenerateInputRequestedRegion(
void)
override;
169 void GenerateClassStatistics();
173 void operator=(
const Self&) =
delete;
182 void ComputeClassSelectionProbability();
214 #ifndef OTB_MANUAL_INSTANTIATION