27 #include <grass/imagery.h> 28 #include <grass/raster.h> 30 #include "iclass_local_proto.h" 45 G_debug(3,
"open_band_files()");
49 *band_buffer = (
CELL **) G_malloc(nbands *
sizeof(
CELL *));
50 *band_fd = (
int *)G_malloc(nbands *
sizeof(
int));
52 for (n = 0; n < nbands; n++) {
71 G_debug(3,
"close_band_files()");
74 for (n = 0; n < nbands; n++) {
95 G_debug(5,
"read_band_row(): row = %d", row);
97 for (i = 0; i < nbands; i++)
void G_free(void *buf)
Free allocated memory.
void Rast_close(int fd)
Close a raster map.
CELL * Rast_allocate_c_buf(void)
Allocate memory for a CELL type raster map.
void Rast_get_c_row_nomask(int fd, CELL *buf, int row)
Read raster row without masking (CELL type)
int G_debug(int level, const char *msg,...)
Print debugging message.
int Rast_open_old(const char *name, const char *mapset)
Open an existing integer raster map (cell)
void open_band_files(struct Ref *refer, CELL ***band_buffer, int **band_fd)
Open and allocate space for the group band files.
void read_band_row(CELL **band_buffer, int *band_fd, int nbands, int row)
Read one row of each band.
void close_band_files(struct Ref *refer, CELL **band_buffer, int *band_fd)
Close and free space for the group band files.