OTB  6.7.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::GaborFilterGenerator< TPrecision > Class Template Reference

#include <otbGaborFilterGenerator.h>

+ Inheritance diagram for otb::GaborFilterGenerator< TPrecision >:
+ Collaboration diagram for otb::GaborFilterGenerator< TPrecision >:

Public Types

typedef itk::Array< PrecisionTypeArrayType
 
typedef itk::SmartPointer
< const Self
ConstPointer
 
typedef itk::SmartPointer< SelfPointer
 
typedef TPrecision PrecisionType
 
typedef itk::Size< 2 > RadiusType
 
typedef GaborFilterGenerator 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

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
const ArrayTypeGetFilter ()
 
virtual const char * GetNameOfClass () const
 
virtual void SetA (PrecisionType _arg)
 
virtual PrecisionType GetA ()
 
virtual void SetB (PrecisionType _arg)
 
virtual PrecisionType GetB ()
 
virtual void SetTheta (PrecisionType _arg)
 
virtual PrecisionType GetTheta ()
 
virtual void SetPhi (PrecisionType _arg)
 
virtual PrecisionType GetPhi ()
 
virtual void SetU0 (PrecisionType _arg)
 
virtual PrecisionType GetU0 ()
 
virtual void SetV0 (PrecisionType _arg)
 
virtual PrecisionType GetV0 ()
 
virtual void SetRadius (RadiusType _arg)
 
virtual const RadiusTypeGetRadius () const
 
- 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
 

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

 GaborFilterGenerator ()
 
void GenerateFilter ()
 
void Modified () const override
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
 ~GaborFilterGenerator () override
 
- 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

 GaborFilterGenerator (const Self &)=delete
 
void operator= (const Self &)=delete
 

Private Attributes

PrecisionType m_A
 
PrecisionType m_B
 
ArrayType m_Filter
 
bool m_NeedToRegenerateFilter
 
PrecisionType m_Phi
 
RadiusType m_Radius
 
PrecisionType m_Theta
 
PrecisionType m_U0
 
PrecisionType m_V0
 

Additional Inherited Members

- Protected Attributes inherited from itk::LightObject
AtomicInt< int > m_ReferenceCount
 

Detailed Description

template<class TPrecision>
class otb::GaborFilterGenerator< TPrecision >

This class allows generating a gabor filter convolution mask. The mask is stored in a linear buffer of type itk::Array returned by the GetFilter() method.

When calling the GetFilter() method, if the filter has to be regenerated, it will be done seamlessly.

Gabor filters are commonly used in image processing for textures description for instance The complex Gabor function is the product in spatial domain of a complex sinusoidal, also known as the carrier, and a gaussian-shaped function, also knwown as the envelop.

Please note that this helper class generates a filter whose coefficients are the real part of a complex Gabor function.

The formula used to compute these coefficients is as follows:

$ g(x, y) = \exp\Big(-\pi((a x_\theta)^{2} +(b y_\theta)^{2})\Big) * \cos\big(2\pi(u_0*x + v_0*y)+\phi\big) $

with:

$ x_\theta = x \cos(\theta)+y \sin(\theta) $ and $ y_\theta = y \cos(\theta)-x \sin(\theta) $

Where:

Definition at line 73 of file otbGaborFilterGenerator.h.

Member Typedef Documentation

template<class TPrecision >
typedef itk::Array<PrecisionType> otb::GaborFilterGenerator< TPrecision >::ArrayType

Definition at line 89 of file otbGaborFilterGenerator.h.

template<class TPrecision >
typedef itk::SmartPointer<const Self> otb::GaborFilterGenerator< TPrecision >::ConstPointer

Definition at line 81 of file otbGaborFilterGenerator.h.

template<class TPrecision >
typedef itk::SmartPointer<Self> otb::GaborFilterGenerator< TPrecision >::Pointer

Definition at line 80 of file otbGaborFilterGenerator.h.

template<class TPrecision >
typedef TPrecision otb::GaborFilterGenerator< TPrecision >::PrecisionType

Definition at line 85 of file otbGaborFilterGenerator.h.

template<class TPrecision >
typedef itk::Size<2> otb::GaborFilterGenerator< TPrecision >::RadiusType

Definition at line 90 of file otbGaborFilterGenerator.h.

template<class TPrecision >
typedef GaborFilterGenerator otb::GaborFilterGenerator< TPrecision >::Self

Definition at line 78 of file otbGaborFilterGenerator.h.

template<class TPrecision >
typedef itk::Object otb::GaborFilterGenerator< TPrecision >::Superclass

Definition at line 79 of file otbGaborFilterGenerator.h.

Constructor & Destructor Documentation

template<class TPrecision >
otb::GaborFilterGenerator< TPrecision >::GaborFilterGenerator ( )
protected

constructor

Definition at line 32 of file otbGaborFilterGenerator.hxx.

template<class TPrecision >
otb::GaborFilterGenerator< TPrecision >::~GaborFilterGenerator ( )
inlineoverrideprotected

destructor

Definition at line 117 of file otbGaborFilterGenerator.h.

template<class TPrecision >
otb::GaborFilterGenerator< TPrecision >::GaborFilterGenerator ( const Self )
privatedelete

Member Function Documentation

template<class TPrecision >
virtual::itk::LightObject::Pointer otb::GaborFilterGenerator< TPrecision >::CreateAnother ( void  ) const
virtual

Reimplemented from itk::Object.

template<class TPrecision >
void otb::GaborFilterGenerator< TPrecision >::GenerateFilter ( )
protected

Generate the filter coefficients

Definition at line 59 of file otbGaborFilterGenerator.hxx.

References otb::CONST_2PI, otb::CONST_PI, and otb::CONST_PI_180.

template<class TPrecision >
virtual PrecisionType otb::GaborFilterGenerator< TPrecision >::GetA ( )
virtual

Setters/Getters

template<class TPrecision >
virtual PrecisionType otb::GaborFilterGenerator< TPrecision >::GetB ( )
virtual

Setters/Getters

template<class TPrecision >
const GaborFilterGenerator< TPrecision >::ArrayType & otb::GaborFilterGenerator< TPrecision >::GetFilter ( )

Get The generated filter

Definition at line 47 of file otbGaborFilterGenerator.hxx.

template<class TPrecision >
virtual const char* otb::GaborFilterGenerator< TPrecision >::GetNameOfClass ( ) const
virtual

Reimplemented from itk::Object.

template<class TPrecision >
virtual PrecisionType otb::GaborFilterGenerator< TPrecision >::GetPhi ( )
virtual

Setters/Getters

template<class TPrecision >
virtual const RadiusType& otb::GaborFilterGenerator< TPrecision >::GetRadius ( ) const
virtual

Setters/Getters

template<class TPrecision >
virtual PrecisionType otb::GaborFilterGenerator< TPrecision >::GetTheta ( )
virtual

Setters/Getters

template<class TPrecision >
virtual PrecisionType otb::GaborFilterGenerator< TPrecision >::GetU0 ( )
virtual

Setters/Getters

template<class TPrecision >
virtual PrecisionType otb::GaborFilterGenerator< TPrecision >::GetV0 ( )
virtual

Setters/Getters

template<class TPrecision >
void otb::GaborFilterGenerator< TPrecision >::Modified ( void  ) const
overrideprotectedvirtual

Reimplement the Modified() method to set the NeedToGenerateFilter to true

Reimplemented from itk::Object.

Definition at line 89 of file otbGaborFilterGenerator.hxx.

template<class TPrecision >
static Pointer otb::GaborFilterGenerator< TPrecision >::New ( )
static
template<class TPrecision >
void otb::GaborFilterGenerator< TPrecision >::operator= ( const Self )
privatedelete
template<class TPrecision >
void otb::GaborFilterGenerator< TPrecision >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotectedvirtual

PrintSelf method

Reimplemented from itk::Object.

Definition at line 98 of file otbGaborFilterGenerator.hxx.

template<class TPrecision >
virtual void otb::GaborFilterGenerator< TPrecision >::SetA ( PrecisionType  _arg)
virtual

Setters/Getters

template<class TPrecision >
virtual void otb::GaborFilterGenerator< TPrecision >::SetB ( PrecisionType  _arg)
virtual

Setters/Getters

template<class TPrecision >
virtual void otb::GaborFilterGenerator< TPrecision >::SetPhi ( PrecisionType  _arg)
virtual

Setters/Getters

template<class TPrecision >
virtual void otb::GaborFilterGenerator< TPrecision >::SetRadius ( RadiusType  _arg)
virtual

Setters/Getters

template<class TPrecision >
virtual void otb::GaborFilterGenerator< TPrecision >::SetTheta ( PrecisionType  _arg)
virtual

Setters/Getters

template<class TPrecision >
virtual void otb::GaborFilterGenerator< TPrecision >::SetU0 ( PrecisionType  _arg)
virtual

Setters/Getters

template<class TPrecision >
virtual void otb::GaborFilterGenerator< TPrecision >::SetV0 ( PrecisionType  _arg)
virtual

Setters/Getters

Member Data Documentation

template<class TPrecision >
PrecisionType otb::GaborFilterGenerator< TPrecision >::m_A
private

Gabor parameters

Definition at line 137 of file otbGaborFilterGenerator.h.

template<class TPrecision >
PrecisionType otb::GaborFilterGenerator< TPrecision >::m_B
private

Definition at line 138 of file otbGaborFilterGenerator.h.

template<class TPrecision >
ArrayType otb::GaborFilterGenerator< TPrecision >::m_Filter
private

Output filter coefficient array

Definition at line 145 of file otbGaborFilterGenerator.h.

template<class TPrecision >
bool otb::GaborFilterGenerator< TPrecision >::m_NeedToRegenerateFilter
mutableprivate

Whether we need to regenerate the filter

Definition at line 148 of file otbGaborFilterGenerator.h.

template<class TPrecision >
PrecisionType otb::GaborFilterGenerator< TPrecision >::m_Phi
private

Definition at line 142 of file otbGaborFilterGenerator.h.

template<class TPrecision >
RadiusType otb::GaborFilterGenerator< TPrecision >::m_Radius
private

Radius of the filter

Definition at line 134 of file otbGaborFilterGenerator.h.

template<class TPrecision >
PrecisionType otb::GaborFilterGenerator< TPrecision >::m_Theta
private

Definition at line 139 of file otbGaborFilterGenerator.h.

template<class TPrecision >
PrecisionType otb::GaborFilterGenerator< TPrecision >::m_U0
private

Definition at line 140 of file otbGaborFilterGenerator.h.

template<class TPrecision >
PrecisionType otb::GaborFilterGenerator< TPrecision >::m_V0
private

Definition at line 141 of file otbGaborFilterGenerator.h.


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