| 5 |
|
* G.Ward Feb 2013 |
| 6 |
|
*/ |
| 7 |
|
|
| 8 |
+ |
#ifndef _RAD_INTERP2D_H_ |
| 9 |
+ |
#define _RAD_INTERP2D_H_ |
| 10 |
+ |
|
| 11 |
+ |
#ifdef __cplusplus |
| 12 |
+ |
extern "C" { |
| 13 |
+ |
#endif |
| 14 |
+ |
|
| 15 |
|
#define NI2DSMF 0.42f /* minimal smoothing radius */ |
| 16 |
|
|
| 17 |
|
#define NI2DIR (2*4) /* # interpolation directions */ |
| 28 |
|
/* Allocate a new set of interpolation samples (caller assigns spt[] array) */ |
| 29 |
|
extern INTERP2 *interp2_alloc(int nsamps); |
| 30 |
|
|
| 31 |
+ |
/* Resize interpolation array (caller must assign any new values) */ |
| 32 |
+ |
extern INTERP2 *interp2_realloc(INTERP2 *ip, int nsamps); |
| 33 |
+ |
|
| 34 |
|
/* Assign full set of normalized weights to interpolate the given location */ |
| 35 |
|
extern int interp2_weights(float wtv[], INTERP2 *ip, double x, double y); |
| 36 |
|
|
| 37 |
|
/* Get normalized weights and indexes for n best samples in descending order */ |
| 38 |
|
extern int interp2_topsamp(float wt[], int si[], const int n, |
| 39 |
|
INTERP2 *ip, double x, double y); |
| 30 |
– |
|
| 40 |
|
/* Free interpolant */ |
| 41 |
|
extern void interp2_free(INTERP2 *ip); |
| 42 |
+ |
|
| 43 |
+ |
/* (Re)compute anisotropic basis function interpolant (normally automatic) */ |
| 44 |
+ |
extern int interp2_analyze(INTERP2 *ip); |
| 45 |
+ |
|
| 46 |
+ |
#ifdef __cplusplus |
| 47 |
+ |
} |
| 48 |
+ |
#endif |
| 49 |
+ |
#endif /* !_RAD_INTERP2D_H_ */ |