OTB  6.7.0
Orfeo Toolbox
Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
otb::SEMClassifier< TInputImage, TOutputImage > Class Template Reference

#include <otbSEMClassifier.h>

+ Inheritance diagram for otb::SEMClassifier< TInputImage, TOutputImage >:
+ Collaboration diagram for otb::SEMClassifier< TInputImage, TOutputImage >:

Public Types

typedef unsigned int ClassLabelType
 
typedef std::vector
< ClassLabelType
ClassLabelVectorType
 
typedef
itk::Statistics::Subsample
< SampleType
ClassSampleType
 
typedef std::vector
< ComponentPointerType
ComponentVectorType
 
typedef itk::SmartPointer
< const Self
ConstPointer
 
typedef SampleType::MeasurementType MeasurementType
 
typedef
SampleType::MeasurementVectorType 
MeasurementVectorType
 
typedef
itk::Statistics::MembershipSample
< SampleType
OutputType
 
typedef itk::Array< double > ParameterType
 
typedef std::vector
< ParameterType
ParameterVectorType
 
typedef itk::SmartPointer< SelfPointer
 
typedef std::vector
< ProbaVectorType
ProbaByClassVectorType
 
typedef std::vector< double > ProbaVectorType
 
typedef std::vector< double > ProportionVectorType
 
typedef
itk::Statistics::ListSample
< typename
TInputImage::PixelType > 
SampleType
 
typedef SEMClassifier Self
 
typedef
itk::Statistics::SampleClassifierFilter
< typename
itk::Statistics::ListSample
< typename
TInputImage::PixelType > > 
Superclass
 
enum  TerminationCodeType {
  CONVERGED = 0,
  NOT_CONVERGED = 1
}
 
typedef
otb::Statistics::ModelComponentBase
< ClassSampleType
ComponentType
 
typedef ComponentType::Pointer ComponentPointerType
 
- Public Types inherited from itk::Statistics::SampleClassifierFilter< itk::Statistics::ListSample< TInputImage::PixelType > >
typedef IdentifierType ClassLabelType
 
typedef
ClassLabelVectorObjectType::Pointer 
ClassLabelVectorObjectPointer
 
typedef
SimpleDataObjectDecorator
< ClassLabelVectorType
ClassLabelVectorObjectType
 
typedef std::vector
< ClassLabelType
ClassLabelVectorType
 
typedef SmartPointer< const SelfConstPointer
 
typedef
DecisionRuleType::ConstPointer 
DecisionRulePointer
 
typedef DecisionRule DecisionRuleType
 
typedef SampleType::MeasurementType MeasurementType
 
typedef
SampleType::MeasurementVectorType 
MeasurementVectorType
 
typedef
MembershipFunctionType::ConstPointer 
MembershipFunctionPointer
 
typedef
SimpleDataObjectDecorator
< MembershipFunctionsWeightsArrayType
MembershipFunctionsWeightsArrayObjectType
 
typedef
MembershipFunctionsWeightsArrayObjectType::Pointer 
MembershipFunctionsWeightsArrayPointer
 
typedef Array< double > MembershipFunctionsWeightsArrayType
 
typedef MembershipFunctionBase
< MeasurementVectorType
MembershipFunctionType
 
typedef
MembershipFunctionVectorObjectType::Pointer 
MembershipFunctionVectorObjectPointer
 
typedef
SimpleDataObjectDecorator
< MembershipFunctionVectorType
MembershipFunctionVectorObjectType
 
typedef std::vector
< MembershipFunctionPointer
MembershipFunctionVectorType
 
typedef
MembershipSampleType::Pointer 
MembershipSampleObjectPointer
 
typedef MembershipSample
< SampleType
MembershipSampleType
 
typedef SmartPointer< SelfPointer
 
typedef TSample SampleType
 
typedef SampleClassifierFilter Self
 
typedef ProcessObject Superclass
 
- Public Types inherited from itk::ProcessObject
typedef SmartPointer< const SelfConstPointer
 
typedef
DataObject::DataObjectIdentifierType 
DataObjectIdentifierType
 
typedef DataObject::Pointer DataObjectPointer
 
typedef std::vector
< DataObjectPointer
DataObjectPointerArray
 
typedef
DataObjectPointerArray::size_type 
DataObjectPointerArraySizeType
 
typedef std::vector
< DataObjectIdentifierType
NameArray
 
typedef SmartPointer< SelfPointer
 
typedef ProcessObject Self
 
typedef Object Superclass
 
- Public Types inherited from itk::Object
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef Object Self
 
typedef LightObject Superclass
 
- Public Types inherited from itk::LightObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightObject Self
 

Public Member Functions

int AddComponent (int id, ComponentType *component)
 
int GetCurrentIteration ()
 
OutputTypeGetOutput ()
 
TOutputImage * GetOutputImage ()
 
virtual const
ProportionVectorType
GetProportions () const
 
virtual TerminationCodeType GetTerminationCode ()
 
void Modified () const override
 
void SetSample (const TInputImage *sample)
 
void Update () override
 
const TInputImage * GetSample () const
 
SampleTypeGetSampleList () const
 
void SetInitialProportions (ProportionVectorType &proportions)
 
virtual const
ProportionVectorType
GetInitialProportions () const
 
void SetClassLabels (OutputType *labels)
 
void SetClassLabels (TOutputImage *imgLabels)
 
ClassLabelVectorTypeGetClassLabels ()
 
virtual void SetMaximumIteration (int _arg)
 
virtual int GetMaximumIteration ()
 
void SetNeighborhood (int neighborhood)
 
int GetNeighborhood ()
 
virtual void SetTerminationThreshold (double _arg)
 
virtual double GetTerminationThreshold ()
 
- Public Member Functions inherited from itk::Statistics::SampleClassifierFilter< itk::Statistics::ListSample< TInputImage::PixelType > >
virtual ::itk::LightObject::Pointer CreateAnother () const
 
virtual const DecisionRuleTypeGetDecisionRule () const
 
const SampleTypeGetInput () const
 
virtual unsigned int GetNumberOfClasses () const
 
const MembershipSampleTypeGetOutput () const
 
void SetClassLabels (const ClassLabelVectorObjectType *classLabels)
 
virtual void SetDecisionRule (const DecisionRuleType *_arg)
 
void SetInput (const SampleType *sample)
 
void SetMembershipFunctions (const MembershipFunctionVectorObjectType *membershipFunctions)
 
void SetMembershipFunctionsWeightsArray (const MembershipFunctionsWeightsArrayObjectType *weightsArray)
 
virtual void SetNumberOfClasses (unsigned int _arg)
 
- Public Member Functions inherited from itk::ProcessObject
virtual void AbortGenerateDataOff ()
 
virtual void AbortGenerateDataOn ()
 
virtual void EnlargeOutputRequestedRegion (DataObject *)
 
virtual const bool & GetAbortGenerateData () const
 
DataObjectPointerArray GetIndexedInputs ()
 
DataObjectPointerArray GetIndexedOutputs ()
 
NameArray GetInputNames () const
 
DataObjectPointerArray GetInputs ()
 
MultiThreader * GetMultiThreader () const
 
DataObjectPointerArraySizeType GetNumberOfIndexedInputs () const
 
DataObjectPointerArraySizeType GetNumberOfIndexedOutputs () const
 
DataObjectPointerArraySizeType GetNumberOfInputs () const
 
DataObjectPointerArraySizeType GetNumberOfOutputs () const
 
virtual const ThreadIdTypeGetNumberOfThreads () const
 
virtual
DataObjectPointerArraySizeType 
GetNumberOfValidRequiredInputs () const
 
NameArray GetOutputNames () const
 
DataObjectPointerArray GetOutputs ()
 
virtual const float & GetProgress () const
 
virtual const bool & GetReleaseDataBeforeUpdateFlag () const
 
virtual bool GetReleaseDataFlag () const
 
NameArray GetRequiredInputNames () const
 
bool HasInput (const DataObjectIdentifierType &key) const
 
bool HasOutput (const DataObjectIdentifierType &key) const
 
virtual DataObjectPointer MakeOutput (const DataObjectIdentifierType &)
 
virtual void PrepareOutputs ()
 
virtual void PropagateRequestedRegion (DataObject *output)
 
virtual void ReleaseDataBeforeUpdateFlagOff ()
 
virtual void ReleaseDataBeforeUpdateFlagOn ()
 
void ReleaseDataFlagOff ()
 
void ReleaseDataFlagOn ()
 
virtual void ResetPipeline ()
 
virtual void SetAbortGenerateData (bool _arg)
 
virtual void SetNumberOfThreads (ThreadIdType _arg)
 
void SetProgress (float progress)
 
virtual void SetReleaseDataBeforeUpdateFlag (bool _arg)
 
virtual void SetReleaseDataFlag (bool flag)
 
virtual void UpdateLargestPossibleRegion ()
 
virtual void UpdateOutputData (DataObject *output)
 
virtual void UpdateOutputInformation ()
 
void UpdateProgress (float progress)
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
virtual ModifiedTimeType GetMTime () const
 
virtual const std::string & GetObjectName () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual void SetReferenceCount (int) override
 
virtual void UnRegister () const noexceptoverride
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 

Protected Member Functions

void GetMaximumAposterioriLabels ()
 
void InitParameters ()
 
void PerformExpectationProcess ()
 
void PerformMaximizationProcess ()
 
void PerformStochasticProcess ()
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
 SEMClassifier ()
 
 ~SEMClassifier () override
 
- Protected Member Functions inherited from itk::Statistics::SampleClassifierFilter< itk::Statistics::ListSample< TInputImage::PixelType > >
virtual void GenerateData () override
 
virtual DataObjectPointer MakeOutput (DataObjectPointerArraySizeType idx) override
 
void operator= (const Self &) ITK_DELETE_FUNCTION
 
 SampleClassifierFilter ()
 
 SampleClassifierFilter (const Self &) ITK_DELETE_FUNCTION
 
virtual ~SampleClassifierFilter ()
 
- Protected Member Functions inherited from itk::ProcessObject
virtual void AddInput (DataObject *input)
 
virtual void AddOutput (DataObject *output)
 
bool AddRequiredInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx)
 
bool AddRequiredInputName (const DataObjectIdentifierType &)
 
virtual void CacheInputReleaseDataFlags ()
 
virtual void GenerateInputRequestedRegion ()
 
virtual void GenerateOutputInformation ()
 
virtual void GenerateOutputRequestedRegion (DataObject *output)
 
const DataObjectGetInput (const DataObjectIdentifierType &key) const
 
DataObjectGetInput (DataObjectPointerArraySizeType idx)
 
const DataObjectGetInput (DataObjectPointerArraySizeType idx) const
 
DataObjectGetInput (const DataObjectIdentifierType &key)
 
virtual const
DataObjectPointerArraySizeType
GetNumberOfRequiredInputs () const
 
virtual const
DataObjectPointerArraySizeType
GetNumberOfRequiredOutputs () const
 
DataObjectGetOutput (const DataObjectIdentifierType &key)
 
const DataObjectGetOutput (const DataObjectIdentifierType &key) const
 
DataObjectGetOutput (DataObjectPointerArraySizeType idx)
 
const DataObjectGetOutput (DataObjectPointerArraySizeType idx) const
 
DataObjectGetPrimaryInput ()
 
const DataObjectGetPrimaryInput () const
 
virtual const char * GetPrimaryInputName (void) const
 
DataObjectGetPrimaryOutput ()
 
const DataObjectGetPrimaryOutput () const
 
virtual const char * GetPrimaryOutputName (void) const
 
bool IsIndexedInputName (const DataObjectIdentifierType &) const
 
bool IsIndexedOutputName (const DataObjectIdentifierType &) const
 
bool IsRequiredInputName (const DataObjectIdentifierType &) const
 
 itkLegacyMacro (virtual void RemoveInput(DataObject *input))
 
 itkLegacyMacro (void SetNumberOfInputs(DataObjectPointerArraySizeType num))
 
 itkLegacyMacro (virtual void RemoveOutput(DataObject *output))
 
 itkLegacyMacro (void SetNumberOfOutputs(DataObjectPointerArraySizeType num))
 
DataObjectPointerArraySizeType MakeIndexFromInputName (const DataObjectIdentifierType &name) const
 
DataObjectPointerArraySizeType MakeIndexFromOutputName (const DataObjectIdentifierType &name) const
 
DataObjectIdentifierType MakeNameFromInputIndex (DataObjectPointerArraySizeType idx) const
 
DataObjectIdentifierType MakeNameFromOutputIndex (DataObjectPointerArraySizeType idx) const
 
virtual void PopBackInput ()
 
virtual void PopFrontInput ()
 
 ProcessObject ()
 
virtual void PropagateResetPipeline ()
 
virtual void PushBackInput (const DataObject *input)
 
virtual void PushFrontInput (const DataObject *input)
 
virtual void ReleaseInputs ()
 
virtual void RemoveInput (const DataObjectIdentifierType &key)
 
virtual void RemoveInput (DataObjectPointerArraySizeType)
 
virtual void RemoveOutput (const DataObjectIdentifierType &key)
 
virtual void RemoveOutput (DataObjectPointerArraySizeType idx)
 
bool RemoveRequiredInputName (const DataObjectIdentifierType &)
 
virtual void RestoreInputReleaseDataFlags ()
 
virtual void SetInput (const DataObjectIdentifierType &key, DataObject *input)
 
virtual void SetNthInput (DataObjectPointerArraySizeType num, DataObject *input)
 
virtual void SetNthOutput (DataObjectPointerArraySizeType num, DataObject *output)
 
void SetNumberOfIndexedInputs (DataObjectPointerArraySizeType num)
 
void SetNumberOfIndexedOutputs (DataObjectPointerArraySizeType num)
 
virtual void SetNumberOfRequiredInputs (DataObjectPointerArraySizeType)
 
virtual void SetNumberOfRequiredOutputs (DataObjectPointerArraySizeType _arg)
 
virtual void SetOutput (const DataObjectIdentifierType &key, DataObject *output)
 
virtual void SetPrimaryInput (DataObject *input)
 
virtual void SetPrimaryInputName (const DataObjectIdentifierType &key)
 
virtual void SetPrimaryOutput (DataObject *output)
 
virtual void SetPrimaryOutputName (const DataObjectIdentifierType &key)
 
void SetRequiredInputNames (const NameArray &)
 
virtual void VerifyInputInformation ()
 
virtual void VerifyPreconditions ()
 
 ~ProcessObject ()
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
virtual ~Object ()
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Private Attributes

ClassLabelVectorType m_ClassLabels
 
int m_ComponentDeclared
 
ComponentVectorType m_ComponentVector
 
int m_CurrentIteration
 
int m_ExternalLabels
 
ProportionVectorType m_InitialProportions
 
int m_MaximumIteration
 
int m_NbChange
 
int m_NbSamples
 
int m_Neighborhood
 
OutputType::Pointer m_Output
 
TOutputImage::Pointer m_OutputImage
 
ProbaByClassVectorType m_Proba
 
ProportionVectorType m_Proportions
 
const TInputImage * m_Sample
 
SampleType::Pointer m_SampleList
 
TerminationCodeType m_TerminationCode
 
double m_TerminationThreshold
 
virtual const char * GetNameOfClass () const
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
static Pointer New ()
 

Additional Inherited Members

- Static Public Member Functions inherited from itk::Statistics::SampleClassifierFilter< itk::Statistics::ListSample< TInputImage::PixelType > >
static Pointer New ()
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool flag)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 
- Protected Types inherited from itk::Statistics::SampleClassifierFilter< itk::Statistics::ListSample< TInputImage::PixelType > >
typedef
ProcessObject::DataObjectPointerArraySizeType 
DataObjectPointerArraySizeType
 
- Protected Attributes inherited from itk::ProcessObject
TimeStamp m_OutputInformationMTime
 
bool m_Updating
 
- Protected Attributes inherited from itk::LightObject
AtomicInt< int > m_ReferenceCount
 

Detailed Description

template<class TInputImage, class TOutputImage>
class otb::SEMClassifier< TInputImage, TOutputImage >

This class implements the Stochastic Expectation Maximization algorithm to perform an estimation of a mixture model.

The first template argument is the type of the target sample data. This estimator expects one or more model component objects of the classes derived from the ModelComponentBase. The actual component (or module) parameters are updated by each component. Users can think this class as a strategy or a integration point for the SEM procedure.

The number of classes (SetNumberOfClasses), the initial proportion (SetInitialProportions), the input sample (SetSample), the model components (AddComponent), and the maximum iteration (SetMaximumIteration) are required. The SEM procedure terminates when the current iteration reaches the maximum iteration or the model parameters converge.

The difference from ExpectationMaximizationMixtureModelEstimator is that SEMClassifier include the maximum a posteriori decision on each sample. The class is to be seen as a classification and not an estimator.

Recent API changes: N/A

See Also
ModelComponentBase, GaussianModelComponent

Definition at line 64 of file otbSEMClassifier.h.

Member Typedef Documentation

template<class TInputImage , class TOutputImage >
typedef unsigned int otb::SEMClassifier< TInputImage, TOutputImage >::ClassLabelType

Type of the segmentation vector

Definition at line 90 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
typedef std::vector<ClassLabelType> otb::SEMClassifier< TInputImage, TOutputImage >::ClassLabelVectorType

Definition at line 91 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
typedef itk::Statistics::Subsample<SampleType> otb::SEMClassifier< TInputImage, TOutputImage >::ClassSampleType

Definition at line 84 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
typedef ComponentType::Pointer otb::SEMClassifier< TInputImage, TOutputImage >::ComponentPointerType

Type of the mixture model component base class. Due to the stochastic purpose, the initial list of sample (from TInputImage) is duplicated as many times as the number of classes (into SampleLists).

Definition at line 100 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
typedef otb::Statistics::ModelComponentBase<ClassSampleType> otb::SEMClassifier< TInputImage, TOutputImage >::ComponentType

Type of the mixture model component base class. Due to the stochastic purpose, the initial list of sample (from TInputImage) is duplicated as many times as the number of classes (into SampleLists).

Definition at line 99 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
typedef std::vector<ComponentPointerType> otb::SEMClassifier< TInputImage, TOutputImage >::ComponentVectorType

Type of the component pointer storage, one component per class

Definition at line 104 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
typedef itk::SmartPointer<const Self> otb::SEMClassifier< TInputImage, TOutputImage >::ConstPointer

Definition at line 75 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
typedef SampleType::MeasurementType otb::SEMClassifier< TInputImage, TOutputImage >::MeasurementType

Definition at line 86 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
typedef SampleType::MeasurementVectorType otb::SEMClassifier< TInputImage, TOutputImage >::MeasurementVectorType

Definition at line 87 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
typedef itk::Statistics::MembershipSample<SampleType> otb::SEMClassifier< TInputImage, TOutputImage >::OutputType

Output type for GetClassSample method

Definition at line 94 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
typedef itk::Array<double> otb::SEMClassifier< TInputImage, TOutputImage >::ParameterType

type of the parameters needed for the component vectors

Definition at line 107 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
typedef std::vector<ParameterType> otb::SEMClassifier< TInputImage, TOutputImage >::ParameterVectorType

Type of the parameter pointer storage, one parameter set per class

Definition at line 110 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
typedef itk::SmartPointer<Self> otb::SEMClassifier< TInputImage, TOutputImage >::Pointer

Definition at line 74 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
typedef std::vector<ProbaVectorType> otb::SEMClassifier< TInputImage, TOutputImage >::ProbaByClassVectorType

Type of the probability values of each sample per class

Definition at line 117 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
typedef std::vector<double> otb::SEMClassifier< TInputImage, TOutputImage >::ProbaVectorType

Definition at line 114 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
typedef std::vector<double> otb::SEMClassifier< TInputImage, TOutputImage >::ProportionVectorType

Type of the vector of the probability values for each sample

Definition at line 113 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
typedef itk::Statistics::ListSample<typename TInputImage::PixelType> otb::SEMClassifier< TInputImage, TOutputImage >::SampleType

TSample template argument related typedefs

Definition at line 79 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
typedef SEMClassifier otb::SEMClassifier< TInputImage, TOutputImage >::Self

Standard class typedef

Definition at line 70 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
typedef itk::Statistics::SampleClassifierFilter< typename itk::Statistics::ListSample<typename TInputImage::PixelType> > otb::SEMClassifier< TInputImage, TOutputImage >::Superclass

Definition at line 73 of file otbSEMClassifier.h.

Member Enumeration Documentation

template<class TInputImage , class TOutputImage >
enum otb::SEMClassifier::TerminationCodeType

Termination status after running optimization

Enumerator
CONVERGED 
NOT_CONVERGED 

Definition at line 169 of file otbSEMClassifier.h.

Constructor & Destructor Documentation

template<class TInputImage , class TOutputImage >
otb::SEMClassifier< TInputImage, TOutputImage >::SEMClassifier ( )
protected

Definition at line 42 of file otbSEMClassifier.hxx.

template<class TInputImage , class TOutputImage >
otb::SEMClassifier< TInputImage, TOutputImage >::~SEMClassifier ( )
inlineoverrideprotected

Definition at line 191 of file otbSEMClassifier.h.

Member Function Documentation

template<class TInputImage , class TOutputImage >
int otb::SEMClassifier< TInputImage, TOutputImage >::AddComponent ( int  id,
ComponentType component 
)

Adds a new component (or class). Has to be called after SetNumberOfClasses

Definition at line 284 of file otbSEMClassifier.hxx.

template<class TInputImage , class TOutputImage >
virtual::itk::LightObject::Pointer otb::SEMClassifier< TInputImage, TOutputImage >::CreateAnother ( void  ) const
virtual

Standard macros

Reimplemented from itk::Object.

template<class TInputImage , class TOutputImage >
SEMClassifier< TInputImage, TOutputImage >::ClassLabelVectorType & otb::SEMClassifier< TInputImage, TOutputImage >::GetClassLabels ( )

Set/Gets the initial segmentation. the size of the vector should be the same as the number of samples (length of MeasurementVector)

Definition at line 218 of file otbSEMClassifier.hxx.

template<class TInputImage , class TOutputImage >
int otb::SEMClassifier< TInputImage, TOutputImage >::GetCurrentIteration ( )

Gets the current iteration.

Definition at line 276 of file otbSEMClassifier.hxx.

template<class TInputImage , class TOutputImage >
virtual const ProportionVectorType& otb::SEMClassifier< TInputImage, TOutputImage >::GetInitialProportions ( ) const
virtual

Set/Gets the initial proportion values. The size of proportion vector should be same as the number of component (or classes). Choose between SetInitialProportions, SetClassLabels or SetNumberOfComponents

template<class TInputImage , class TOutputImage >
void otb::SEMClassifier< TInputImage, TOutputImage >::GetMaximumAposterioriLabels ( )
protected
template<class TInputImage , class TOutputImage >
virtual int otb::SEMClassifier< TInputImage, TOutputImage >::GetMaximumIteration ( )
virtual

Set/Gets the maximum number of iterations. When the optimization process reaches the maximum number of interations, even if the class parameters aren't converged, the optimization process stops.

template<class TInputImage , class TOutputImage >
virtual const char* otb::SEMClassifier< TInputImage, TOutputImage >::GetNameOfClass ( ) const
virtual
template<class TInputImage , class TOutputImage >
int otb::SEMClassifier< TInputImage, TOutputImage >::GetNeighborhood ( )

Set/Gets the neighborhood to take into consideration in the contextual decision rule. Should be odd (def. 3).

Definition at line 88 of file otbSEMClassifier.hxx.

template<class TInputImage , class TOutputImage >
SEMClassifier< TInputImage, TOutputImage >::OutputType * otb::SEMClassifier< TInputImage, TOutputImage >::GetOutput ( void  )

Definition at line 318 of file otbSEMClassifier.hxx.

template<class TInputImage , class TOutputImage >
TOutputImage * otb::SEMClassifier< TInputImage, TOutputImage >::GetOutputImage ( void  )

Definition at line 310 of file otbSEMClassifier.hxx.

template<class TInputImage , class TOutputImage >
virtual const ProportionVectorType& otb::SEMClassifier< TInputImage, TOutputImage >::GetProportions ( ) const
virtual

Gets the result proportion values

template<class TInputImage , class TOutputImage >
const TInputImage * otb::SEMClassifier< TInputImage, TOutputImage >::GetSample ( ) const

Returns the target data

Definition at line 260 of file otbSEMClassifier.hxx.

template<class TInputImage , class TOutputImage >
SEMClassifier< TInputImage, TOutputImage >::SampleType * otb::SEMClassifier< TInputImage, TOutputImage >::GetSampleList ( ) const

Returns the target data

Definition at line 268 of file otbSEMClassifier.hxx.

template<class TInputImage , class TOutputImage >
virtual TerminationCodeType otb::SEMClassifier< TInputImage, TOutputImage >::GetTerminationCode ( )
virtual

Gets the termination status

template<class TInputImage , class TOutputImage >
virtual double otb::SEMClassifier< TInputImage, TOutputImage >::GetTerminationThreshold ( )
virtual

Set/Get the termination threshold (ratio of the number of sample that change affected class during interation over the total number of samples (def is 1E-5)

template<class TInputImage , class TOutputImage >
void otb::SEMClassifier< TInputImage, TOutputImage >::InitParameters ( )
protected

Initialize the first segmentation, either randomly or by using a ClassLabelVectorType given in SetClassLabels.

Definition at line 326 of file otbSEMClassifier.hxx.

References otbMsgDebugMacro, and otbMsgDevMacro.

template<class TInputImage , class TOutputImage >
void otb::SEMClassifier< TInputImage, TOutputImage >::Modified ( void  ) const
overridevirtual

Reimplemented from itk::Object.

Definition at line 295 of file otbSEMClassifier.hxx.

References otbMsgDebugMacro.

template<class TInputImage , class TOutputImage >
static Pointer otb::SEMClassifier< TInputImage, TOutputImage >::New ( )
static

Standard macros

template<class TInputImage , class TOutputImage >
void otb::SEMClassifier< TInputImage, TOutputImage >::PerformExpectationProcess ( )
protected

Estimation part of the SEM

Definition at line 468 of file otbSEMClassifier.hxx.

template<class TInputImage , class TOutputImage >
void otb::SEMClassifier< TInputImage, TOutputImage >::PerformMaximizationProcess ( )
protected

Maximization part of the SEM. This method should be upgraded this a contextual point of view... It required to a Neighborhood knowledge into the TSample type...

Definition at line 524 of file otbSEMClassifier.hxx.

References itk::Statistics::ListSample< TMeasurementVector >::ConstIterator::GetInstanceIdentifier(), itk::Statistics::ListSample< TMeasurementVector >::ConstIterator::GetMeasurementVector(), and itk::Size< VDimension >::GetSize().

template<class TInputImage , class TOutputImage >
void otb::SEMClassifier< TInputImage, TOutputImage >::PerformStochasticProcess ( )
protected

Stochastic part of the SEM

Definition at line 422 of file otbSEMClassifier.hxx.

References otbMsgDebugMacro.

template<class TInputImage , class TOutputImage >
void otb::SEMClassifier< TInputImage, TOutputImage >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotectedvirtual
template<class TInputImage , class TOutputImage >
void otb::SEMClassifier< TInputImage, TOutputImage >::SetClassLabels ( OutputType labels)

Set/Gets the initial segmentation. the size of the vector should be the same as the number of samples (length of MeasurementVector)

Definition at line 105 of file otbSEMClassifier.hxx.

References itk::Statistics::MembershipSample< class >::Begin(), itk::Statistics::MembershipSample< class >::End(), itk::Statistics::MembershipSample< class >::ConstIterator::GetClassLabel(), and otbMsgDebugMacro.

template<class TInputImage , class TOutputImage >
void otb::SEMClassifier< TInputImage, TOutputImage >::SetClassLabels ( TOutputImage *  imgLabels)

Set/Gets the initial segmentation. the size of the vector should be the same as the number of samples (length of MeasurementVector)

Definition at line 154 of file otbSEMClassifier.hxx.

References itk::Size< VDimension >::GetSize(), itk::ImageRegionConstIterator< TImage >::GoToBegin(), itk::ImageRegionConstIterator< TImage >::GoToEnd(), and otbMsgDebugMacro.

template<class TInputImage , class TOutputImage >
void otb::SEMClassifier< TInputImage, TOutputImage >::SetInitialProportions ( ProportionVectorType proportions)

Set/Gets the initial proportion values. The size of proportion vector should be same as the number of component (or classes). Choose between SetInitialProportions, SetClassLabels or SetNumberOfComponents

Definition at line 96 of file otbSEMClassifier.hxx.

template<class TInputImage , class TOutputImage >
virtual void otb::SEMClassifier< TInputImage, TOutputImage >::SetMaximumIteration ( int  _arg)
virtual

Set/Gets the maximum number of iterations. When the optimization process reaches the maximum number of interations, even if the class parameters aren't converged, the optimization process stops.

template<class TInputImage , class TOutputImage >
void otb::SEMClassifier< TInputImage, TOutputImage >::SetNeighborhood ( int  neighborhood)

Set/Gets the neighborhood to take into consideration in the contextual decision rule. Should be odd (def. 3).

Definition at line 79 of file otbSEMClassifier.hxx.

template<class TInputImage , class TOutputImage >
void otb::SEMClassifier< TInputImage, TOutputImage >::SetSample ( const TInputImage *  sample)
template<class TInputImage , class TOutputImage >
virtual void otb::SEMClassifier< TInputImage, TOutputImage >::SetTerminationThreshold ( double  _arg)
virtual

Set/Get the termination threshold (ratio of the number of sample that change affected class during interation over the total number of samples (def is 1E-5)

template<class TInputImage , class TOutputImage >
void otb::SEMClassifier< TInputImage, TOutputImage >::Update ( void  )
overridevirtual

Runs the optimization process.

Reimplemented from itk::ProcessObject.

Definition at line 651 of file otbSEMClassifier.hxx.

Member Data Documentation

template<class TInputImage , class TOutputImage >
ClassLabelVectorType otb::SEMClassifier< TInputImage, TOutputImage >::m_ClassLabels
private

Definition at line 229 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
int otb::SEMClassifier< TInputImage, TOutputImage >::m_ComponentDeclared
mutableprivate

Definition at line 232 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
ComponentVectorType otb::SEMClassifier< TInputImage, TOutputImage >::m_ComponentVector
mutableprivate

Definition at line 225 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
int otb::SEMClassifier< TInputImage, TOutputImage >::m_CurrentIteration
private

Definition at line 219 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
int otb::SEMClassifier< TInputImage, TOutputImage >::m_ExternalLabels
private

Definition at line 231 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
ProportionVectorType otb::SEMClassifier< TInputImage, TOutputImage >::m_InitialProportions
private

Definition at line 226 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
int otb::SEMClassifier< TInputImage, TOutputImage >::m_MaximumIteration
private

Definition at line 218 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
int otb::SEMClassifier< TInputImage, TOutputImage >::m_NbChange
private

Definition at line 220 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
int otb::SEMClassifier< TInputImage, TOutputImage >::m_NbSamples
private

Definition at line 215 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
int otb::SEMClassifier< TInputImage, TOutputImage >::m_Neighborhood
private

Definition at line 222 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
OutputType::Pointer otb::SEMClassifier< TInputImage, TOutputImage >::m_Output
private

Definition at line 235 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
TOutputImage::Pointer otb::SEMClassifier< TInputImage, TOutputImage >::m_OutputImage
private

Definition at line 234 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
ProbaByClassVectorType otb::SEMClassifier< TInputImage, TOutputImage >::m_Proba
private

Definition at line 228 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
ProportionVectorType otb::SEMClassifier< TInputImage, TOutputImage >::m_Proportions
private

Definition at line 227 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
const TInputImage* otb::SEMClassifier< TInputImage, TOutputImage >::m_Sample
private

Target data sample pointer

Definition at line 214 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
SampleType::Pointer otb::SEMClassifier< TInputImage, TOutputImage >::m_SampleList
private

Definition at line 216 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
TerminationCodeType otb::SEMClassifier< TInputImage, TOutputImage >::m_TerminationCode
private

Definition at line 224 of file otbSEMClassifier.h.

template<class TInputImage , class TOutputImage >
double otb::SEMClassifier< TInputImage, TOutputImage >::m_TerminationThreshold
private

Definition at line 221 of file otbSEMClassifier.h.


The documentation for this class was generated from the following files: