22 #ifndef otbSEMClassifier_h
23 #define otbSEMClassifier_h
25 #include "itkListSample.h"
26 #include "itkSampleClassifierFilter.h"
63 template <
class TInputImage,
class TOutputImage>
64 class ITK_EXPORT
SEMClassifier :
public itk::Statistics::SampleClassifierFilter<typename itk::Statistics::ListSample<typename TInputImage::PixelType>>
69 typedef itk::Statistics::SampleClassifierFilter<typename itk::Statistics::ListSample<typename TInputImage::PixelType>>
Superclass;
79 typedef typename itk::Statistics::ListSample<typename TInputImage::PixelType>
SampleType;
90 typedef itk::Statistics::MembershipSample<SampleType>
OutputType;
116 void SetSample(
const TInputImage* sample);
119 const TInputImage* GetSample()
const;
137 void SetClassLabels(TOutputImage* imgLabels);
145 itkSetMacro(MaximumIteration,
int);
146 itkGetMacro(MaximumIteration,
int);
151 void SetNeighborhood(
int neighborhood);
152 int GetNeighborhood();
156 int GetCurrentIteration();
162 void Update()
override;
165 typedef enum { CONVERGED = 0, NOT_CONVERGED = 1 } TerminationCodeType;
170 itkSetMacro(TerminationThreshold,
double);
171 itkGetMacro(TerminationThreshold,
double);
175 itkGetMacro(TerminationCode, TerminationCodeType);
178 OutputType* GetOutput();
181 TOutputImage* GetOutputImage();
183 void Modified()
const override;
190 void PrintSelf(std::ostream& os, itk::Indent indent)
const override;
194 void InitParameters();
197 void PerformStochasticProcess();
200 void PerformExpectationProcess();
205 void PerformMaximizationProcess();
208 void GetMaximumAposterioriLabels();
238 #ifndef OTB_MANUAL_INSTANTIATION