18 #ifndef itkGaborKernelFunction_h
19 #define itkGaborKernelFunction_h
49 template<
typename TRealValueType >
67 TRealValueType
Evaluate(
const TRealValueType & u)
const override
69 TRealValueType parameter = itk::Math::sqr(u / this->
m_Sigma);
70 TRealValueType envelope = std::exp(static_cast< TRealValueType >(-0.5) * parameter);
77 return envelope * std::sin(phase);
81 return envelope * std::cos(phase);
86 itkSetMacro(Sigma, TRealValueType);
87 itkGetConstMacro(Sigma, TRealValueType);
91 itkSetMacro(Frequency, TRealValueType);
92 itkGetConstMacro(Frequency, TRealValueType);
96 itkSetMacro(PhaseOffset, TRealValueType);
97 itkGetConstMacro(PhaseOffset, TRealValueType);
102 itkSetMacro(CalculateImaginaryPart,
bool);
103 itkGetConstMacro(CalculateImaginaryPart,
bool);
104 itkBooleanMacro(CalculateImaginaryPart);
112 this->
m_Frequency =
static_cast<TRealValueType
>(0.4);
120 os << indent <<
"Sigma: " << this->
GetSigma() << std::endl;
121 os << indent <<
"Frequency: " << this->
GetFrequency() << std::endl;
122 os << indent <<
"PhaseOffset: " << this->
GetPhaseOffset() << std::endl;
Gabor kernel used for various computer vision tasks.
Define numeric traits for std::vector.
void PrintSelf(std::ostream &os, Indent indent) const override
static constexpr double pi
virtual TRealValueType GetSigma() const
TRealValueType m_PhaseOffset
Kernel used for density estimation and nonparameteric regression.
virtual TRealValueType GetFrequency() const
bool m_CalculateImaginaryPart
TRealValueType Evaluate(const TRealValueType &u) const override
virtual bool GetCalculateImaginaryPart() const
TRealValueType m_Frequency
~GaborKernelFunction() override=default
virtual TRealValueType GetPhaseOffset() const
Control indentation during Print() invocation.
void PrintSelf(std::ostream &os, Indent indent) const override