Isis 3 Programmer Reference
Interpolator.h
Go to the documentation of this file.
1 
23 #ifndef Interpolator_h
24 #define Interpolator_h
25 
26 #include "SpecialPixel.h"
27 
28 namespace Isis {
51  class Interpolator {
52  public:
57  enum interpType {
58  None = 0,
59  NearestNeighborType = 1,
60  BiLinearType = 2,
61  CubicConvolutionType = 4
62  };
63 
64  private:
70 
71 
72  void Init();
73 
74 
75  double NearestNeighbor(const double isamp, const double iline,
76  const double buf[]);
77 
78  // Do a bilinear interpolation on the buf
79  double BiLinear(const double isamp, const double iline,
80  const double buf[]);
81 
82  // Do a cubic convolution on the buf
83  double CubicConvolution(const double isamp, const double iline,
84  const double buf[]);
85 
86 
87  public:
88  // Constructores / destructores
89  Interpolator();
90  Interpolator(const interpType &type);
91  ~Interpolator();
92 
93 
94  // Perform the interpolation with the current settings
95  double Interpolate(const double isamp, const double iline,
96  const double buf[]);
97 
98 
99  // Set the type of interpolation
100  void SetType(const interpType &type);
101 
102 
103  // Return sizes needed by the interpolator
104  int Samples();
105  int Lines();
106 
107 
108  // Return the hot spot (center pixel) of the interpolator zero based
109  double HotSample();
110  double HotLine();
111  };
112 };
113 #endif
double HotSample()
Returns the sample coordinate of the center pixel in the buffer for the interpolator.
void Init()
Initializes the object data members.
interpType
The interpolator type, including: None, Nearest Neighbor, BiLinear or Cubic Convultion.
Definition: Interpolator.h:57
double Interpolate(const double isamp, const double iline, const double buf[])
Performs an interpolation on the data according to the parameters set in the constructor.
Interpolator()
Constructs an empty Interpolator object.
void SetType(const interpType &type)
Sets the type of interpolation.
double CubicConvolution(const double isamp, const double iline, const double buf[])
Performs a cubic-convulsion interpolation on the buffer data.
double HotLine()
Returns the line coordinate of the center pixel in the buffer for the interpolator.
int Samples()
Returns the number of samples needed by the interpolator.
double BiLinear(const double isamp, const double iline, const double buf[])
Performs a bi-linear interpolation on the buffer data.
~Interpolator()
Destroys the Interpolator object.
double NearestNeighbor(const double isamp, const double iline, const double buf[])
Performs a nearest-neighbor interpolation on the buffer data.
int Lines()
Returns the number of lines needed by the interpolator.
Pixel interpolator.
Definition: Interpolator.h:51
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
interpType p_type
The type of interpolation to be performed.
Definition: Interpolator.h:69