|
GRASS 8 Programmer's Manual 8.6.0dev(2026)-4bb960b182
|
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. | |
| 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. | |
| void | I_sc_init_cats (struct scCats *cats, int n_bands, int type) |
| Initialize structure for storing scatter plots data. | |
| void | I_sc_free_cats (struct scCats *cats) |
| Free data of struct scCats, the structure itself remains allocated. | |
| int | I_sc_add_cat (struct scCats *cats) |
| Add category. | |
| 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). | |
| void | I_scd_init_scatt_data (struct scdScattData *scatt_data, int type, int n_vals, void *data) |
| Insert scatter plot data. | |
Imagery library - functions for manipulation with structures used by wx.iscatt (wx Interactive Scatter Plot Tool)
SPDX-FileCopyrightText: 2013 GRASS Development Team SPDX-License-Identifier: GPL-2.0-or-later
Definition in file iscatt_structs.c.
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 68 of file iscatt_structs.c.
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().
Add category.
Category represents group of scatter plots.
| cats | pointer to scCats struct |
Definition at line 153 of file iscatt_structs.c.
References scCats::cats_arr, scCats::cats_ids, scCats::cats_idxs, G_malloc, G_zero(), scCats::n_a_cats, scCats::n_cats, and scCats::n_scatts.
Free data of struct scCats, the structure itself remains allocated.
| cats | pointer to existing scCats struct |
Definition at line 117 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, and scCats::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 87 of file iscatt_structs.c.
References scCats::cats_arr, scCats::cats_ids, scCats::cats_idxs, G_malloc, G_zero(), scCats::n_a_cats, scCats::n_bands, scCats::n_cats, scCats::n_scatts, and scCats::type.
| 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 |
| scatt_data | pointer to scdScattData struct |
| cat_id | id number of category |
| scatt_id | id number of scatter plot |
Definition at line 206 of file iscatt_structs.c.
References 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, and scCats::type.
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 257 of file iscatt_structs.c.
References G_malloc, G_zero(), NULL, SC_SCATT_CONDITIONS, and SC_SCATT_DATA.