18 #ifndef itkGaborKernelFunction_h
19 #define itkGaborKernelFunction_h
49 template<
typename TRealValueType>
65 inline TRealValueType
Evaluate(
const TRealValueType & u)
const ITK_OVERRIDE
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
void PrintSelf(std::ostream &os, Indent indent) const override
virtual TRealValueType GetSigma() const
TRealValueType m_PhaseOffset
Kernel used for density estimation and nonparameteric regression.
void operator=(const Self &)
KernelFunctionBase< TRealValueType > Superclass
virtual TRealValueType GetFrequency() const
bool m_CalculateImaginaryPart
TRealValueType Evaluate(const TRealValueType &u) const override
virtual bool GetCalculateImaginaryPart() const
TRealValueType m_Frequency
virtual TRealValueType GetPhaseOffset() const
virtual void PrintSelf(std::ostream &os, Indent indent) const override
Control indentation during Print() invocation.