55 #define PRINT_USAGE(rc) \ 56 fprintf(stderr, "Usage: %s [ -s sigma ] [ -q ] GEOMETRY_TABLE FIXED_TABLE\n",\ 58 cpl_end(); return (rc); 60 int main(
int argc,
char **argv)
62 cpl_init(CPL_INIT_DEFAULT);
64 cpl_errorstate state = cpl_errorstate_get();
75 cpl_boolean qc = CPL_FALSE;
77 for (i = 1; i < argc; i++) {
78 if (strncmp(argv[i],
"-s", 3) == 0) {
81 sigma = atof(argv[i]);
85 }
else if (strncmp(argv[i],
"-q", 3) == 0) {
87 }
else if (strncmp(argv[i],
"-", 1) == 0) {
90 if (tiname && toname) {
100 if (!tiname || !toname) {
103 cpl_msg_set_level(CPL_MSG_DEBUG);
106 cpl_table_delete(gt->
table);
107 gt->
table = cpl_table_load(tiname, 1, 1);
114 cpl_propertylist *pheader = cpl_propertylist_load(tiname, 0);
119 cpl_table_save(gt->
table, pheader, NULL, toname, CPL_IO_CREATE);
120 cpl_propertylist_delete(pheader);
123 if (rc != CPL_ERROR_NONE) {
124 cpl_msg_error(__func__,
"Fixing the table failed: %s",
125 cpl_error_get_message());
126 }
else if (!cpl_errorstate_is_equal(state)) {
127 cpl_msg_error(__func__,
"An error occurred, unrelated to fixing the table: %s",
128 cpl_error_get_message());
cpl_error_code muse_geo_correct_slices(muse_geo_table *aGeo, cpl_propertylist *aHeader, double aSigma)
Correct deviant slices in an existing MUSE geometry table.
cpl_error_code muse_geo_qc_global(const muse_geo_table *aGeoTable, cpl_propertylist *aHeader)
Add the global QC parameters to the geometry table.
cpl_table * table
The geometry table.
Structure definition of MUSE geometry table.
void muse_geo_table_delete(muse_geo_table *aGeo)
Deallocate memory associated to a geometry table object.
muse_geo_table * muse_geo_table_new(cpl_size aNRows, double aScale)
Create a new MUSE geometry table.
void muse_processing_recipeinfo(cpl_plugin *)
Output main pipeline configuration, inputs, and parameters.