#include <signal.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include "python_grasp.h"#include "yamlsettings/yamlsettings.h"#include "../input/grasp_input.h"#include "../output/grasp_output.h"#include "../settings/grasp_settings.h"#include <grasp/utils.h>#include "../controller/grasp_main.h"#include "../controller/grasp_controller.h"#include "../controller/grasp_mpi_engine.h"#include "../controller/mo_grasp_controller.h"#include "../global/grasp_runtime_information.h"#include "../global/grasp_retrieval_characteristic_type.h"#include "../input/drivers/sdata/grasp_input_driver_sdata.h"#include "../input/drivers/sdata/grasp_input_driver_sdata_error_codes.h"#include "../output/grasp_output_segment_result.h"#include "../input/grasp_input_segment.h"#include "../global/grasp_error_codes.h"#include "../output/grasp_output_tile_result_setters.h"#include "mod_par_OS.inc"Functions | |
| void | this_is_just_here_so_that_setters_are_included_in_compiled_library () |
| int | python_sequential (int argc, char **argv, grasp_results_description *python_result, grasp_segment_t *input_segment, sensor_data_t *input_sdata) |
| void | initialize_sdata (sensor_data_t *sdata) |
| int | python_read_segment (char *file_name, grasp_segment_t *segment) |
| int | python_read_sdata (char *file_name, sensor_data_t *sdata) |
| int | python_write_sdata (char *path, sensor_data_t *sdata) |
| int | python_get_index (grasp_segment_t *seg, int t, int x, int y) |
| sensor_data_t * | get_sensor () |
| void | free_ptr (void *ptr) |
| grasp_settings * | python_read_settings (char *settings_text) |
| void | python_reindex_results (grasp_results_description *result_description) |
| grasp_tile_description_t * | python_get_tile_description (int tile_nt, int tile_nx, int tile_ny) |
| int | python_debug_settings (int argc, char **argv, char **settings_debug, char **error_string) |
| size_t | sanity_check_segment_size () |
| Returns byte of the the segment structure. Useful as a quick sanity check that the constants set loaded by the grasp python library is the same one as the one compiled in the binary. More... | |
Variables | |
| int | CONSTANTS_KIMAGE =_KIMAGE |
| int | CONSTANTS_KPARS =_KPARS |
| int | CONSTANTS_KIEDGE =_KIEDGE |
| int | CONSTANTS_KIP =_KIP |
| int | CONSTANTS_NBVM =_NBVM |
| int | CONSTANTS_KSURF =_KSURF |
| int | CONSTANTS_KVERTM =_KVERTM |
| int | CONSTANTS_KNBVM =_KNBVM |
| int | CONSTANTS_KWM =_KWM |
| int | CONSTANTS_KIX =_KIX |
| int | CONSTANTS_KIY =_KIY |
| int | CONSTANTS_KITIME =_KITIME |
| int | CONSTANTS_KMESS =_KMESS |
| int | CONSTANTS_KMpar =_KMpar |
| int | CONSTANTS_KW =_KW |
| int | CONSTANTS_KSD =_KSD |
| int | CONSTANTS_KNT =_KNT |
| int | CONSTANTS_KNpar =_KNpar |
| int | CONSTANTS_KCpar =_KCpar |
| int | CONSTANTS_NRR =_NRR |
| int | CONSTANTS_KIDIM1 =_KIDIM1 |
| int | CONSTANTS_KIDIM2 =_KIDIM2 |
| int | CONSTANTS_KIDIM3 =_KIDIM3 |
| int | CONSTANTS_N_CHEM_MAX =_N_CHEM_MAX |
| int | CONSTANTS_NMG = _NMG |
| int | CONSTANTS_KVERT_WD = _KVERT_WD |
| int | CONSTANTS_KBF = _KBF |
| int | CONSTANTS_NMM = _NMM |
Function Documentation
◆ free_ptr()
| void free_ptr | ( | void * | ptr | ) |
◆ get_sensor()
| sensor_data_t* get_sensor | ( | ) |
◆ initialize_sdata()
| void initialize_sdata | ( | sensor_data_t * | sdata | ) |
◆ python_debug_settings()
| int python_debug_settings | ( | int | argc, |
| char ** | argv, | ||
| char ** | settings_debug, | ||
| char ** | error_string | ||
| ) |
- Parameters
-
argc number of arguments as argc argv arguments first has to be settings in inline format settings_debug information of debug settings into screen error_string text of errors
- Returns
- 0 if everything works, otherwise number of errors
◆ python_get_index()
| int python_get_index | ( | grasp_segment_t * | seg, |
| int | t, | ||
| int | x, | ||
| int | y | ||
| ) |
Return the memory index of the pixel [t, x, y] /!\ index t, x and y start at 1 return -1 if the pixel doesn't exist
◆ python_get_tile_description()
| grasp_tile_description_t* python_get_tile_description | ( | int | tile_nt, |
| int | tile_nx, | ||
| int | tile_ny | ||
| ) |
This function return a tile_description structure from the sizes of the tile
- Parameters
-
segment_ntimes Number of segments it contains in T dimension segment_ncols Number of segments it contains in X dimension segment_nrows Number of segments it contains in Y dimension tile_nt Number of pixels it contains in T dimension tile_nx Number of pixels it contains in X dimension tile_ny Number of pixels it contains in Y dimension
- Returns
- allocated tile_description structure or NULL in case of error
◆ python_read_sdata()
| int python_read_sdata | ( | char * | file_name, |
| sensor_data_t * | sdata | ||
| ) |
◆ python_read_segment()
| int python_read_segment | ( | char * | file_name, |
| grasp_segment_t * | segment | ||
| ) |
Load the sdata file with the given name from disk. Used by pygrasp.SDATA('file.sdat')
◆ python_read_settings()
| grasp_settings* python_read_settings | ( | char * | settings_text | ) |
Read functions and return the structure.
- Parameters
-
settings_text Settings in 'inline' way
- Returns
- allocated settins strucuture or NULL in case of error
◆ python_reindex_results()
| void python_reindex_results | ( | grasp_results_description * | results_description | ) |
This function need to be called if results structure is modified
- Parameters
-
results modified structure tile_description it defined the dimensions of the results
◆ python_sequential()
| int python_sequential | ( | int | argc, |
| char ** | argv, | ||
| grasp_results_description * | python_result, | ||
| grasp_segment_t * | input_segment, | ||
| sensor_data_t * | sdata | ||
| ) |
Entry point to GRASP. Used by pygrasp.run(...)
◆ python_write_sdata()
| int python_write_sdata | ( | char * | path, |
| sensor_data_t * | sdata | ||
| ) |
◆ sanity_check_segment_size()
| size_t sanity_check_segment_size | ( | ) |
Returns byte of the the segment structure. Useful as a quick sanity check that the constants set loaded by the grasp python library is the same one as the one compiled in the binary.
- Returns
- sizeof(grasp_segment_t)
◆ this_is_just_here_so_that_setters_are_included_in_compiled_library()
| void this_is_just_here_so_that_setters_are_included_in_compiled_library | ( | ) |
Variable Documentation
◆ CONSTANTS_KBF
| int CONSTANTS_KBF = _KBF |
◆ CONSTANTS_KCpar
| int CONSTANTS_KCpar =_KCpar |
◆ CONSTANTS_KIDIM1
| int CONSTANTS_KIDIM1 =_KIDIM1 |
◆ CONSTANTS_KIDIM2
| int CONSTANTS_KIDIM2 =_KIDIM2 |
◆ CONSTANTS_KIDIM3
| int CONSTANTS_KIDIM3 =_KIDIM3 |
◆ CONSTANTS_KIEDGE
| int CONSTANTS_KIEDGE =_KIEDGE |
◆ CONSTANTS_KIMAGE
| int CONSTANTS_KIMAGE =_KIMAGE |
◆ CONSTANTS_KIP
| int CONSTANTS_KIP =_KIP |
◆ CONSTANTS_KITIME
| int CONSTANTS_KITIME =_KITIME |
◆ CONSTANTS_KIX
| int CONSTANTS_KIX =_KIX |
◆ CONSTANTS_KIY
| int CONSTANTS_KIY =_KIY |
◆ CONSTANTS_KMESS
| int CONSTANTS_KMESS =_KMESS |
◆ CONSTANTS_KMpar
| int CONSTANTS_KMpar =_KMpar |
◆ CONSTANTS_KNBVM
| int CONSTANTS_KNBVM =_KNBVM |
◆ CONSTANTS_KNpar
| int CONSTANTS_KNpar =_KNpar |
◆ CONSTANTS_KNT
| int CONSTANTS_KNT =_KNT |
◆ CONSTANTS_KPARS
| int CONSTANTS_KPARS =_KPARS |
◆ CONSTANTS_KSD
| int CONSTANTS_KSD =_KSD |
◆ CONSTANTS_KSURF
| int CONSTANTS_KSURF =_KSURF |
◆ CONSTANTS_KVERT_WD
| int CONSTANTS_KVERT_WD = _KVERT_WD |
◆ CONSTANTS_KVERTM
| int CONSTANTS_KVERTM =_KVERTM |
◆ CONSTANTS_KW
| int CONSTANTS_KW =_KW |
◆ CONSTANTS_KWM
| int CONSTANTS_KWM =_KWM |
◆ CONSTANTS_N_CHEM_MAX
| int CONSTANTS_N_CHEM_MAX =_N_CHEM_MAX |
◆ CONSTANTS_NBVM
| int CONSTANTS_NBVM =_NBVM |
◆ CONSTANTS_NMG
| int CONSTANTS_NMG = _NMG |
◆ CONSTANTS_NMM
| int CONSTANTS_NMM = _NMM |
◆ CONSTANTS_NRR
| int CONSTANTS_NRR =_NRR |
