GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
|
Imagery library - functions for manipulation with structures used by wx.iscatt (wx Interactive Scatter Plot Tool) More...
Go to the source code of this file.
Functions | |
int | I_id_scatt_to_bands (const int scatt_id, const int n_bands, int *b_1_id, int *b_2_id) |
Compute band ids from scatter plot id. More... | |
int | I_bands_to_id_scatt (const int b_1_id, const int b_2_id, const int n_bands, int *scatt_id) |
Compute scatter plot id from band ids. More... | |
void | I_sc_init_cats (struct scCats *cats, int n_bands, int type) |
Initialize structure for storing scatter plots data. More... | |
void | I_sc_free_cats (struct scCats *cats) |
Free data of struct scCats, the structure itself remains allocated. More... | |
int | I_sc_add_cat (struct scCats *cats) |
Add category. More... | |
int | I_sc_insert_scatt_data (struct scCats *cats, struct scdScattData *scatt_data, int cat_id, int scatt_id) |
Insert scatter plot data . Inserted scatt_data struct must have same type as cats struct (SC_SCATT_DATA or SC_SCATT_CONDITIONS). More... | |
void | I_scd_init_scatt_data (struct scdScattData *scatt_data, int type, int n_vals, void *data) |
Insert scatter plot data. More... | |
Imagery library - functions for manipulation with structures used by wx.iscatt (wx Interactive Scatter Plot Tool)
Copyright (C) 2013 by the GRASS Development Team
This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file iscatt_structs.c.
int I_bands_to_id_scatt | ( | const int | b_1_id, |
const int | b_2_id, | ||
const int | n_bands, | ||
int * | scatt_id | ||
) |
Compute scatter plot id from band ids.
See also I_id_scatt_to_bands
b_1_id | id of band1 | |
b_1_id | id of band2 | |
n_bands | number of bands | |
[out] | scatt_id | scatter plot id |
Definition at line 69 of file iscatt_structs.c.
int I_id_scatt_to_bands | ( | const int | scatt_id, |
const int | n_bands, | ||
int * | b_1_id, | ||
int * | b_2_id | ||
) |
Compute band ids from scatter plot id.
Scatter plot id describes which bands defines the scatter plot.
Let say we have 3 bands, their ids are 0, 1 and 2. Scatter plot with id 0 consists of band 1 (b_1_id) 0 and band 2 (b_2_id) 1. All scatter plots: scatt_id b_1_id b_2_id 0 0 1 1 0 2 2 1 2
scatt_id | scatter plot id | |
n_bands | number of bands | |
[out] | b_1_id | id of band1 |
[out] | b_2_id | id of band2 |
Definition at line 39 of file iscatt_structs.c.
Referenced by I_sc_insert_scatt_data().
int I_sc_add_cat | ( | struct scCats * | cats | ) |
Add category.
Category represents group of scatter plots.
cats | pointer to scCats struct |
Definition at line 155 of file iscatt_structs.c.
References scCats::cats_arr, scCats::cats_ids, scCats::cats_idxs, G_malloc, G_zero(), scCats::n_a_cats, scScatts::n_a_scatts, scCats::n_cats, scCats::n_scatts, scScatts::scatt_idxs, scScatts::scatts_arr, and scScatts::scatts_bands.
void I_sc_free_cats | ( | struct scCats * | cats | ) |
Free data of struct scCats, the structure itself remains allocated.
cats | pointer to existing scCats struct |
Definition at line 119 of file iscatt_structs.c.
References scCats::cats_arr, scCats::cats_ids, scCats::cats_idxs, G_free(), scCats::n_a_cats, scCats::n_bands, scCats::n_cats, scCats::n_scatts, scScatts::scatt_idxs, scScatts::scatts_arr, scScatts::scatts_bands, and scCats::type.
void I_sc_init_cats | ( | struct scCats * | cats, |
int | n_bands, | ||
int | type | ||
) |
Initialize structure for storing scatter plots data.
cats | pointer to scCats struct |
n_bands | number of bands |
type | SC_SCATT_DATA - stores scatter plots |
type | SC_SCATT_CONDITIONS - stores selected areas in scatter plots |
Definition at line 88 of file iscatt_structs.c.
int I_sc_insert_scatt_data | ( | struct scCats * | cats, |
struct scdScattData * | scatt_data, | ||
int | cat_id, | ||
int | scatt_id | ||
) |
Insert scatter plot data . Inserted scatt_data struct must have same type as cats struct (SC_SCATT_DATA or SC_SCATT_CONDITIONS).
cats | pointer to scCats struct |
scarr_data | pointer to scdScattData struct |
cat_id | id number of category |
scatt_id | id number of scatter plot |
Definition at line 209 of file iscatt_structs.c.
References scdScattData::b_conds_arr, scCats::cats_arr, scCats::cats_idxs, I_id_scatt_to_bands(), scScatts::n_a_scatts, scCats::n_bands, scCats::n_cats, scCats::n_scatts, SC_SCATT_CONDITIONS, SC_SCATT_DATA, scScatts::scatt_idxs, scdScattData::scatt_vals_arr, scScatts::scatts_arr, scScatts::scatts_bands, and scCats::type.
void I_scd_init_scatt_data | ( | struct scdScattData * | scatt_data, |
int | type, | ||
int | n_vals, | ||
void * | data | ||
) |
Insert scatter plot data.
scatt_data | pointer to existing struct scdScattData |
type | SC_SCATT_DATA for scatter plots or SC_SCATT_CONDITIONS for selected areas in scatter plot |
n_vals | number of data values |
data | array of values (unsigned char for SC_SCATT_CONDITIONS, unsigned int for SC_SCATT_DATA) |
Definition at line 261 of file iscatt_structs.c.