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);
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
This class implements the Stochastic Expectation Maximization algorithm to perform an estimation of a...
std::vector< double > ProportionVectorType
itk::SmartPointer< Self > Pointer
ComponentType::Pointer ComponentPointerType
TerminationCodeType m_TerminationCode
std::vector< double > ProbaVectorType
SampleType::MeasurementVectorType MeasurementVectorType
OutputType::Pointer m_Output
~SEMClassifier() override
ClassLabelVectorType m_ClassLabels
SampleType::MeasurementType MeasurementType
unsigned int ClassLabelType
std::vector< ComponentPointerType > ComponentVectorType
ProportionVectorType m_Proportions
itk::Statistics::ListSample< typename TInputImage::PixelType > SampleType
std::vector< ParameterType > ParameterVectorType
TOutputImage::Pointer m_OutputImage
ProportionVectorType m_InitialProportions
std::vector< ProbaVectorType > ProbaByClassVectorType
itk::SmartPointer< const Self > ConstPointer
std::vector< ClassLabelType > ClassLabelVectorType
itk::Statistics::SampleClassifierFilter< typename itk::Statistics::ListSample< typename TInputImage::PixelType > > Superclass
ComponentVectorType m_ComponentVector
itk::Statistics::MembershipSample< SampleType > OutputType
otb::Statistics::ModelComponentBase< ClassSampleType > ComponentType
double m_TerminationThreshold
itk::Statistics::Subsample< SampleType > ClassSampleType
itk::Array< double > ParameterType
const TInputImage * m_Sample
ProbaByClassVectorType m_Proba
SampleType::Pointer m_SampleList
base class for distribution representation that supports analytical way to update the distribution pa...
itk::SmartPointer< Self > Pointer
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.