| 1 | greg | 2.4 | /* RCSid: $Id: pfilt.h,v 2.3 2023/12/08 17:56:26 greg Exp $ */ | 
| 2 | schorsch | 2.1 | /* | 
| 3 |  |  | * Header file for picture filtering | 
| 4 |  |  | */ | 
| 5 |  |  | #ifndef _RAD_PFILT_H_ | 
| 6 |  |  | #define _RAD_PFILT_H_ | 
| 7 |  |  |  | 
| 8 | greg | 2.2 | #include  "standard.h" | 
| 9 | greg | 2.4 | #include  "paths.h" | 
| 10 | greg | 2.2 | #include  "color.h" | 
| 11 |  |  |  | 
| 12 | schorsch | 2.1 | #ifdef __cplusplus | 
| 13 |  |  | extern "C" { | 
| 14 |  |  | #endif | 
| 15 |  |  |  | 
| 16 |  |  | extern double  CHECKRAD;        /* radius over which gaussian is summed */ | 
| 17 |  |  | extern double  rad;             /* output pixel radius for filtering */ | 
| 18 |  |  | extern double  thresh;          /* maximum contribution for subpixel */ | 
| 19 |  |  | extern int  nrows, ncols;       /* number of rows and columns for output */ | 
| 20 |  |  | extern int  xres, yres;         /* x and y resolution */ | 
| 21 |  |  | extern int  avghot;             /* true means average in avgbrt spots */ | 
| 22 |  |  | extern double  hotlvl;          /* brightness considered "hot" */ | 
| 23 |  |  | extern int  npts;               /* # of points for stars */ | 
| 24 |  |  | extern double  spread;          /* spread for star points */ | 
| 25 |  |  | extern char  *progname; | 
| 26 |  |  | extern COLOR  exposure;         /* exposure for frame */ | 
| 27 |  |  |  | 
| 28 |  |  | extern double  x_c, y_r;        /* conversion factors */ | 
| 29 |  |  |  | 
| 30 |  |  | extern int  xrad;               /* x search radius */ | 
| 31 |  |  | extern int  yrad;               /* y search radius */ | 
| 32 |  |  | extern int  xbrad;              /* x box size */ | 
| 33 |  |  | extern int  ybrad;              /* y box size */ | 
| 34 |  |  |  | 
| 35 |  |  | extern int  barsize;            /* size of input scan bar */ | 
| 36 | greg | 2.3 | extern COLORV  **scanin;        /* input scan bar */ | 
| 37 |  |  | extern COLORV  *scanout;        /* output scan line */ | 
| 38 |  |  | extern COLORV  **scoutbar;      /* output scan bar (if thresh > 0) */ | 
| 39 | schorsch | 2.1 | extern float  **greybar;        /* grey-averaged input values */ | 
| 40 |  |  | extern int  obarsize;           /* size of output scan bar */ | 
| 41 |  |  | extern int  orad;               /* output window radius */ | 
| 42 |  |  |  | 
| 43 |  |  | extern int  wrapfilt;           /* wrap filter horizontally? */ | 
| 44 |  |  |  | 
| 45 | greg | 2.3 | typedef double brightfunc_t(SCOLOR c); | 
| 46 | schorsch | 2.1 | extern brightfunc_t *ourbright; /* brightness calculation function */ | 
| 47 |  |  |  | 
| 48 |  |  | /* defined in pf2.c */ | 
| 49 |  |  | extern void pass1init(void);            /* prepare for first pass */ | 
| 50 |  |  | extern void pass1default(void);         /* for single pass */ | 
| 51 | greg | 2.3 | extern void pass1scan(COLORV *scan, int  y);    /* process first pass scanline */ | 
| 52 | schorsch | 2.1 | extern void pass2init(void);            /* prepare for final pass */ | 
| 53 | greg | 2.3 | extern void pass2scan(COLORV *scan, int  y);    /* process final pass scanline */ | 
| 54 | schorsch | 2.1 |  | 
| 55 |  |  | /* defined in pf3.c */ | 
| 56 |  |  | extern void initmask(void);                     /* initialize gaussian lookup table */ | 
| 57 | greg | 2.3 | extern void dobox(SCOLOR  csum, int  xcent, int  ycent, | 
| 58 | schorsch | 2.1 | int  c, int  r);                /* simple box filter */ | 
| 59 | greg | 2.3 | extern void dogauss(SCOLOR  csum, int  xcent, int  ycent, | 
| 60 | schorsch | 2.1 | int  c, int  r);        /* gaussian filter */ | 
| 61 |  |  | extern void dothresh(int  xcent, int  ycent, | 
| 62 |  |  | int  ccent, int  rcent);        /* gaussian threshold filter */ | 
| 63 |  |  |  | 
| 64 |  |  | #ifdef __cplusplus | 
| 65 |  |  | } | 
| 66 |  |  | #endif | 
| 67 |  |  | #endif /* _RAD_PFILT_H_ */ |