Go to the source code of this file.
Defines | |
#define | GPIV_PIV_FMT "%4.0f %4.0f %12.3f %12.3f %12.3f %2d\n" |
#define | GPIV_PIV_S_FMT "%-12.5f %-12.5f %-12.5f %-12.5f %-6.2f %-2d\n" |
#define | GPIV_SCALAR_FMT "%4.0f %4.0f %12.3f %2d\n" |
#define | GPIV_SCALAR_S_FMT "%-12.3f %-12.3f %-12.3f %-2d\n" |
#define | GPIV_EXT_HEADER ".h" |
#define | GPIV_EXT_RAW_IMAGE ".r" |
#define | GPIV_EXT_PNG_IMAGE ".png" |
#define | GPIV_EXT_PNG_IMAGE_UPCASE ".PNG" |
#define | GPIV_EXT_PNG_IMAGE_PROC "_proc.png" |
#define | GPIV_EXT_PGM_IMAGE ".pgm" |
#define | GPIV_EXT_PGM_IMAGE_UPCASE ".PGM" |
#define | GPIV_EXT_RAW_IMAGE_PROC "_proc.r" |
#define | GPIV_EXT_PAR ".par" |
#define | GPIV_EXT_TA ".ta" |
#define | GPIV_EXT_SUBSTR ".substr" |
#define | GPIV_EXT_GPIV ".gpi" |
#define | GPIV_EXT_GPIV_UPCASE ".GPI" |
#define | GPIV_EXT_PIV ".piv" |
#define | GPIV_EXT_DAVIS ".img" |
#define | GPIV_EXT_DAVIS_UPCASE ".IMG" |
#define | GPIV_EXT_COV ".cov" |
#define | GPIV_EXT_INT ".int" |
#define | GPIV_EXT_OLD ".old.piv" |
#define | GPIV_EXT_ERR_PIV ".err.piv" |
#define | GPIV_EXT_ERR_STAT ".stat" |
#define | GPIV_EXT_PLK ".plk" |
#define | GPIV_EXT_UVHISTO ".pdf" |
#define | GPIV_EXT_VOR ".vor" |
#define | GPIV_EXT_NSTR ".nstr" |
#define | GPIV_EXT_SSTR ".sstr" |
#define | GPIV_EXT_MANI ".ma.piv" |
#define | GPIV_EXT_SA ".sa.piv" |
#define | GPIV_EXT_SC ".sc.piv" |
#define | GPIV_DAVIS_IMG_DEPTH 12 |
#define | GPIV_IMG_PARAM_RESOURCES |
Enumerations | |
enum | GpivDataFormat { GPIV_RR = 1, GPIV_DAV = 2 } |
Functions | |
void | gpiv_io_make_fname (const gchar *fname_base, const gchar *EXT, gchar *fname_out) |
GpivImage * | gpiv_read_image (FILE *fp) |
GpivImage * | gpiv_fread_image (const gchar *fname) |
enum GpivDataFormat | gpiv_find_pivdata_origin (const gchar line[GPIV_MAX_CHARS]) |
GpivPivData * | gpiv_fread_pivdata (const gchar *fname) |
gchar * | gpiv_fwrite_pivdata (const gchar *fname, GpivPivData *piv_data, const gboolean free) |
GpivPivData * | gpiv_read_pivdata (FILE *fp) |
GpivPivData * | gpiv_read_pivdata_fastx (FILE *fp) |
gchar * | gpiv_write_pivdata (FILE *fp, GpivPivData *piv_data, const gboolean free) |
GpivScalarData * | gpiv_fread_scdata (const gchar *fname) |
gchar * | gpiv_fwrite_scdata (const gchar *fname, GpivScalarData *scalar_data, const gboolean free) |
GpivScalarData * | gpiv_read_scdata (FILE *fp) |
gchar * | gpiv_write_scdata (FILE *fp, GpivScalarData *scalar_data, const gboolean free) |
gchar * | gpiv_write_sc_griddata (FILE *fp, GpivScalarData *scalar_data, const gboolean free) |
gchar * | gpiv_write_sc_mtvgriddata (FILE *fp, GpivScalarData *scalar_data, const gboolean free) |
gchar * | gpiv_print_histo (FILE *fp, GpivBinData *bin_data, const gboolean free) |
gchar * | gpiv_print_cumhisto_eqdatbin (FILE *fp, GpivBinData *klass, const gboolean free) |
GpivImage * | gpiv_read_raw_image (FILE *fp) |
GpivImage * | gpiv_fread_raw_image (const gchar *fname) |
gchar * | gpiv_write_raw_image (FILE *fp, GpivImage *gpiv_image) |
gchar * | gpiv_fwrite_raw_image (const gchar *fname, GpivImage *gpiv_image) |
GpivImage * | gpiv_read_png_image (FILE *fp) |
gchar * | gpiv_write_png_image (FILE *fp, GpivImage *gpiv_image, const gboolean free) |
gchar * | gpiv_fcreate_hdf5 (const gchar *fname) |
gchar * | gpiv_fread_hdf5_parameters (const gchar *fname, const gchar *par_key, void *pstruct) |
GpivImage * | gpiv_fread_hdf5_image (const gchar *fname) |
gchar * | gpiv_fwrite_hdf5_image (const gchar *fname, GpivImage *image, const gboolean free) |
gchar * | gpiv_fwrite_hdf5_parameters (const gchar *fname, const gchar *par_key, void *pstruct) |
GpivPivData * | gpiv_fread_hdf5_pivdata (const gchar *fname, const gchar *DATA_KEY) |
gchar * | gpiv_fwrite_hdf5_pivdata (const gchar *fname, GpivPivData *piv_data, const gchar *DATA_KEY, const gboolean free) |
GpivScalarData * | gpiv_fread_hdf5_scdata (const gchar *fname, const gchar *DATA_KEY) |
gchar * | gpiv_fwrite_hdf5_scdata (const gchar *fname, GpivScalarData *scalar_data, const gchar *DATA_KEY, const gboolean free) |
gchar * | gpiv_fread_hdf5_histo (const gchar *fname, GpivBinData *klass, const gchar *DATA_KEY) |
gchar * | gpiv_fwrite_hdf5_histo (const gchar *fname, const GpivBinData *klass, const gchar *DATA_KEY) |
GpivImage * | gpiv_read_davis_image (FILE *fp) |
Variables | |
enum GpivDataFormat |
SOURCES: lib/io.c, lib/io_hdf.c lib/io_image.c lib/io_png.c lib/io_raw.c
LAST MODIFICATION DATE:
Definition in file gpiv-io.h.
#define GPIV_DAVIS_IMG_DEPTH 12 |
#define GPIV_EXT_DAVIS_UPCASE ".IMG" |
#define GPIV_EXT_ERR_PIV ".err.piv" |
#define GPIV_EXT_ERR_STAT ".stat" |
#define GPIV_EXT_GPIV ".gpi" |
#define GPIV_EXT_GPIV_UPCASE ".GPI" |
#define GPIV_EXT_HEADER ".h" |
#define GPIV_EXT_INT ".int" |
#define GPIV_EXT_MANI ".ma.piv" |
#define GPIV_EXT_NSTR ".nstr" |
#define GPIV_EXT_OLD ".old.piv" |
#define GPIV_EXT_PAR ".par" |
#define GPIV_EXT_PGM_IMAGE ".pgm" |
#define GPIV_EXT_PGM_IMAGE_UPCASE ".PGM" |
#define GPIV_EXT_PIV ".piv" |
#define GPIV_EXT_PLK ".plk" |
#define GPIV_EXT_PNG_IMAGE ".png" |
#define GPIV_EXT_PNG_IMAGE_PROC "_proc.png" |
#define GPIV_EXT_PNG_IMAGE_UPCASE ".PNG" |
#define GPIV_EXT_RAW_IMAGE ".r" |
#define GPIV_EXT_RAW_IMAGE_PROC "_proc.r" |
#define GPIV_EXT_SA ".sa.piv" |
#define GPIV_EXT_SC ".sc.piv" |
#define GPIV_EXT_SSTR ".sstr" |
#define GPIV_EXT_SUBSTR ".substr" |
#define GPIV_EXT_TA ".ta" |
#define GPIV_EXT_UVHISTO ".pdf" |
#define GPIV_EXT_VOR ".vor" |
#define GPIV_IMG_PARAM_RESOURCES |
#define GPIV_PIV_FMT "%4.0f %4.0f %12.3f %12.3f %12.3f %2d\n" |
#define GPIV_PIV_S_FMT "%-12.5f %-12.5f %-12.5f %-12.5f %-6.2f %-2d\n" |
#define GPIV_SCALAR_FMT "%4.0f %4.0f %12.3f %2d\n" |
#define GPIV_SCALAR_S_FMT "%-12.3f %-12.3f %-12.3f %-2d\n" |
enum GpivDataFormat |
gchar* gpiv_fcreate_hdf5 | ( | const gchar * | fname | ) |
Creates an hdf5 data file with POSITION, DATA and PARAMETERS groups.
[in] | fname | pointer to complete filename |
enum GpivDataFormat gpiv_find_pivdata_origin | ( | const gchar | line[GPIV_MAX_CHARS] | ) |
Determines the name of the program that generated the data.
[in] | line | character line containing program that generated data |
gchar* gpiv_fread_hdf5_histo | ( | const gchar * | fname, | |
GpivBinData * | klass, | |||
const gchar * | DATA_KEY | |||
) |
Reads histogram data to ouput file in hdf version 5 format.
[in] | fname | pointer to complete filename |
[in] | klass | struct bin containing the values for each bin |
[in] | DATA_KEY | identifier of data type (PEAK_LOCK, RESIDUS, ...) |
GpivImage* gpiv_fread_hdf5_image | ( | const gchar * | fname | ) |
Reads image data to a hdf5 data file.
[in] | fname | pointer to complete filename |
gchar* gpiv_fread_hdf5_parameters | ( | const gchar * | fname, | |
const gchar * | par_key, | |||
void * | pstruct | |||
) |
Reads parameters from hdf5 data file.
[in] | fname | pointer to complete filename |
[in] | par_key | key for apropiate parameter |
[out] | pstruct | parameter structure |
GpivPivData* gpiv_fread_hdf5_pivdata | ( | const gchar * | fname, | |
const gchar * | DATA_KEY | |||
) |
Reads piv data from hdf5 data file.
[in] | fname | pointer to complete filename |
[in] | DATA_KEY | location of the data in the DATA group in the hdf file |
GpivScalarData* gpiv_fread_hdf5_scdata | ( | const gchar * | fname, | |
const gchar * | DATA_KEY | |||
) |
Reads SCALAR data from a hdf5 data file.
[in] | fname | pointer to complete filename |
[in] | DATA_KEY | key to specify data type/origin (NORMAL_STRAIN, ...) |
GpivImage* gpiv_fread_image | ( | const gchar * | fname | ) |
Reads image from file fname.
[in] | fname | complete filename. This is used to pick the image format loader. Eventually checking the format signature is done in the loader itself |
GpivPivData* gpiv_fread_pivdata | ( | const gchar * | fname | ) |
Reads PIV data from file fname.
[in] | fname | complete input filename. |
GpivImage* gpiv_fread_raw_image | ( | const gchar * | fname | ) |
Reads an image from raw binary file. Expects the arrray(s) have not been allocated yet. Reads image data from file.r, header from file.h Eventually, required header info will be read from (system) resources gpiv.conf or $HOME/.gpivrc.
[in] | fname | complete image filename (ending on .r) |
GpivScalarData* gpiv_fread_scdata | ( | const gchar * | fname | ) |
Reads scalar data from file fname.
[in] | fname | complete input filename. |
gchar* gpiv_fwrite_hdf5_histo | ( | const gchar * | fname, | |
const GpivBinData * | klass, | |||
const gchar * | DATA_KEY | |||
) |
Writes histogram data to ouput file in hdf version 5 format.
[in] | fname | pointer to complete filename |
[in] | klass | struct bin containing the values for each bin |
[in] | DATA_KEY | identifier of data type (PEAK_LOCK, RESIDUS, ...) |
gchar* gpiv_fwrite_hdf5_image | ( | const gchar * | fname, | |
GpivImage * | image, | |||
const gboolean | free | |||
) |
Writes image data to file in hdf version 5 format.
[in] | fname | pointer to complete filename |
[in] | image | image frkames and header |
[in] | free | boolean whether to free memory of image arrays |
gchar* gpiv_fwrite_hdf5_parameters | ( | const gchar * | fname, | |
const gchar * | par_key, | |||
void * | pstruct | |||
) |
Writes parameters to hdf5 data file.
[in] | fname | pointer to complete filename |
[in] | par_key | key for apropiate parameter |
[in] | pstruct | parameter structure |
gchar* gpiv_fwrite_hdf5_pivdata | ( | const gchar * | fname, | |
GpivPivData * | piv_data, | |||
const gchar * | DATA_KEY, | |||
const gboolean | free | |||
) |
Writes PIV data to file in hdf version 5 format.
[in] | fname | pointer to complete filename |
[in] | piv_data | piv data containing all variables in a datafile |
[in] | DATA_KEY | location of the data in the DATA group in the hdf file |
[in] | free | boolean whether to free memory of PIV data |
gchar* gpiv_fwrite_hdf5_scdata | ( | const gchar * | fname, | |
GpivScalarData * | scalar_data, | |||
const gchar * | DATA_KEY, | |||
const gboolean | free | |||
) |
Writes SCALAR data to a file in hdf version 5 format.
[in] | fname | pointer to complete filename |
[in] | scalar_data | struct GpivScalarData containing all variables in a datafile |
[in] | DATA_KEY | identifier of data type |
[in] | free | boolean whether to free memory of SCALAR data |
gchar* gpiv_fwrite_pivdata | ( | const gchar * | fname, | |
GpivPivData * | piv_data, | |||
const gboolean | free | |||
) |
Writes PIV data to file fname in ASCII format.
[in] | piv_data | PIV data |
[in] | fname | complete output filename. |
[in] | free | flag if allocated memory if piv_data will be freed |
gchar* gpiv_fwrite_raw_image | ( | const gchar * | fname, | |
GpivImage * | gpiv_image | |||
) |
Writes raw binary image data to file.r and header to file.h.
[in] | fname | complete image filename (ending on .r) |
[in] | gpiv_image | image frames and header info |
gchar* gpiv_fwrite_scdata | ( | const gchar * | fname, | |
GpivScalarData * | scalar_data, | |||
const gboolean | free | |||
) |
Writes scalar data to file fname in ASCII format.
[in] | scalar_data | scalar data |
[in] | fname | complete output filename. |
[in] | free | flag if allocated memory if piv_data will be freed |
void gpiv_io_make_fname | ( | const gchar * | fname_base, | |
const gchar * | EXT, | |||
gchar * | fname_out | |||
) |
Constructs (output) filename from base name and extension.
[in] | fname_base | file base name |
[in] | EXT | file extension name |
[out] | fname_out | completed filename |
gchar* gpiv_print_cumhisto_eqdatbin | ( | FILE * | fp, | |
GpivBinData * | klass, | |||
const gboolean | free | |||
) |
Writing cumulative histogram data with an equal number of date per bin or klass to fp. Special output for validation; work around to print float data as y-values.
[in] | fp | output file |
[in] | klass | struct GpivBinData containing the values for each bin |
[in] | free | flag if allocated memory if scalar_data will be freed |
gchar* gpiv_print_histo | ( | FILE * | fp, | |
GpivBinData * | bin_data, | |||
const gboolean | free | |||
) |
Writes bins data to file in histogram format.
[in] | fp | output file. If NULL, stdout is used. |
[in] | bin_data | data containing the values for each bin |
[in] | free | flag if allocated memory if scalar_data will be freed |
GpivImage* gpiv_read_davis_image | ( | FILE * | fp | ) |
Reads Davis formatted image, with ext .IMG from file.
[in] | fp | pointer to input file |
GpivImage* gpiv_read_image | ( | FILE * | fp | ) |
Reads image from fp. Image will have to be png formatted.
[in] | fp | file pointer. If NULL, stdin will be used. |
GpivPivData* gpiv_read_pivdata | ( | FILE * | fp | ) |
Reads PIV data from fp.
[in] | fp | input file. If NULL, stdin is used. |
GpivPivData* gpiv_read_pivdata_fastx | ( | FILE * | fp | ) |
Reads PIV data from fp with fast running x-position variables. (1st column in data stream)
[in] | fp | input file. If NULL, stdin is used. |
GpivImage* gpiv_read_png_image | ( | FILE * | fp | ) |
Reads png formatted image.
[in] | fp | file pointer |
GpivImage* gpiv_read_raw_image | ( | FILE * | fp | ) |
Reads an image from raw binary file. Expects the arrray (s) have not been allocated yet. Eventually, required header info will be read from (system) resources gpiv.conf or $HOME/.gpivrc.
[in] | fp | input file. If NULL, stdin will be used |
GpivScalarData* gpiv_read_scdata | ( | FILE * | fp | ) |
Reads scalar data form ascii file.
[in] | fp | input file. If NULL, stin is used. |
gchar* gpiv_write_pivdata | ( | FILE * | fp, | |
GpivPivData * | piv_data, | |||
const gboolean | free | |||
) |
Writes PIV data to fp in ASCII format.
[in] | piv_data | PIV data |
[in] | fp | output file. If NULL, stout is used. |
[in] | free | flag if allocated memory if piv_data will be freed |
gchar* gpiv_write_png_image | ( | FILE * | fp, | |
GpivImage * | gpiv_image, | |||
const gboolean | free | |||
) |
Writes image data and header to png formatted image. Optionally frees allocated memory.
[in] | fp | output file. |
[in] | gpiv_image | image header and data |
[in] | free | boolean whether to free memory of image arrays |
gchar* gpiv_write_raw_image | ( | FILE * | fp, | |
GpivImage * | gpiv_image | |||
) |
Writes raw binary image frames to fp.
[in] | fp | output file. If NULL, stdout will be used |
[in] | gpiv_image | image frames and header |
gchar* gpiv_write_sc_griddata | ( | FILE * | fp, | |
GpivScalarData * | scalar_data, | |||
const gboolean | free | |||
) |
Writes scalar data to file in grid format for gnuplot.
[in] | fp | output file. If NULL, stdout is used. |
[in] | scalar_data | scalar data containing all variables in a datafile |
[in] | free | flag if allocated memory if scalar_data will be freed |
gchar* gpiv_write_sc_mtvgriddata | ( | FILE * | fp, | |
GpivScalarData * | scalar_data, | |||
const gboolean | free | |||
) |
Writes scalar data to file in grid format for plotmtv.
[in] | fp | output file. If NULL, stdout is used. |
[in] | scalar_data | scalar data containing all variables in a datafile |
[in] | free | flag if allocated memory if scalar_data will be freed |
gchar* gpiv_write_scdata | ( | FILE * | fp, | |
GpivScalarData * | scalar_data, | |||
const gboolean | free | |||
) |
Writes scalar data to file.
[in] | fp | output file. If NULL, stout is used. |
[in] | scalar_data | scalar data containing all variables in a datafile |
[in] | free | flag if allocated memory if scalar_data will be freed |
enum GpivDataFormat pdf |