(file) Return to gapfill.h CVS log (file) (dir) Up to [Development] / JSOC / proj / libs / interpolate

 1 arta  1.5 #ifndef __GAPFILL_H
 2           #define __GAPFILL_H
 3           
 4 arta  1.2 #include <omp.h>
 5           
 6 arta  1.1 struct fill_hash_struct {
 7             int nbad; // Number of bad points for this entry
 8             int hash0; // Hash value before modulus operation
 9             int nhit; // Number of times used
10             int *wbad; // List of bad pixels for this entry
11             double *coeff; // Saved coefficients
12             float cnorm;
13             float ierror;
14             struct fill_hash_struct *next; // Next item in list
15           };
16           
17           struct fill_struct {
18             int order; // Interpolation order
19             double *a0,*a00,*rh0,*a0t,*rh0t,acort00;
20           //double *a,*rh,*a1b,*a1r;
21           //int *wgood;
22           //int *wbad;
23             int hashmod; // Modules for hash calculation
24             int *hashcount; // How many of this hash value
25             int ndiff; // Number of different masks seen
26             struct fill_hash_struct **hashtable;
27 arta  1.1   omp_lock_t *locks; // To prevent reading while updating
28             omp_lock_t *complocks; // To prevent redundant computations
29             int method; // Value of input method
30             char *filename; // File acor was read from
31           };
32           
33           int init_fill(
34             int method, // Interpolation method
35             double pnoise, // Level of photon noise for trade-off
36             int order, // Interpolation order. Generally odd.
37             int targetx, // Target point in x (normally (order-1)/2)
38             int targety, // Target point in y (normally (order-1)/2)
39             struct fill_struct *pars, // Structure to save setup information etc.
40 arta  1.4   char **filenamep, // Pointer to name of file to read covariance from.
41 arta  1.1                    // Set to actual file used if method > 0.
42 arta  1.4   const char *path // to data files read by this function.
43 arta  1.1 
44           );
45           
46           int free_fill(
47             struct fill_struct *pars
48           );
49           
50           int fgap_fill(
51             struct fill_struct *pars, // Parameters from call of init_fill
52             float *im, // Input image
53             int nx, // Size of array in dimension adjacent in memory
54             int ny, // Size of array in dimension not adjacent in memory
55             int nlead, // Leading dimension of array nlead>=nx
56             unsigned char *mask, // Mask is 0 data point is there
57                        // Mask is 1 if data point is not there and should be filled
58                        // Mask is 2 if data point is not there and should not be filled
59             float *cnorm, // White noise magnification
60             float *ierror // Estimated interpolation error
61           );
62 schou 1.3 
63           char *gapfill_version(); // Returns CVS version of gapfill.c
64           
65 arta  1.5 #endif

Karen Tian
Powered by
ViewCVS 0.9.4