OTB  9.0.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | List of all members
otb::MRFSamplerRandomMAP< TInput1, TInput2 > Class Template Reference

#include <otbMRFSamplerRandomMAP.h>

+ Inheritance diagram for otb::MRFSamplerRandomMAP< TInput1, TInput2 >:
+ Collaboration diagram for otb::MRFSamplerRandomMAP< TInput1, TInput2 >:

Public Types

typedef itk::SmartPointer< const SelfConstPointer
 
typedef Superclass::EnergyFidelityPointer EnergyFidelityPointer
 
typedef Superclass::EnergyFidelityType EnergyFidelityType
 
typedef Superclass::EnergyRegularizationPointer EnergyRegularizationPointer
 
typedef Superclass::EnergyRegularizationType EnergyRegularizationType
 
typedef Superclass::InputImageNeighborhoodIterator InputImageNeighborhoodIterator
 
typedef Superclass::InputImagePixelType InputImagePixelType
 
typedef Superclass::LabelledImageNeighborhoodIterator LabelledImageNeighborhoodIterator
 
typedef Superclass::LabelledImagePixelType LabelledImagePixelType
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::Statistics::MersenneTwisterRandomVariateGenerator RandomGeneratorType
 
typedef MRFSamplerRandomMAP Self
 
typedef otb::MRFSampler< TInput1, TInput2 > Superclass
 
- Public Types inherited from otb::MRFSampler< TInput1, TInput2 >
typedef itk::SmartPointer< const SelfConstPointer
 
typedef EnergyFidelityType::Pointer EnergyFidelityPointer
 
typedef MRFEnergy< TInput1, TInput2 > EnergyFidelityType
 
typedef EnergyRegularizationType::Pointer EnergyRegularizationPointer
 
typedef MRFEnergy< TInput2, TInput2 > EnergyRegularizationType
 
typedef itk::ConstNeighborhoodIterator< TInput1 > InputImageNeighborhoodIterator
 
typedef TInput1::PixelType InputImagePixelType
 
typedef itk::NeighborhoodIterator< TInput2 > LabelledImageNeighborhoodIterator
 
typedef TInput2::PixelType LabelledImagePixelType
 
typedef itk::SmartPointer< SelfPointer
 
typedef MRFSampler Self
 
typedef itk::Object Superclass
 

Public Member Functions

int Compute (const InputImageNeighborhoodIterator &itData, const LabelledImageNeighborhoodIterator &itRegul) override
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 
void SetNumberOfClasses (const unsigned int nClasses) override
 
- Public Member Functions inherited from otb::MRFSampler< TInput1, TInput2 >
virtual double GetDeltaEnergy ()
 
virtual double GetEnergyAfter () const
 
virtual double GetEnergyBefore () const
 
virtual double GetLambda ()
 
virtual unsigned int GetNumberOfClasses ()
 
virtual LabelledImagePixelType GetValue ()
 
virtual void SetEnergyFidelity (EnergyFidelityType *_arg)
 
virtual void SetEnergyRegularization (EnergyRegularizationType *_arg)
 
virtual void SetLambda (double _arg)
 

Static Public Member Functions

static Pointer New ()
 
double * m_RepartitionFunction
 
double * m_Energy
 
bool m_EnergiesInvalid
 
RandomGeneratorType::Pointer m_Generator
 
void InitializeSeed (int seed)
 
void InitializeSeed ()
 
 MRFSamplerRandomMAP ()
 
 ~MRFSamplerRandomMAP () override
 

Additional Inherited Members

- Protected Member Functions inherited from otb::MRFSampler< TInput1, TInput2 >
 MRFSampler ()
 
 ~MRFSampler () override
 
- Protected Attributes inherited from otb::MRFSampler< TInput1, TInput2 >
double m_DeltaEnergy
 
double m_EnergyAfter
 
double m_EnergyBefore
 
double m_EnergyCurrent
 
EnergyFidelityPointer m_EnergyFidelity
 
EnergyRegularizationPointer m_EnergyRegularization
 
double m_Lambda
 
unsigned int m_NumberOfClasses
 
LabelledImagePixelType m_Value
 
LabelledImagePixelType m_ValueCurrent
 

Detailed Description

template<class TInput1, class TInput2>
class otb::MRFSamplerRandomMAP< TInput1, TInput2 >

This is the base class for sampler methods used in the MRF framework.

This is one sampler to be used int he MRF framework. This sampler select the value randomly according to the apriori probability.

The probability is defined from the energy as:

\[ P(X=x)= \frac{1}{Z} \exp^{-U(x)} \]

where $ Z = \sum_x \exp^{-U(x)}$

This class is meant to be used in the MRF framework with the otb::MarkovRandomFieldFilter

Examples
Markov/MarkovClassification2Example.cxx.

Definition at line 53 of file otbMRFSamplerRandomMAP.h.

Member Typedef Documentation

◆ ConstPointer

template<class TInput1 , class TInput2 >
typedef itk::SmartPointer<const Self> otb::MRFSamplerRandomMAP< TInput1, TInput2 >::ConstPointer

Definition at line 59 of file otbMRFSamplerRandomMAP.h.

◆ EnergyFidelityPointer

template<class TInput1 , class TInput2 >
typedef Superclass::EnergyFidelityPointer otb::MRFSamplerRandomMAP< TInput1, TInput2 >::EnergyFidelityPointer

Definition at line 67 of file otbMRFSamplerRandomMAP.h.

◆ EnergyFidelityType

template<class TInput1 , class TInput2 >
typedef Superclass::EnergyFidelityType otb::MRFSamplerRandomMAP< TInput1, TInput2 >::EnergyFidelityType

Definition at line 65 of file otbMRFSamplerRandomMAP.h.

◆ EnergyRegularizationPointer

template<class TInput1 , class TInput2 >
typedef Superclass::EnergyRegularizationPointer otb::MRFSamplerRandomMAP< TInput1, TInput2 >::EnergyRegularizationPointer

Definition at line 68 of file otbMRFSamplerRandomMAP.h.

◆ EnergyRegularizationType

template<class TInput1 , class TInput2 >
typedef Superclass::EnergyRegularizationType otb::MRFSamplerRandomMAP< TInput1, TInput2 >::EnergyRegularizationType

Definition at line 66 of file otbMRFSamplerRandomMAP.h.

◆ InputImageNeighborhoodIterator

template<class TInput1 , class TInput2 >
typedef Superclass::InputImageNeighborhoodIterator otb::MRFSamplerRandomMAP< TInput1, TInput2 >::InputImageNeighborhoodIterator

Definition at line 61 of file otbMRFSamplerRandomMAP.h.

◆ InputImagePixelType

template<class TInput1 , class TInput2 >
typedef Superclass::InputImagePixelType otb::MRFSamplerRandomMAP< TInput1, TInput2 >::InputImagePixelType

Definition at line 64 of file otbMRFSamplerRandomMAP.h.

◆ LabelledImageNeighborhoodIterator

template<class TInput1 , class TInput2 >
typedef Superclass::LabelledImageNeighborhoodIterator otb::MRFSamplerRandomMAP< TInput1, TInput2 >::LabelledImageNeighborhoodIterator

Definition at line 62 of file otbMRFSamplerRandomMAP.h.

◆ LabelledImagePixelType

template<class TInput1 , class TInput2 >
typedef Superclass::LabelledImagePixelType otb::MRFSamplerRandomMAP< TInput1, TInput2 >::LabelledImagePixelType

Definition at line 63 of file otbMRFSamplerRandomMAP.h.

◆ Pointer

template<class TInput1 , class TInput2 >
typedef itk::SmartPointer<Self> otb::MRFSamplerRandomMAP< TInput1, TInput2 >::Pointer

Definition at line 58 of file otbMRFSamplerRandomMAP.h.

◆ RandomGeneratorType

template<class TInput1 , class TInput2 >
typedef itk::Statistics::MersenneTwisterRandomVariateGenerator otb::MRFSamplerRandomMAP< TInput1, TInput2 >::RandomGeneratorType

Definition at line 69 of file otbMRFSamplerRandomMAP.h.

◆ Self

template<class TInput1 , class TInput2 >
typedef MRFSamplerRandomMAP otb::MRFSamplerRandomMAP< TInput1, TInput2 >::Self

Definition at line 56 of file otbMRFSamplerRandomMAP.h.

◆ Superclass

template<class TInput1 , class TInput2 >
typedef otb::MRFSampler<TInput1, TInput2> otb::MRFSamplerRandomMAP< TInput1, TInput2 >::Superclass

Definition at line 57 of file otbMRFSamplerRandomMAP.h.

Constructor & Destructor Documentation

◆ MRFSamplerRandomMAP()

template<class TInput1 , class TInput2 >
otb::MRFSamplerRandomMAP< TInput1, TInput2 >::MRFSamplerRandomMAP ( )
inlineprotected

Methods to cancel random effects.

Definition at line 156 of file otbMRFSamplerRandomMAP.h.

◆ ~MRFSamplerRandomMAP()

template<class TInput1 , class TInput2 >
otb::MRFSamplerRandomMAP< TInput1, TInput2 >::~MRFSamplerRandomMAP ( )
inlineoverrideprotected

Methods to cancel random effects.

Definition at line 161 of file otbMRFSamplerRandomMAP.h.

Member Function Documentation

◆ Compute()

template<class TInput1 , class TInput2 >
int otb::MRFSamplerRandomMAP< TInput1, TInput2 >::Compute ( const InputImageNeighborhoodIterator itData,
const LabelledImageNeighborhoodIterator itRegul 
)
inlineoverridevirtual

Implements otb::MRFSampler< TInput1, TInput2 >.

Definition at line 90 of file otbMRFSamplerRandomMAP.h.

◆ CreateAnother()

template<class TInput1 , class TInput2 >
virtual::itk::LightObject::Pointer otb::MRFSamplerRandomMAP< TInput1, TInput2 >::CreateAnother ( void  ) const

◆ GetNameOfClass()

template<class TInput1 , class TInput2 >
virtual const char* otb::MRFSamplerRandomMAP< TInput1, TInput2 >::GetNameOfClass ( ) const
virtual

◆ InitializeSeed() [1/2]

template<class TInput1 , class TInput2 >
void otb::MRFSamplerRandomMAP< TInput1, TInput2 >::InitializeSeed ( )
inline

Methods to cancel random effects.

Definition at line 148 of file otbMRFSamplerRandomMAP.h.

◆ InitializeSeed() [2/2]

template<class TInput1 , class TInput2 >
void otb::MRFSamplerRandomMAP< TInput1, TInput2 >::InitializeSeed ( int  seed)
inline

Methods to cancel random effects.

Definition at line 144 of file otbMRFSamplerRandomMAP.h.

◆ New()

template<class TInput1 , class TInput2 >
static Pointer otb::MRFSamplerRandomMAP< TInput1, TInput2 >::New ( )
static

◆ SetNumberOfClasses()

template<class TInput1 , class TInput2 >
void otb::MRFSamplerRandomMAP< TInput1, TInput2 >::SetNumberOfClasses ( const unsigned int  nClasses)
inlineoverridevirtual

Reimplemented from otb::MRFSampler< TInput1, TInput2 >.

Definition at line 75 of file otbMRFSamplerRandomMAP.h.

Member Data Documentation

◆ m_EnergiesInvalid

template<class TInput1 , class TInput2 >
bool otb::MRFSamplerRandomMAP< TInput1, TInput2 >::m_EnergiesInvalid
private

Methods to cancel random effects.

Definition at line 172 of file otbMRFSamplerRandomMAP.h.

◆ m_Energy

template<class TInput1 , class TInput2 >
double* otb::MRFSamplerRandomMAP< TInput1, TInput2 >::m_Energy
private

Methods to cancel random effects.

Definition at line 171 of file otbMRFSamplerRandomMAP.h.

◆ m_Generator

template<class TInput1 , class TInput2 >
RandomGeneratorType::Pointer otb::MRFSamplerRandomMAP< TInput1, TInput2 >::m_Generator
private

Methods to cancel random effects.

Definition at line 173 of file otbMRFSamplerRandomMAP.h.

◆ m_RepartitionFunction

template<class TInput1 , class TInput2 >
double* otb::MRFSamplerRandomMAP< TInput1, TInput2 >::m_RepartitionFunction
private

Methods to cancel random effects.

Definition at line 170 of file otbMRFSamplerRandomMAP.h.


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