USGS

Isis 3.0 Developer's Reference (API)

Home

Interpolator.h

Go to the documentation of this file.
00001 
00023 #ifndef Interpolator_h
00024 #define Interpolator_h
00025 
00026 #include "SpecialPixel.h"
00027 
00028 namespace Isis {
00051   class Interpolator {
00052     public:
00057       enum interpType {
00058         None = 0,
00059         NearestNeighborType = 1,
00060         BiLinearType = 2,
00061         CubicConvolutionType = 4
00062       };
00063 
00064     private:
00069       interpType p_type;
00070 
00071 
00072       void Init();
00073 
00074 
00075       double NearestNeighbor(const double isamp, const double iline,
00076                              const double buf[]);
00077 
00078       // Do a bilinear interpolation on the buf
00079       double BiLinear(const double isamp, const double iline,
00080                       const double buf[]);
00081 
00082       // Do a cubic convolution on the buf
00083       double CubicConvolution(const double isamp, const double iline,
00084                               const double buf[]);
00085 
00086 
00087     public:
00088       // Constructores / destructores
00089       Interpolator();
00090       Interpolator(const interpType &type);
00091       ~Interpolator();
00092 
00093 
00094       // Perform the interpolation with the current settings
00095       double Interpolate(const double isamp, const double iline,
00096                          const double buf[]);
00097 
00098 
00099       // Set the type of interpolation
00100       void SetType(const interpType &type);
00101 
00102 
00103       // Return sizes needed by the interpolator
00104       int Samples();
00105       int Lines();
00106 
00107 
00108       // Return the hot spot (center pixel) of the interpolator zero based
00109       double HotSample();
00110       double HotLine();
00111   };
00112 };
00113 #endif