18 #ifndef __itkGaborKernelFunction_h
19 #define __itkGaborKernelFunction_h
49 template<
typename TRealValueType>
65 inline TRealValueType
Evaluate(
const TRealValueType & u)
const
67 TRealValueType parameter = vnl_math_sqr(u / this->
m_Sigma);
68 TRealValueType envelope = std::exp(static_cast< TRealValueType >(-0.5) * parameter);
75 return envelope * std::sin(phase);
79 return envelope * std::cos(phase);
83 itkSetMacro(Sigma, TRealValueType);
84 itkGetConstMacro(Sigma, TRealValueType);
86 itkSetMacro(Frequency, TRealValueType);
87 itkGetConstMacro(Frequency, TRealValueType);
89 itkSetMacro(PhaseOffset, TRealValueType);
90 itkGetConstMacro(PhaseOffset, TRealValueType);
92 itkSetMacro(CalculateImaginaryPart,
bool);
93 itkGetConstMacro(CalculateImaginaryPart,
bool);
94 itkBooleanMacro(CalculateImaginaryPart);
101 this->
m_Frequency =
static_cast<TRealValueType
>(0.4);
109 os << indent <<
"Sigma: " << this->
GetSigma() << std::endl;
110 os << indent <<
"Frequency: " << this->
GetFrequency() << std::endl;
111 os << indent <<
"PhaseOffset: " << this->
GetPhaseOffset() << std::endl;
Gabor kernel used for various computer vision tasks.
SmartPointer< Self > Pointer
TRealValueType Evaluate(const TRealValueType &u) const
virtual TRealValueType GetSigma() const
TRealValueType m_PhaseOffset
Kernel used for density estimation and nonparameteric regression.
void PrintSelf(std::ostream &os, Indent indent) const
void operator=(const Self &)
KernelFunctionBase< TRealValueType > Superclass
virtual TRealValueType GetFrequency() const
bool m_CalculateImaginaryPart
void PrintSelf(std::ostream &os, Indent indent) const
virtual bool GetCalculateImaginaryPart() const
TRealValueType m_Frequency
virtual TRealValueType GetPhaseOffset() const
Control indentation during Print() invocation.
Define additional traits for native types such as int or float.