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

#include <otbFuzzyVariable.h>

+ Inheritance diagram for otb::FuzzyVariable< TLabel, TPrecision >:
+ Collaboration diagram for otb::FuzzyVariable< TLabel, TPrecision >:

Public Types

typedef itk::SmartPointer< const SelfConstPointer
 
typedef TLabel LabelType
 
typedef std::map< LabelType, PrecisionTypeMembershipValueType
 
typedef std::map< LabelType, ParametersTypeParametersMapType
 
typedef itk::FixedArray< PrecisionType, 6 > ParametersType
 
typedef itk::SmartPointer< SelfPointer
 
typedef TPrecision PrecisionType
 
typedef FuzzyVariable Self
 
typedef itk::DataObject Superclass
 

Public Member Functions

void Clear ()
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
LabelType GetMaxVar (const PrecisionType &value) const
 
PrecisionType GetMembership (const LabelType &var, const PrecisionType &value) const
 
MembershipValueType GetMembership (const PrecisionType &value) const
 
virtual const char * GetNameOfClass () const
 
void RemoveMembership (const LabelType &var)
 
void SetMembership (const LabelType &var, const PrecisionType &v1, const PrecisionType &v2, const PrecisionType &v3, const PrecisionType &v4)
 
void SetMembership (const LabelType &var, const PrecisionType &v1, const PrecisionType &v2, const PrecisionType &v3, const PrecisionType &v4, const PrecisionType &min, const PrecisionType &max)
 

Static Public Member Functions

static Pointer New ()
 
static std::ostream & PrintMembershipValueType (std::ostream &out, const MembershipValueType &membership)
 

Protected Member Functions

 FuzzyVariable ()
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
 ~FuzzyVariable () override
 

Private Attributes

ParametersMapType m_MembershipFunctions
 

Detailed Description

template<class TLabel = unsigned short, class TPrecision = double>
class otb::FuzzyVariable< TLabel, TPrecision >

Class to represent a fuzzy N-valued variable.

A fuzzy variable is defined as a set of qualitative values for a magnitude. These values are ordered, as for instance Low, Medium, High. The semantics are not used here. This class holds a vector where each component is the membership value for each one of the qualitative values of the variable (MEDIUM = 0.9). Each membership function is modeled by a trapezoidal function for which 4 values have to be provided. In addition, 2 more values can be provided to define the min and the max. By default, they are 0 and 1 respectively.

Definition at line 47 of file otbFuzzyVariable.h.

Member Typedef Documentation

◆ ConstPointer

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

Definition at line 54 of file otbFuzzyVariable.h.

◆ LabelType

template<class TLabel = unsigned short, class TPrecision = double>
typedef TLabel otb::FuzzyVariable< TLabel, TPrecision >::LabelType

Label typedef

Definition at line 60 of file otbFuzzyVariable.h.

◆ MembershipValueType

template<class TLabel = unsigned short, class TPrecision = double>
typedef std::map<LabelType, PrecisionType> otb::FuzzyVariable< TLabel, TPrecision >::MembershipValueType

Type to hold the membership values

Definition at line 69 of file otbFuzzyVariable.h.

◆ ParametersMapType

template<class TLabel = unsigned short, class TPrecision = double>
typedef std::map<LabelType, ParametersType> otb::FuzzyVariable< TLabel, TPrecision >::ParametersMapType

Definition at line 71 of file otbFuzzyVariable.h.

◆ ParametersType

template<class TLabel = unsigned short, class TPrecision = double>
typedef itk::FixedArray<PrecisionType, 6> otb::FuzzyVariable< TLabel, TPrecision >::ParametersType

Definition at line 70 of file otbFuzzyVariable.h.

◆ Pointer

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

Definition at line 53 of file otbFuzzyVariable.h.

◆ PrecisionType

template<class TLabel = unsigned short, class TPrecision = double>
typedef TPrecision otb::FuzzyVariable< TLabel, TPrecision >::PrecisionType

Precision typedef

Definition at line 66 of file otbFuzzyVariable.h.

◆ Self

template<class TLabel = unsigned short, class TPrecision = double>
typedef FuzzyVariable otb::FuzzyVariable< TLabel, TPrecision >::Self

Standard class typedefs

Definition at line 51 of file otbFuzzyVariable.h.

◆ Superclass

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

Definition at line 52 of file otbFuzzyVariable.h.

Constructor & Destructor Documentation

◆ FuzzyVariable()

template<class TLabel , class TPrecision >
otb::FuzzyVariable< TLabel, TPrecision >::FuzzyVariable
protected

Constructor

Definition at line 32 of file otbFuzzyVariable.hxx.

◆ ~FuzzyVariable()

template<class TLabel = unsigned short, class TPrecision = double>
otb::FuzzyVariable< TLabel, TPrecision >::~FuzzyVariable ( )
inlineoverrideprotected

Destructor

Definition at line 103 of file otbFuzzyVariable.h.

Member Function Documentation

◆ Clear()

template<class TLabel , class TPrecision >
void otb::FuzzyVariable< TLabel, TPrecision >::Clear

Clear all memberships

Definition at line 97 of file otbFuzzyVariable.hxx.

◆ CreateAnother()

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

◆ GetMaxVar()

template<class TLabel , class TPrecision >
FuzzyVariable< TLabel, TPrecision >::LabelType otb::FuzzyVariable< TLabel, TPrecision >::GetMaxVar ( const PrecisionType value) const

Get the label with the highest membership

Definition at line 180 of file otbFuzzyVariable.hxx.

◆ GetMembership() [1/2]

template<class TLabel , class TPrecision >
FuzzyVariable< TLabel, TPrecision >::PrecisionType otb::FuzzyVariable< TLabel, TPrecision >::GetMembership ( const LabelType var,
const PrecisionType value 
) const

Get the membership related to one label

Definition at line 108 of file otbFuzzyVariable.hxx.

◆ GetMembership() [2/2]

template<class TLabel , class TPrecision >
FuzzyVariable< TLabel, TPrecision >::MembershipValueType otb::FuzzyVariable< TLabel, TPrecision >::GetMembership ( const PrecisionType value) const

Get all the memberships

Definition at line 163 of file otbFuzzyVariable.hxx.

◆ GetNameOfClass()

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

Run-time type information (and related methods).

◆ New()

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

Method for creation through the object factory.

Referenced by otb::Functor::LandsatTM::LinguisticVariables< TInput >::LinguisticVariables().

◆ PrintMembershipValueType()

template<class TLabel , class TPrecision >
std::ostream & otb::FuzzyVariable< TLabel, TPrecision >::PrintMembershipValueType ( std::ostream &  out,
const MembershipValueType membership 
)
static

Print a MembershipValueType

Definition at line 220 of file otbFuzzyVariable.hxx.

◆ PrintSelf()

template<class TLabel , class TPrecision >
void otb::FuzzyVariable< TLabel, TPrecision >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotected

PrintSelf method

Definition at line 214 of file otbFuzzyVariable.hxx.

◆ RemoveMembership()

template<class TLabel , class TPrecision >
void otb::FuzzyVariable< TLabel, TPrecision >::RemoveMembership ( const LabelType var)

Remove a given label from the membership table

Definition at line 87 of file otbFuzzyVariable.hxx.

◆ SetMembership() [1/2]

template<class TLabel , class TPrecision >
void otb::FuzzyVariable< TLabel, TPrecision >::SetMembership ( const LabelType var,
const PrecisionType v1,
const PrecisionType v2,
const PrecisionType v3,
const PrecisionType v4 
)

Set the membership for a given Label

Definition at line 37 of file otbFuzzyVariable.hxx.

◆ SetMembership() [2/2]

template<class TLabel , class TPrecision >
void otb::FuzzyVariable< TLabel, TPrecision >::SetMembership ( const LabelType var,
const PrecisionType v1,
const PrecisionType v2,
const PrecisionType v3,
const PrecisionType v4,
const PrecisionType min,
const PrecisionType max 
)

Definition at line 61 of file otbFuzzyVariable.hxx.

Member Data Documentation

◆ m_MembershipFunctions

template<class TLabel = unsigned short, class TPrecision = double>
ParametersMapType otb::FuzzyVariable< TLabel, TPrecision >::m_MembershipFunctions
private

Map containing the membership functions

Definition at line 112 of file otbFuzzyVariable.h.


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