LanczosSincFilter.h
Go to the documentation of this file.00001 /**<!--------------------------------------------------------------------> 00002 @class LanczosSincFilter 00003 @author Travis Fischer (fisch0920@gmail.com) 00004 @author Matthew Jacobs (jacobs.mh@gmail.com) 00005 @date Fall 2008 00006 00007 @brief 00008 2D symmetric Lanczos filter whose aim is to approximate a truncated 00009 sinc (the ideal reconstruction filter) while minimizing the amount of 00010 visible ringing resulting from the truncation 00011 00012 @note 00013 LanczosSinc Filter taken from PBRT (Pharr, Humphreys) 00014 http://www.pbrt.org 00015 <!-------------------------------------------------------------------->**/ 00016 00017 #ifndef LANCZOS_SINC_FILTER_H_ 00018 #define LANCZOS_SINC_FILTER_H_ 00019 00020 #include <filters/KernelFilter.h> 00021 00022 class LanczosSincFilter : public KernelFilter { 00023 public: 00024 ///@name Constructors 00025 //@{----------------------------------------------------------------- 00026 00027 inline LanczosSincFilter(real_t support = 2, real_t tau = 3.0) 00028 : KernelFilter(support), m_tau(tau) 00029 { } 00030 00031 virtual ~LanczosSincFilter() 00032 { } 00033 00034 00035 //@}----------------------------------------------------------------- 00036 ///@name Initialization 00037 //@{----------------------------------------------------------------- 00038 00039 virtual void init(); 00040 00041 00042 //@}----------------------------------------------------------------- 00043 ///@name Main usage interface 00044 //@{----------------------------------------------------------------- 00045 00046 /** 00047 * @returns the value of this filter function evaluated at the given 00048 * point 00049 */ 00050 virtual real_t evaluate(const Vector2 &pt); 00051 00052 00053 //@}----------------------------------------------------------------- 00054 00055 protected: 00056 /// 1D LanczosSinc filter 00057 real_t _evaluate(real_t x) const; 00058 00059 protected: 00060 real_t m_tau; 00061 }; 00062 00063 #endif // LANCZOS_SINC_FILTER_H_ 00064
Generated on 28 Feb 2009 for Milton by
1.5.6