Isis 3 Programmer Reference
Interpolator.h
1 #ifndef Interpolator_h
2 #define Interpolator_h
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 #include "SpecialPixel.h"
10 
11 namespace Isis {
34  class Interpolator {
35  public:
40  enum interpType {
41  None = 0,
42  NearestNeighborType = 1,
43  BiLinearType = 2,
44  CubicConvolutionType = 4
45  };
46 
47  private:
53 
54 
55  void Init();
56 
57 
58  double NearestNeighbor(const double isamp, const double iline,
59  const double buf[]);
60 
61  // Do a bilinear interpolation on the buf
62  double BiLinear(const double isamp, const double iline,
63  const double buf[]);
64 
65  // Do a cubic convolution on the buf
66  double CubicConvolution(const double isamp, const double iline,
67  const double buf[]);
68 
69 
70  public:
71  // Constructores / destructores
72  Interpolator();
73  Interpolator(const interpType &type);
74  ~Interpolator();
75 
76 
77  // Perform the interpolation with the current settings
78  double Interpolate(const double isamp, const double iline,
79  const double buf[]);
80 
81 
82  // Set the type of interpolation
83  void SetType(const interpType &type);
84 
85 
86  // Return sizes needed by the interpolator
87  int Samples();
88  int Lines();
89 
90 
91  // Return the hot spot (center pixel) of the interpolator zero based
92  double HotSample();
93  double HotLine();
94  };
95 };
96 #endif
Isis::Interpolator::~Interpolator
~Interpolator()
Destroys the Interpolator object.
Definition: Interpolator.cpp:34
Isis::Interpolator::NearestNeighbor
double NearestNeighbor(const double isamp, const double iline, const double buf[])
Performs a nearest-neighbor interpolation on the buffer data.
Definition: Interpolator.cpp:101
Isis::Interpolator::Lines
int Lines()
Returns the number of lines needed by the interpolator.
Definition: Interpolator.cpp:236
Isis::Interpolator::p_type
interpType p_type
The type of interpolation to be performed.
Definition: Interpolator.h:52
Isis::Interpolator::HotSample
double HotSample()
Returns the sample coordinate of the center pixel in the buffer for the interpolator.
Definition: Interpolator.cpp:265
Isis::Interpolator::interpType
interpType
The interpolator type, including: None, Nearest Neighbor, BiLinear or Cubic Convultion.
Definition: Interpolator.h:40
Isis::Interpolator::Interpolator
Interpolator()
Constructs an empty Interpolator object.
Definition: Interpolator.cpp:17
Isis::Interpolator::Init
void Init()
Initializes the object data members.
Definition: Interpolator.cpp:37
Isis::Interpolator
Pixel interpolator.
Definition: Interpolator.h:34
Isis::Interpolator::CubicConvolution
double CubicConvolution(const double isamp, const double iline, const double buf[])
Performs a cubic-convulsion interpolation on the buffer data.
Definition: Interpolator.cpp:156
Isis::Interpolator::Interpolate
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.
Definition: Interpolator.cpp:56
Isis::Interpolator::SetType
void SetType(const interpType &type)
Sets the type of interpolation.
Definition: Interpolator.cpp:85
Isis::Interpolator::Samples
int Samples()
Returns the number of samples needed by the interpolator.
Definition: Interpolator.cpp:208
Isis::Interpolator::HotLine
double HotLine()
Returns the line coordinate of the center pixel in the buffer for the interpolator.
Definition: Interpolator.cpp:297
Isis::Interpolator::BiLinear
double BiLinear(const double isamp, const double iline, const double buf[])
Performs a bi-linear interpolation on the buffer data.
Definition: Interpolator.cpp:118
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16