OTB  6.7.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | 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 Self
ConstPointer
 
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 Self
ConstPointer
 
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 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 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
 
void InitializeSeed (int seed)
 
void InitializeSeed ()
 
- 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)
 
- 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 Modified () 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
 

Static Public Member Functions

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 Member Functions

 MRFSamplerRandomMAP ()
 
 ~MRFSamplerRandomMAP () override
 
- Protected Member Functions inherited from otb::MRFSampler< TInput1, TInput2 >
 MRFSampler ()
 
 ~MRFSampler () override
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void PrintSelf (std::ostream &os, Indent indent) const override
 
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

bool m_EnergiesInvalid
 
double * m_Energy
 
RandomGeneratorType::Pointer m_Generator
 
double * m_RepartitionFunction
 

Additional Inherited Members

- 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
 
- Protected Attributes inherited from itk::LightObject
AtomicInt< int > m_ReferenceCount
 

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

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

Definition at line 60 of file otbMRFSamplerRandomMAP.h.

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

Definition at line 68 of file otbMRFSamplerRandomMAP.h.

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

Definition at line 66 of file otbMRFSamplerRandomMAP.h.

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

Definition at line 69 of file otbMRFSamplerRandomMAP.h.

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

Definition at line 67 of file otbMRFSamplerRandomMAP.h.

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

Definition at line 62 of file otbMRFSamplerRandomMAP.h.

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

Definition at line 65 of file otbMRFSamplerRandomMAP.h.

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

Definition at line 63 of file otbMRFSamplerRandomMAP.h.

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

Definition at line 64 of file otbMRFSamplerRandomMAP.h.

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

Definition at line 59 of file otbMRFSamplerRandomMAP.h.

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

Definition at line 70 of file otbMRFSamplerRandomMAP.h.

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

Definition at line 57 of file otbMRFSamplerRandomMAP.h.

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

Definition at line 58 of file otbMRFSamplerRandomMAP.h.

Constructor & Destructor Documentation

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

Definition at line 163 of file otbMRFSamplerRandomMAP.h.

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

Definition at line 171 of file otbMRFSamplerRandomMAP.h.

Member Function Documentation

template<class TInput1 , class TInput2 >
int otb::MRFSamplerRandomMAP< TInput1, TInput2 >::Compute ( const InputImageNeighborhoodIterator itData,
const LabelledImageNeighborhoodIterator itRegul 
)
inlineoverridevirtual
template<class TInput1 , class TInput2 >
virtual::itk::LightObject::Pointer otb::MRFSamplerRandomMAP< TInput1, TInput2 >::CreateAnother ( void  ) const
virtual

Reimplemented from itk::Object.

template<class TInput1 , class TInput2 >
virtual const char* otb::MRFSamplerRandomMAP< TInput1, TInput2 >::GetNameOfClass ( ) const
virtual
template<class TInput1 , class TInput2 >
void otb::MRFSamplerRandomMAP< TInput1, TInput2 >::InitializeSeed ( int  seed)
inline

Methods to cancel random effects.

Definition at line 151 of file otbMRFSamplerRandomMAP.h.

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

Methods to cancel random effects.

Definition at line 155 of file otbMRFSamplerRandomMAP.h.

template<class TInput1 , class TInput2 >
static Pointer otb::MRFSamplerRandomMAP< TInput1, TInput2 >::New ( )
static
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 76 of file otbMRFSamplerRandomMAP.h.

Member Data Documentation

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

Definition at line 180 of file otbMRFSamplerRandomMAP.h.

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

Definition at line 179 of file otbMRFSamplerRandomMAP.h.

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

Definition at line 181 of file otbMRFSamplerRandomMAP.h.

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

Definition at line 178 of file otbMRFSamplerRandomMAP.h.


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