00001 #ifndef _AnImageInterpolator_H 00002 #define _AnImageInterpolator_H 00003 00022 #include <stdio.h> 00023 #include "AnImageAdaptor.hpp" 00024 00025 class AnImageInterpolator : public AnImageAdaptor 00026 { 00027 public: 00028 00029 AnImageInterpolator(AnImage* animage=0):AnImageAdaptor(animage){} 00030 virtual ~AnImageInterpolator(){} 00031 00032 virtual int igetR(double x, double y, int c=0)=0; // integer rounding 00033 virtual double getR(double x, double y, int c=0)=0; // interpolated value 00034 00035 virtual AnImage* magnify(double factor=2.0, AnImage* dest=0){ return magnify2(0,0, dest); } 00036 00037 virtual AnImage* magnify2(AnImage* dest=0); 00038 virtual AnImage* magnify2(double x0, double y0, AnImage* dest=0); // on same image size 00039 }; 00040 00041 #endif