29#include "iclass_local_proto.h"
66 G_debug(1,
"iclass_analysis(): group = %s", group);
110 G_debug(3,
"I_iclass_init_group(): group_name = %s, subgroup_name = %s",
119 for (n = 0; n <
refer->nfiles; n++) {
123 "<%s> does not exist"),
128 "<%s> does not exist"),
137 if (
refer->nfiles <= 1) {
140 _(
"Subgroup <%s> does not have enough files (it has %d files)"),
144 _(
"Group <%s> does not have enough files (it has %d files)"),
AMI_err name(char **stream_name)
const char * G_find_raster(char *, const char *)
Find a raster map.
void G_warning(const char *,...) __attribute__((format(printf
void G_get_set_window(struct Cell_head *)
Get the current working window (region)
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)