22 #ifndef otbGaborFilterGenerator_hxx
23 #define otbGaborFilterGenerator_hxx
30 template <
class TPrecision>
40 m_NeedToRegenerateFilter =
true;
42 template <
class TPrecision>
45 if (m_NeedToRegenerateFilter)
47 this->GenerateFilter();
52 template <
class TPrecision>
55 m_Filter.SetSize((2 * m_Radius[0] + 1) * (2 * m_Radius[1] + 1));
68 xr = x * costheta + y * sintheta;
69 yr = y * costheta - x * sintheta;
70 coef = std::exp(-
CONST_PI * (std::pow(m_A * xr, 2) + std::pow(m_B * yr, 2))) * cos(
CONST_2PI * (m_U0 * x + m_V0 * y) + m_Phi);
71 m_Filter.SetElement(k, coef);
77 template <
class TPrecision>
80 this->Superclass::Modified();
81 m_NeedToRegenerateFilter =
true;
84 template <
class TPrecision>
87 Superclass::PrintSelf(os, indent);
88 os << indent <<
"Radius: " << m_Radius << std::endl;
89 os << indent <<
"A: " << m_A << std::endl;
90 os << indent <<
"B: " << m_B << std::endl;
91 os << indent <<
"Theta: " << m_Theta << std::endl;
92 os << indent <<
"U0: " << m_U0 << std::endl;
93 os << indent <<
"V0: " << m_V0 << std::endl;
94 os << indent <<
"Phi: " << m_Phi << std::endl;
95 os <<
"Need to regenerate filter: " << m_NeedToRegenerateFilter << std::endl;