00001 #ifndef _HighQuality2Magnifier_H
00002 #define _HighQuality2Magnifier_H
00003 
00004 
00028 #include <stdio.h>
00029 
00030 #include "AnImageInterpolator.hpp"
00031 
00032 class HighQuality2Magnifier : public AnImageInterpolator
00033 {
00034 private:
00035 
00036 const static float p[4][9];
00037 
00038 double d1, d2, d3;                              
00039 double q[4];
00040 double eps;
00041 
00042 double y1, y2, y3, y4;                          
00043 
00044 protected:
00045 
00046 double computeY1(int x, int y, int c);
00047 double computeY2(int x, int y, int c);
00048 double computeY3(int x, int y, int c);
00049 double computeY4(int x, int y, int c);
00050 
00051 public:
00052 
00053 HighQuality2Magnifier(AnImage* animage=0);
00054 virtual ~HighQuality2Magnifier(){}
00055 
00056 virtual int igetR(double x, double y, int c=0);                         
00057 virtual double getR(double x, double y, int c=0);                       
00058 
00059 virtual AnImage* magnify(double factor=2.0, AnImage* dest=0){ return magnify2(dest); }
00060 virtual AnImage* magnify2(AnImage* dest=0);
00061 };
00062 
00063 #endif