29 #include "iclass_local_proto.h" 
   51                       struct Map_info *map_info, 
const char *layer_name,
 
   52                       const char *group, 
const char *raster_name)
 
   64     IClass_perimeter_list perimeters;
 
   66     G_debug(1, 
"iclass_analysis(): group = %s", group);
 
   68     category = statistics->
cat;
 
   80         G_warning(
_(
"No areas in category %d"), category);
 
  110     G_debug(3, 
"I_iclass_init_group(): group_name = %s, subgroup_name = %s",
 
  111             group_name, subgroup_name);
 
  119     for (n = 0; n < refer->
nfiles; n++) {
 
  123                             "<%s> does not exist"),
 
  128                             "<%s> does not exist"),
 
  140                 _(
"Subgroup <%s> does not have enough files (it has %d files)"),
 
  141                 subgroup_name, refer->
nfiles);
 
  144                 _(
"Group <%s> does not have enough files (it has %d files)"),
 
  145                 group_name, refer->
nfiles);
 
  161                             const char *raster_name)
 
  169     for (
b = 0; 
b < statistics->
nbands; 
b++) {
 
  174     create_raster(statistics, band_buffer, band_fd, raster_name);
 
void G_warning(const char *,...) __attribute__((format(printf
 
void G_get_set_window(struct Cell_head *)
Get the current working window (region)
 
const char * G_find_raster(char *, const char *)
Find a raster map.
 
int G_debug(int, const char *,...) __attribute__((format(printf
 
int I_init_group_ref(struct Ref *)
initialize Ref structure
 
int I_get_group_ref(const char *, struct Ref *)
read group REF file
 
int I_free_group_ref(struct Ref *)
free Ref structure
 
int I_get_subgroup_ref(const char *, const char *, struct Ref *)
read subgroup REF file
 
void I_iclass_create_raster(IClass_statistics *statistics, struct Ref *refer, const char *raster_name)
Create raster map based on statistics.
 
int I_iclass_init_group(const char *group_name, const char *subgroup_name, struct Ref *refer)
Read files for the specified group subgroup into the Ref structure.
 
int I_iclass_analysis(IClass_statistics *statistics, struct Ref *refer, struct Map_info *map_info, const char *layer_name, const char *group, const char *raster_name)
Calculates statistical values for one class and multiple bands based on training areas.
 
void close_band_files(struct Ref *refer, CELL **band_buffer, int *band_fd)
Close and free space for the group band files.
 
void open_band_files(struct Ref *refer, CELL ***band_buffer, int **band_fd)
Open and allocate space for the group band files.
 
int vector2perimeters(struct Map_info *Map, const char *layer_name, int category, IClass_perimeter_list *perimeters, struct Cell_head *band_region)
Creates perimeters from vector areas of given category.
 
void free_perimeters(IClass_perimeter_list *perimeters)
Frees all perimeters in list of perimeters.
 
void alloc_statistics(IClass_statistics *statistics, int nbands)
Allocate space for statistics.
 
void band_range(IClass_statistics *statistics, int band)
Helper function for computing min and max range in one band.
 
void create_raster(IClass_statistics *statistics, CELL **band_buffer, int *band_fd, const char *raster_name)
Create raster map based on statistics.
 
int make_all_statistics(IClass_statistics *statistics, IClass_perimeter_list *perimeters, CELL **band_buffer, int *band_fd)
Calculate statistics for all training areas.
 
2D/3D raster map header (used also for region)