filter.h 749 B

1234567891011121314151617181920212223242526272829303132
  1. #include <grass/gis.h>
  2. #include <grass/raster.h>
  3. #include <grass/rowio.h>
  4. typedef struct
  5. {
  6. int size; /* size of filter matrix */
  7. double **matrix; /* filter coefficient matrix */
  8. double **dmatrix; /* divisor coefficient matrix */
  9. double divisor; /* filter scale factor */
  10. int type; /* sequential or parallel */
  11. int start; /* starting corner */
  12. } FILTER;
  13. #define PARALLEL 1
  14. #define SEQUENTIAL 2
  15. #define UL 1
  16. #define UR 2
  17. #define LL 3
  18. #define LR 4
  19. /* apply.c */
  20. DCELL apply_filter(FILTER *, DCELL **);
  21. /* getfilt.c */
  22. FILTER *get_filter(char *, int *, char *);
  23. /* perform.c */
  24. int perform_filter(const char *, const char *, FILTER *, int, int);
  25. /* execute.c */
  26. int execute_filter(ROWIO *, int, FILTER *, DCELL *);