21 using Map =
typename Eigen::Map<const EArray2D<U>>;
30 virtual U
interp_impl(
double x,
double y,
const Map& map)
const = 0;
50 const Map z {&z_data[0],
51 static_cast<Eigen::Index
>(z_data.size() / width),
52 static_cast<Eigen::Index
>(width)};
60 const Map z {&z_data[0],
61 static_cast<Eigen::Index
>(z_data.size() / width),
62 static_cast<Eigen::Index
>(width)};
67 dataInterpMethod
method()
const {
return _method; }
72 dataInterpMethod _method;
79 using super_t = Interpolator<U>;
80 using typename super_t::Map;
83 U interp_impl(
double x,
double y,
const Map& z)
const override;
97 using super_t = Interpolator<U>;
98 using typename super_t::Map;
101 U interp_impl(
double x,
double y,
const Map& z)
const override;
116 using super_t = Interpolator<U>;
117 using typename super_t::Map;
120 U interp_impl(
double x,
double y,
const Map& z)
const override;
134 using super_t = Interpolator<U>;
135 using typename super_t::Map;
142 U
interp_impl(
double x,
double y,
const Map& z)
const override;
153 void _initSpline(
const std::valarray<U>&,
int, std::valarray<U>&,
154 std::valarray<U>&)
const;
156 U _spline(
double,
const std::valarray<U>&,
int,
157 const std::valarray<U>&)
const;
164 using super_t = Interpolator<U>;
165 using typename super_t::Map;
168 U interp_impl(
double x,
double y,
const Map& z)
const override;
179 void _sinc_coef(
double beta,
double relfiltlen,
int decfactor,
180 double pedestal,
int weight,
181 std::valarray<double>& filter)
const;
184 U _sinc_eval_2d(
const Map& z,
int intpx,
int intpy,
double frpx,
189 int _decimationFactor;
195 int _halfKernelLength;
199namespace isce3 {
namespace core {
205createInterpolator(dataInterpMethod method,
size_t order = 6,
206 int sincLen = SINC_LEN,
int sincSub = SINC_SUB)
208 if (method == BILINEAR_METHOD) {
210 }
else if (method == BICUBIC_METHOD) {
211 return new BicubicInterpolator<U>();
212 }
else if (method == BIQUINTIC_METHOD) {
213 return new Spline2dInterpolator<U>(order);
214 }
else if (method == NEAREST_METHOD) {
216 }
else if (method == SINC_METHOD) {
224template<
class U,
class V>
Definition of BicubicInterpolator.
Definition Interpolator.h:95
BicubicInterpolator()
Default constructor.
Definition Interpolator.h:105
Definition of BilinearInterpolator.
Definition Interpolator.h:77
BilinearInterpolator()
Default constructor.
Definition Interpolator.h:87
Definition of parent Interpolator.
Definition Interpolator.h:18
virtual ~Interpolator()
Virtual destructor (allow destruction of base Interpolator pointer)
Definition Interpolator.h:26
virtual U interp_impl(double x, double y, const Map &map) const =0
Base implementation for all types.
U interpolate(double x, double y, const Map &map) const
Interpolate at a given coordinate for an input Eigen::Map.
Definition Interpolator.h:35
U interpolate(double x, double y, std::valarray< U > &z_data, size_t width) const
Interpolate at a given coordinate for data passed as a valarray.
Definition Interpolator.h:47
U interpolate(double x, double y, const Matrix< U > &z) const
Interpolate at a given coordinate for an input isce3::core::Matrix.
Definition Interpolator.h:41
U interpolate(double x, double y, std::vector< U > &z_data, size_t width) const
Interpolate at a given coordinate for data passed as a vector.
Definition Interpolator.h:57
dataInterpMethod method() const
Return interpolation method.
Definition Interpolator.h:67
Data structure for a 2D row-major matrix.
Definition Matrix.h:23
Definition of NearestNeighborInterpolator.
Definition Interpolator.h:114
NearestNeighborInterpolator()
Default constructor.
Definition Interpolator.h:124
Definition of Sinc2dInterpolator.
Definition Interpolator.h:162
Sinc2dInterpolator(int kernelLength, int decimationFactor)
Default constructor.
Definition Sinc2dInterpolator.cpp:14
Definition of Spline2dInterpolator.
Definition Interpolator.h:132
U interp_impl(double x, double y, const Map &z) const override
Interpolate at a given coordinate.
Definition Spline2dInterpolator.cpp:33
Spline2dInterpolator(size_t order)
Default constructor.
Definition Spline2dInterpolator.cpp:12
base interpolator is an abstract base class
Definition BinarySearchFunc.cpp:5