OTB  5.0.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
otb::MassOfBelief< TLabel, TMass > Class Template Reference

#include <otbMassOfBelief.h>

+ Inheritance diagram for otb::MassOfBelief< TLabel, TMass >:
+ Collaboration diagram for otb::MassOfBelief< TLabel, TMass >:

Public Types

typedef itk::SmartPointer
< const Self
ConstPointer
 
typedef std::set< LabelSetTypeLabelSetOfSetType
 
typedef std::set< LabelTypeLabelSetType
 
typedef TLabel LabelType
 
typedef std::map< LabelSetType,
MassType
MassMapType
 
typedef TMass MassType
 
typedef itk::SmartPointer< SelfPointer
 
typedef MassOfBelief Self
 
typedef itk::DataObject Superclass
 
- Public Types inherited from itk::DataObject
typedef SmartPointer< const SelfConstPointer
 
typedef std::string DataObjectIdentifierType
 
typedef std::vector< Pointer >
::size_type 
DataObjectPointerArraySizeType
 
typedef SmartPointer< SelfPointer
 
typedef DataObject 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

void Clear ()
 
void Copy (const Self *massOfBelief)
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
void EstimateUncertainty ()
 
MassType GetBelief (const LabelSetType &labelSet) const
 
MassType GetBelief (const LabelSetOfSetType &containedLabelSet) const
 
MassType GetMass (const LabelSetType &labelSet) const
 
virtual const char * GetNameOfClass () const
 
MassType GetPlausibility (const LabelSetType &labelSet) const
 
MassType GetPlausibility (const LabelSetOfSetType &intersectedLabelSet) const
 
LabelSetOfSetType GetSupport () const
 
LabelSetType GetUniverse () const
 
void InitializePowerSetMasses (const LabelSetType &universe)
 
bool IsEmpty () const
 
void Normalize ()
 
void RemoveMass (const LabelSetType &labelSet)
 
void SetMass (const LabelSetType &labelSet, const MassType &mass)
 
- Public Member Functions inherited from itk::DataObject
virtual void CopyInformation (const DataObject *)
 
virtual void DataHasBeenGenerated ()
 
void DisconnectPipeline ()
 
bool GetDataReleased () const
 
virtual const ModifiedTimeTypeGetPipelineMTime () const
 
virtual const RealTimeStampGetRealTimeStamp () const
 
virtual const bool & GetReleaseDataFlag () const
 
SmartPointerForwardReference
< ProcessObject
GetSource () const
 
DataObjectPointerArraySizeType GetSourceOutputIndex () const
 
const DataObjectIdentifierTypeGetSourceOutputName () const
 
virtual ModifiedTimeType GetUpdateMTime () const
 
virtual void Graft (const DataObject *)
 
virtual void Initialize ()
 
virtual void PrepareForNewData ()
 
virtual void PropagateRequestedRegion ()
 
void ReleaseData ()
 
virtual void ReleaseDataFlagOff ()
 
virtual void ReleaseDataFlagOn ()
 
virtual bool RequestedRegionIsOutsideOfTheBufferedRegion ()
 
virtual void ResetPipeline ()
 
void SetPipelineMTime (ModifiedTimeType time)
 
virtual void SetRealTimeStamp (RealTimeStamp _arg)
 
void SetReleaseDataFlag (bool flag)
 
virtual void SetRequestedRegion (const DataObject *)
 
virtual void SetRequestedRegionToLargestPossibleRegion ()
 
bool ShouldIReleaseData () const
 
virtual void Update ()
 
virtual void UpdateOutputData ()
 
virtual void UpdateOutputInformation ()
 
virtual bool VerifyRequestedRegion ()
 
- 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 (void) const
 
MetaDataDictionaryGetMetaDataDictionary (void)
 
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 ITK_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) ITK_OVERRIDE
 
virtual void UnRegister () const ITK_OVERRIDE
 
- 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 std::ostream & PrintLabelSet (std::ostream &out, const LabelSetType &labelSet)
 
static std::ostream & PrintLabelSetOfSet (std::ostream &out, const LabelSetOfSetType &labelSet)
 
- Static Public Member Functions inherited from itk::DataObject
static bool GetGlobalReleaseDataFlag ()
 
static void GlobalReleaseDataFlagOff ()
 
static void GlobalReleaseDataFlagOn ()
 
static void SetGlobalReleaseDataFlag (bool val)
 
- 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

 MassOfBelief ()
 
void PrintSelf (std::ostream &os, itk::Indent indent) const
 
virtual ~MassOfBelief ()
 
- Protected Member Functions inherited from itk::DataObject
 DataObject ()
 
virtual void PropagateResetPipeline ()
 
 ~DataObject ()
 
- 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 Member Functions

 MassOfBelief (const Self &)
 
void operator= (const Self &)
 

Private Attributes

MassMapType m_MassesMap
 

Additional Inherited Members

- Protected Types inherited from itk::LightObject
typedef int InternalReferenceCountType
 
- Protected Attributes inherited from itk::LightObject
InternalReferenceCountType m_ReferenceCount
 
SimpleFastMutexLock m_ReferenceCountLock
 

Detailed Description

template<class TLabel = unsigned short, class TMass = double>
class otb::MassOfBelief< TLabel, TMass >

This class represent a mass of belief function.

This class represent a Mass of Belief function to be used in Dempster-Shafer theory.

Template parameter TLabel is the type of the elements in the universe set, while TMass is the type of the mass. TLabel can be any type implementing ordering operator, while TMass should be a floating point type.

An element of the power-set is represented by the sub-type LabelSetType, which is a std::set<TLabel>.

A mass can be associated with a given element from the power set by calling the SetMass method. It is not necessary to associate masses with each element of the power set: mass is supposed to be null otherwise declared.

A mass associated with an element from the power-set can be removed using the RemoveMass method, and all masses can be cleared using the Clear() function.

The mass associated with a given element from the power-set can be retrieved using the GetMass method. If no mass has been associated with this element, null is returned.

The Normalize() method allows to normalize all masses so that they sum to 1. The EstimateUncertainty() method allows to associate to the uncertain set (i.e. the universe set) a mass so that all masses sum to 1.

The GetUniverse() method allows to retrieve the set of all symbols (i.e. the universal set), while the GetSupport() method allows to retrieve the set of all elements of the power-set for which a mass has been associated. This method returns a LabelSetOfSetType, which is a std::set<std::set<TLabel> >.

The mass function can be optionnaly initialized from a given universe set by building the power-set and associating a null mass with every elements of this power-set. This allows to ensure that two mass functions will share the exact same universe and power-set, but is not mandatory, since mass is supposed to be null for any set if not stated otherwise.

Once masses are set, the GetPlausibility() and GetBelief() function allow to compute the belief and plausibility for an element of the power-set, or directly for a set of elements of the power-set intersecting (resp. contained in) a given hypothesis.

Definition at line 87 of file otbMassOfBelief.h.

Member Typedef Documentation

template<class TLabel = unsigned short, class TMass = double>
typedef itk::SmartPointer<const Self> otb::MassOfBelief< TLabel, TMass >::ConstPointer

Definition at line 94 of file otbMassOfBelief.h.

template<class TLabel = unsigned short, class TMass = double>
typedef std::set<LabelSetType> otb::MassOfBelief< TLabel, TMass >::LabelSetOfSetType

Definition at line 106 of file otbMassOfBelief.h.

template<class TLabel = unsigned short, class TMass = double>
typedef std::set<LabelType> otb::MassOfBelief< TLabel, TMass >::LabelSetType

Definition at line 104 of file otbMassOfBelief.h.

template<class TLabel = unsigned short, class TMass = double>
typedef TLabel otb::MassOfBelief< TLabel, TMass >::LabelType

Definition at line 100 of file otbMassOfBelief.h.

template<class TLabel = unsigned short, class TMass = double>
typedef std::map<LabelSetType, MassType> otb::MassOfBelief< TLabel, TMass >::MassMapType

Definition at line 105 of file otbMassOfBelief.h.

template<class TLabel = unsigned short, class TMass = double>
typedef TMass otb::MassOfBelief< TLabel, TMass >::MassType

Definition at line 103 of file otbMassOfBelief.h.

template<class TLabel = unsigned short, class TMass = double>
typedef itk::SmartPointer<Self> otb::MassOfBelief< TLabel, TMass >::Pointer

Definition at line 93 of file otbMassOfBelief.h.

template<class TLabel = unsigned short, class TMass = double>
typedef MassOfBelief otb::MassOfBelief< TLabel, TMass >::Self

Standard class typedefs

Definition at line 91 of file otbMassOfBelief.h.

template<class TLabel = unsigned short, class TMass = double>
typedef itk::DataObject otb::MassOfBelief< TLabel, TMass >::Superclass

Definition at line 92 of file otbMassOfBelief.h.

Constructor & Destructor Documentation

template<class TLabel = unsigned short, class TMass = double>
otb::MassOfBelief< TLabel, TMass >::MassOfBelief ( )
inlineprotected

Constructor

Definition at line 177 of file otbMassOfBelief.h.

template<class TLabel = unsigned short, class TMass = double>
virtual otb::MassOfBelief< TLabel, TMass >::~MassOfBelief ( )
inlineprotectedvirtual

Desctructor

Definition at line 180 of file otbMassOfBelief.h.

template<class TLabel = unsigned short, class TMass = double>
otb::MassOfBelief< TLabel, TMass >::MassOfBelief ( const Self )
private

Member Function Documentation

template<class TLabel , class TMass >
void otb::MassOfBelief< TLabel, TMass >::Clear ( void  )

Clear all masses

Definition at line 193 of file otbMassOfBelief.txx.

template<class TLabel , class TMass >
void otb::MassOfBelief< TLabel, TMass >::Copy ( const Self massOfBelief)

Copy masses of two mass functions

Definition at line 350 of file otbMassOfBelief.txx.

template<class TLabel = unsigned short, class TMass = double>
virtual::itk::LightObject::Pointer otb::MassOfBelief< TLabel, TMass >::CreateAnother ( void  ) const
virtual

Reimplemented from itk::Object.

template<class TLabel , class TMass >
void otb::MassOfBelief< TLabel, TMass >::EstimateUncertainty ( )

Associate to uncertainty a mass such that the sum of masses equals 1

Definition at line 161 of file otbMassOfBelief.txx.

template<class TLabel , class TMass >
MassOfBelief< TLabel, TMass >::MassType otb::MassOfBelief< TLabel, TMass >::GetBelief ( const LabelSetType labelSet) const

Get the belief of a given element of the power-set

Definition at line 242 of file otbMassOfBelief.txx.

template<class TLabel , class TMass >
MassOfBelief< TLabel, TMass >::MassType otb::MassOfBelief< TLabel, TMass >::GetBelief ( const LabelSetOfSetType containedLabelSet) const

Get the belief for an hypothesis containing a given set of elements from the power-set

Definition at line 311 of file otbMassOfBelief.txx.

template<class TLabel , class TMass >
MassOfBelief< TLabel, TMass >::MassType otb::MassOfBelief< TLabel, TMass >::GetMass ( const LabelSetType labelSet) const

Retrieve the mass associated with the given element of the power set

Definition at line 60 of file otbMassOfBelief.txx.

template<class TLabel = unsigned short, class TMass = double>
virtual const char* otb::MassOfBelief< TLabel, TMass >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::DataObject.

template<class TLabel , class TMass >
MassOfBelief< TLabel, TMass >::MassType otb::MassOfBelief< TLabel, TMass >::GetPlausibility ( const LabelSetType labelSet) const

Get the plausibility of a given element of the power-set

Definition at line 277 of file otbMassOfBelief.txx.

template<class TLabel , class TMass >
MassOfBelief< TLabel, TMass >::MassType otb::MassOfBelief< TLabel, TMass >::GetPlausibility ( const LabelSetOfSetType intersectedLabelSet) const

Get the belief for an hypothesis intersecting a given set of elements from the power set.

Definition at line 331 of file otbMassOfBelief.txx.

template<class TLabel , class TMass >
MassOfBelief< TLabel, TMass >::LabelSetOfSetType otb::MassOfBelief< TLabel, TMass >::GetSupport ( ) const

Retrieve the support of the mass of belief (i.e. a vector of element of the power set for which the mass of belief is not null)

Definition at line 79 of file otbMassOfBelief.txx.

template<class TLabel , class TMass >
MassOfBelief< TLabel, TMass >::LabelSetType otb::MassOfBelief< TLabel, TMass >::GetUniverse ( ) const

Get the set of universe symbols for this mass function

Definition at line 102 of file otbMassOfBelief.txx.

template<class TLabel , class TMass >
void otb::MassOfBelief< TLabel, TMass >::InitializePowerSetMasses ( const LabelSetType universe)

Initialize with all elements from the power set with null masses. Please note that this is not mandatory and only allows to ensure that two mass functions share the same universe, even if most of masses are null.

Definition at line 201 of file otbMassOfBelief.txx.

template<class TLabel , class TMass >
bool otb::MassOfBelief< TLabel, TMass >::IsEmpty ( ) const

Return true if the support set is null

Definition at line 362 of file otbMassOfBelief.txx.

template<class TLabel = unsigned short, class TMass = double>
static Pointer otb::MassOfBelief< TLabel, TMass >::New ( )
static

Method for creation through the object factory.

template<class TLabel , class TMass >
void otb::MassOfBelief< TLabel, TMass >::Normalize ( void  )

Normalize mass set sot that the sum of masses equals 1

Definition at line 132 of file otbMassOfBelief.txx.

template<class TLabel = unsigned short, class TMass = double>
void otb::MassOfBelief< TLabel, TMass >::operator= ( const Self )
private
template<class TLabel , class TMass >
std::ostream & otb::MassOfBelief< TLabel, TMass >::PrintLabelSet ( std::ostream &  out,
const LabelSetType labelSet 
)
static

Define a Print static method for label sets Do not overload << for std::set since it causes namespace issues.

Definition at line 399 of file otbMassOfBelief.txx.

template<class TLabel , class TMass >
std::ostream & otb::MassOfBelief< TLabel, TMass >::PrintLabelSetOfSet ( std::ostream &  out,
const LabelSetOfSetType labelSet 
)
static

Define a Print static method for label sets Do not overload << for std::set since it causes namespace issues.

Definition at line 427 of file otbMassOfBelief.txx.

template<class TLabel , class TMass >
void otb::MassOfBelief< TLabel, TMass >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
protectedvirtual

PrintSelf method

Reimplemented from itk::DataObject.

Definition at line 370 of file otbMassOfBelief.txx.

template<class TLabel , class TMass >
void otb::MassOfBelief< TLabel, TMass >::RemoveMass ( const LabelSetType labelSet)

Remove mass from the support

Definition at line 46 of file otbMassOfBelief.txx.

template<class TLabel , class TMass >
void otb::MassOfBelief< TLabel, TMass >::SetMass ( const LabelSetType labelSet,
const MassType mass 
)

Register a mass associated with an element of the power-set

Definition at line 34 of file otbMassOfBelief.txx.

Member Data Documentation

template<class TLabel = unsigned short, class TMass = double>
MassMapType otb::MassOfBelief< TLabel, TMass >::m_MassesMap
private

The masses map

Definition at line 190 of file otbMassOfBelief.h.


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