imagery.h 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. #ifndef GRASS_IMAGEDEFS_H
  2. #define GRASS_IMAGEDEFS_H
  3. /* alloc.c */
  4. void *I_malloc(size_t);
  5. void *I_realloc(void *, size_t);
  6. int I_free(void *);
  7. double **I_alloc_double2(int, int);
  8. int *I_alloc_int(int);
  9. int **I_alloc_int2(int, int);
  10. int I_free_int2(int **);
  11. int I_free_double2(double **);
  12. double ***I_alloc_double3(int, int, int);
  13. int I_free_double3(double ***);
  14. /* eol.c */
  15. int I_get_to_eol(char *, int, FILE *);
  16. /* find.c */
  17. int I_find_group(const char *);
  18. int I_find_group_file(const char *, const char *);
  19. int I_find_subgroup(const char *, const char *);
  20. int I_find_subgroup_file(const char *, const char *, const char *);
  21. /* fopen.c */
  22. FILE *I_fopen_group_file_new(const char *, const char *);
  23. FILE *I_fopen_group_file_append(const char *, const char *);
  24. FILE *I_fopen_group_file_old(const char *, const char *);
  25. FILE *I_fopen_subgroup_file_new(const char *, const char *, const char *);
  26. FILE *I_fopen_subgroup_file_append(const char *, const char *, const char *);
  27. FILE *I_fopen_subgroup_file_old(const char *, const char *, const char *);
  28. /* georef.c */
  29. int I_compute_georef_equations(struct Control_Points *, double *, double *,
  30. double *, double *, int);
  31. int I_georef(double, double, double *, double *, double *, double *, int);
  32. /* georef_tps.c */
  33. int I_compute_georef_equations_tps(struct Control_Points *, double **, double **,
  34. double **, double **);
  35. int I_georef_tps(double, double, double *, double *, double *, double *,
  36. struct Control_Points *, int);
  37. /* group.c */
  38. int I_get_group(char *);
  39. int I_put_group(const char *);
  40. int I_get_subgroup(const char *, char *);
  41. int I_put_subgroup(const char *, const char *);
  42. int I_get_group_ref(const char *, struct Ref *);
  43. int I_get_subgroup_ref(const char *, const char *, struct Ref *);
  44. int I_init_ref_color_nums(struct Ref *);
  45. int I_put_group_ref(const char *, const struct Ref *);
  46. int I_put_subgroup_ref(const char *, const char *, const struct Ref *);
  47. int I_add_file_to_group_ref(const char *, const char *, struct Ref *);
  48. int I_transfer_group_ref_file(const struct Ref *, int, struct Ref *);
  49. int I_init_group_ref(struct Ref *);
  50. int I_free_group_ref(struct Ref *);
  51. /* iclass.c */
  52. struct Map_info;
  53. int I_iclass_analysis(IClass_statistics *, struct Ref *, struct Map_info *, const char *, const char *, const char *);
  54. int I_iclass_init_group(const char *, const char *, struct Ref *);
  55. void I_iclass_create_raster(IClass_statistics *, struct Ref *, const char *);
  56. /* iclass_statistics.c */
  57. void I_iclass_statistics_get_nbands(IClass_statistics *, int *);
  58. void I_iclass_statistics_get_cat(IClass_statistics *, int *);
  59. void I_iclass_statistics_get_name(IClass_statistics *, const char **);
  60. void I_iclass_statistics_get_color(IClass_statistics *, const char **);
  61. void I_iclass_statistics_get_ncells(IClass_statistics *, int *);
  62. int I_iclass_statistics_get_max(IClass_statistics *, int, int *);
  63. int I_iclass_statistics_get_range_max(IClass_statistics *, int, int *);
  64. int I_iclass_statistics_get_min(IClass_statistics *, int, int *);
  65. int I_iclass_statistics_get_range_min(IClass_statistics *, int, int *);
  66. int I_iclass_statistics_get_sum(IClass_statistics *, int, float *);
  67. int I_iclass_statistics_get_mean(IClass_statistics *, int, float *);
  68. int I_iclass_statistics_get_stddev(IClass_statistics *, int, float *);
  69. void I_iclass_statistics_get_nstd(IClass_statistics *, float *);
  70. void I_iclass_statistics_set_nstd(IClass_statistics *, float);
  71. int I_iclass_statistics_get_histo(IClass_statistics *, int, int, int *);
  72. int I_iclass_statistics_get_product(IClass_statistics *, int, int, float *);
  73. void I_iclass_init_statistics(IClass_statistics *, int, const char *, const char *, float);
  74. void I_iclass_free_statistics(IClass_statistics *);
  75. /* iclass_signatures.c */
  76. int I_iclass_init_signatures(struct Signature *, struct Ref *);
  77. void I_iclass_add_signature(struct Signature *, IClass_statistics *);
  78. int I_iclass_write_signatures(struct Signature *, const char *, const char *, const char *);
  79. /* list_gp.c */
  80. int I_list_group(const char *, const struct Ref *, FILE *);
  81. int I_list_group_simple(const struct Ref *, FILE *);
  82. /* list_subgp.c */
  83. char ** I_list_subgroups(const char *, int *);
  84. int I_list_subgroup(const char *, const char *, const struct Ref *, FILE *);
  85. int I_list_subgroup_simple(const struct Ref *, FILE *);
  86. /* loc_info.c */
  87. char *I_location_info(const char *);
  88. /* points.c */
  89. int I_new_control_point(struct Control_Points *, double, double, double,
  90. double, int);
  91. int I_get_control_points(const char *, struct Control_Points *);
  92. int I_put_control_points(const char *, const struct Control_Points *);
  93. /* ref.c */
  94. FILE *I_fopen_group_ref_new(const char *);
  95. FILE *I_fopen_group_ref_old(const char *);
  96. FILE *I_fopen_subgroup_ref_new(const char *, const char *);
  97. FILE *I_fopen_subgroup_ref_old(const char *, const char *);
  98. /* iscatt_structs.c */
  99. void I_sc_init_cats(struct scCats *, int, int);
  100. void I_sc_free_cats(struct scCats *);
  101. int I_sc_add_cat(struct scCats *);
  102. int I_sc_insert_scatt_data(struct scCats *, struct scdScattData *, int, int);
  103. void I_scd_init_scatt_data(struct scdScattData *, int, int, void *);
  104. /* iscatt_core.c */
  105. int I_compute_scatts(struct Cell_head *, struct scCats *, const char **,
  106. const char **, int, struct scCats *, const char **);
  107. int I_create_cat_rast(struct Cell_head *, const char *);
  108. int I_insert_patch_to_cat_rast(const char *, struct Cell_head *, const char *);
  109. int I_id_scatt_to_bands(const int, const int, int *, int *);
  110. int I_bands_to_id_scatt(const int, const int, const int, int *);
  111. int I_merge_arrays(unsigned char *, unsigned char *, unsigned, unsigned, double);
  112. int I_apply_colormap(unsigned char *, unsigned char *, unsigned, unsigned char *, unsigned char *);
  113. int I_rasterize(double *, int, unsigned char, struct Cell_head *, unsigned char *);
  114. /* sig.c */
  115. int I_init_signatures(struct Signature *, int);
  116. int I_new_signature(struct Signature *);
  117. int I_free_signatures(struct Signature *);
  118. int I_read_one_signature(FILE *, struct Signature *);
  119. int I_read_signatures(FILE *, struct Signature *);
  120. int I_write_signatures(FILE *, struct Signature *);
  121. /* sigfile.c */
  122. FILE *I_fopen_signature_file_new(const char *, const char *, const char *);
  123. FILE *I_fopen_signature_file_old(const char *, const char *, const char *);
  124. /* sigset.c */
  125. int I_SigSetNClasses(struct SigSet *);
  126. struct ClassData *I_AllocClassData(struct SigSet *, struct ClassSig *, int);
  127. int I_InitSigSet(struct SigSet *);
  128. int I_SigSetNBands(struct SigSet *, int);
  129. struct ClassSig *I_NewClassSig(struct SigSet *);
  130. struct SubSig *I_NewSubSig(struct SigSet *, struct ClassSig *);
  131. int I_ReadSigSet(FILE *, struct SigSet *);
  132. int I_SetSigTitle(struct SigSet *, const char *);
  133. const char *I_GetSigTitle(const struct SigSet *);
  134. int I_SetClassTitle(struct ClassSig *, const char *);
  135. const char *I_GetClassTitle(const struct ClassSig *);
  136. int I_WriteSigSet(FILE *, const struct SigSet *);
  137. /* sigsetfile.c */
  138. FILE *I_fopen_sigset_file_new(const char *, const char *, const char *);
  139. FILE *I_fopen_sigset_file_old(const char *, const char *, const char *);
  140. /* target.c */
  141. int I_get_target(const char *, char *, char *);
  142. int I_put_target(const char *, const char *, const char *);
  143. /* title.c */
  144. int I_get_group_title(const char *, char *, int);
  145. int I_put_group_title(const char *, const char *);
  146. /* var.c */
  147. double I_variance(double, double, int);
  148. double I_stddev(double, double, int);
  149. #endif