DGtal  0.9.3
Public Member Functions | Data Fields | Private Attributes
DGtal::functors::GaussianKernel Struct Reference

#include <DGtal/base/BasicFunctors.h>

Public Member Functions

 GaussianKernel (const double aSigma)
double operator() (const double aVal) const

Data Fields

double mySigma
double myCoef

Private Attributes

double myCoef2

Detailed Description

Aim: defines a functor on double numbers which corresponds to a Gaussian convolution kernel. This functor acts from [0,1] to [0,1].

Description of class 'GaussianKernel'

Definition at line 820 of file BasicFunctors.h.

Constructor & Destructor Documentation

◆ GaussianKernel()

DGtal::functors::GaussianKernel::GaussianKernel ( const double  aSigma)


[in]aSigmathe sigma parameter of the Gaussian function.

Definition at line 827 of file BasicFunctors.h.

827  :mySigma(aSigma)
828  {
829  myCoef = 1.0/(mySigma * sqrt(2.0*M_PI));
830  myCoef2 = 1.0/(2.0*M_PI);
831  }
double mySigma
Sigma parameter.
double myCoef
Temporary variable.
double myCoef2
Temporary variable.

Member Function Documentation

◆ operator()()

double DGtal::functors::GaussianKernel::operator() ( const double  aVal) const
the Gaussian value at point aVal
[in]aVala value between 0 and 1.

Definition at line 838 of file BasicFunctors.h.

839  {
840  ASSERT((aVal <= 1) && (aVal>=0));
841  return myCoef*exp(-aVal*aVal*myCoef2);
842  }
double myCoef
Temporary variable.
double myCoef2
Temporary variable.

Field Documentation

◆ myCoef

double DGtal::functors::GaussianKernel::myCoef

Temporary variable.

Definition at line 848 of file BasicFunctors.h.

◆ myCoef2

double DGtal::functors::GaussianKernel::myCoef2

Temporary variable.

Definition at line 851 of file BasicFunctors.h.

◆ mySigma

double DGtal::functors::GaussianKernel::mySigma

Sigma parameter.

Definition at line 845 of file BasicFunctors.h.

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