MitchellFilter.h

Go to the documentation of this file.
00001 /**<!-------------------------------------------------------------------->
00002    @class  MitchellFilter
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 Mitchell filter which is parameterized to tradeoff between 
00009    'ringing' and 'blurring' that other filters tend towards in difficult 
00010    reconstruction cases
00011    
00012    @note
00013       Mitchell Filter taken from PBRT (Pharr, Humphreys)
00014       http://www.pbrt.org
00015    <!-------------------------------------------------------------------->**/
00016 
00017 #ifndef MITCHELL_FILTER_H_
00018 #define MITCHELL_FILTER_H_
00019 
00020 #include <filters/KernelFilter.h>
00021 
00022 class MitchellFilter : public KernelFilter {
00023    public:
00024       ///@name Constructors
00025       //@{-----------------------------------------------------------------
00026       
00027       inline MitchellFilter(real_t support = 2, 
00028                             real_t b = 1.0 / 3.0, 
00029                             real_t c = 1.0 / 3.0)
00030          : KernelFilter(support), m_B(b), m_C(c)
00031       { }
00032       
00033       virtual ~MitchellFilter()
00034       { }
00035       
00036       
00037       //@}-----------------------------------------------------------------
00038       ///@name Initialization
00039       //@{-----------------------------------------------------------------
00040       
00041       virtual void init();
00042       
00043       
00044       //@}-----------------------------------------------------------------
00045       ///@name Main usage interface
00046       //@{-----------------------------------------------------------------
00047       
00048       /**
00049        * @returns the value of this filter function evaluated at the given 
00050        *    point
00051        */
00052       virtual real_t evaluate(const Vector2 &pt);
00053       
00054       
00055       //@}-----------------------------------------------------------------
00056 
00057    protected:
00058       /// 1D Mitchell filter
00059       real_t _evaluate(real_t x) const;
00060       
00061    protected:
00062       real_t m_B;
00063       real_t m_C;
00064 };
00065 
00066 #endif // MITCHELL_FILTER_H_
00067 

Generated on 28 Feb 2009 for Milton by doxygen 1.5.6