|
| | Interpolate2D (Interpolate2D::Method method=Interpolate2D::LINEAR) |
| | Constructor. More...
|
| |
| | Interpolate2D (const Interpolate2D &other) |
| | Copy constructor (copy semantics) More...
|
| |
| | ~Interpolate2D () |
| | destructor More...
|
| |
| Interpolate2D & | operator= (const Interpolate2D &other) |
| | Assignment operator (copy semantics) More...
|
| |
| Bool | interp (Float &result, const Vector< Double > &where, const Matrix< Float > &data) const |
| | Do one Float interpolation, supply Matrix and mask (True is good), and pixel coordinate. More...
|
| |
| Bool | interp (Float &result, const Vector< Double > &where, const Matrix< Float > &data, const Matrix< Bool > &mask) const |
| |
| Bool | interp (Double &result, const Vector< Double > &where, const Matrix< Double > &data) const |
| | Do one Double interpolation, supply Matrix/Array and mask (True is good), and pixel coordinate. More...
|
| |
| Bool | interp (Double &result, const Vector< Double > &where, const Matrix< Double > &data, const Matrix< Bool > &mask) const |
| |
| Bool | interp (Double &resultI, Double &resultJ, const Vector< Double > &where, const Matrix< Double > &dataI, const Matrix< Double > &dataJ, const Matrix< Bool > &mask) const |
| | Do two linear interpolations simultaneously. More...
|
| |
| template<typename T > |
| Bool | interpLinear2 (T &resultI, T &resultJ, const Vector< Double > &where, const Matrix< T > &dataI, const Matrix< T > &dataJ, const Matrix< Bool > &mask) const |
| |
| Bool | interp (Bool &result, const Vector< Double > &where, const Matrix< Bool > &data) const |
| | Do one interpolation, supply boolean Matrix (True is good), and pixel coordinate. More...
|
| |
|
| Bool | anyBadMaskPixels (const Matrix< Bool > *&mask, Int i1, Int i2, Int j1, Int j2) const |
| | Are any of the mask pixels bad ? Returns False if no mask. More...
|
| |
| template<typename T > |
| Bool | interpNearest (T &result, const Vector< Double > &where, const Matrix< T > &data, const Matrix< Bool > *&maskPtr) const |
| | nearest neighbour interpolation More...
|
| |
| Bool | interpNearestBool (Bool &result, const Vector< Double > &where, const Matrix< Bool > &data) const |
| |
| template<typename T > |
| Bool | interpLinear (T &result, const Vector< Double > &where, const Matrix< T > &data, const Matrix< Bool > *&maskPtr) const |
| | bi-linear interpolation More...
|
| |
| Bool | interpLinearBool (Bool &result, const Vector< Double > &where, const Matrix< Bool > &data) const |
| |
| template<typename T > |
| Bool | interpCubic (T &result, const Vector< Double > &where, const Matrix< T > &data, const Matrix< Bool > *&maskPtr) const |
| | bi-cubic interpolation More...
|
| |
| Bool | interpCubicBool (Bool &result, const Vector< Double > &where, const Matrix< Bool > &data) const |
| |
| template<typename T > |
| Bool | interpLanczos (T &result, const Vector< Double > &where, const Matrix< T > &data, const Matrix< Bool > *&maskPtr) const |
| | Lanczos interpolation. More...
|
| |
| Bool | interpLanczosBool (Bool &result, const Vector< Double > &where, const Matrix< Bool > &data) const |
| |
| template<typename T > |
| T | sinc (const T x) const |
| | Lanczos interpolation: helper functions. More...
|
| |
| template<typename T > |
| T | L (const T x, const Int a) const |
| |
| void | bcucof (Double c[4][4], const Double y[4], const Double y1[4], const Double y2[4], const Double y12[4]) const |
| | helping routine from numerical recipes More...
|
| |
A two dimension interpolator for Matrices or Arrays.
Intended use:
Public interface
Review Status
- Reviewed By:
- wbrouw
- Date Reviewed:
- 2004/05/26
Prerequisite
Etymology
This class is called Interpolate2D because it does 2 dimensional interpolations
Synopsis
Given a regular Array or Matrix and a vector of pixel coordinates, interpolate the values of that array/matrix onto those pixel coordinates.
Absolutely no checking of the consistency of the input data is done in order to preserve maximum speed. The coordinate vector must* have at least 2 elements (others will be ignored). If you supply data and mask, those arrays must be the same shape. Failure to follow these rules will result in your program crashing.
Example
Matrix<Float> matt(10,10);
Vector<Double> where(2);
where(0) = 3.452; where(1) = 6.1;
Bool ok = myInterp.interp(result, where, matt);
Motivation
2-D interpolation is required in geometry transformation routines such as in ImageRegrid.
To Do
-
Alternative approach: instantiate with an Array, take a block of vector locations, return a block of interpolation results
Definition at line 96 of file Interpolate2D.h.