Main Page | Files | Data Structures | Functions | Global Variables | Deprecated list

/home/gerber/gpiv_all/libgpiv-0.4.0/include/gpiv/io.h File Reference

module for input/output More...


Defines

#define GPIV_ASCII_IMG_FMT   "%d %d %f"
#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_ASCII_IMAGE   ".dat"
#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_CAM_PAR_KEY   "CAM."
#define GPIV_TRIG_PAR_KEY   "TRIG."
#define GPIV_IMAGE_PAR_KEY   "IMG."
#define GPIV_IMAGEPROC_PAR_KEY   "IMGPROC."
#define GPIV_EVAL_PAR_KEY   "EVAL."
#define GPIV_VALID_PAR_KEY   "VALID."
#define GPIV_POST_PAR_KEY   "POST."
#define GPIV_DAVIS_IMG_DEPTH   12

Functions

void gpiv_io_make_fname (char *fname_base, char *EXT, char *fname_out)
char * gpiv_fread_image (char *fname, guint16 ***img1, guint16 ***img2, GpivImagePar *image_par)
void gpiv_write_image (guint16 **img1, guint16 **img2, GpivImagePar image_par)
char * gpiv_fread_ascii_image (char *fname, guint16 **img, GpivImagePar image_par)
char * gpiv_fwrite_ascii_image (char *fname, guint16 **img, GpivImagePar image_par)
void gpiv_read_ascii_image (guint16 **img, GpivImagePar image_par)
void gpiv_write_ascii_image (guint16 **img, GpivImagePar image_par)
int gpiv_count_pivdata (GpivPivData *piv, char data_line[GPIV_MAX_LINES][GPIV_MAX_CHARS], int *ndata_lines)
int gpiv_fcount_pivdata (char *fname, GpivPivData *piv)
int gpiv_find_pivdata_origin (char line[GPIV_MAX_CHARS])
int gpiv_find_pivdata_scale (char line[GPIV_MAX_CHARS])
void gpiv_read_pivdata (GpivPivData *piv, char data_line[GPIV_MAX_LINES][GPIV_MAX_CHARS], int ndata_lines, char comment_line[GPIV_MAX_LINES_C][GPIV_MAX_CHARS], int *ncomment_lines)
char * gpiv_fread_pivdata (char *fname, GpivPivData *piv, char comment_line[GPIV_MAX_LINES_C][GPIV_MAX_CHARS], int *ncomment_lines)
void gpiv_write_pivdata (GpivPivData *piv, char comment_line[GPIV_MAX_LINES_C][GPIV_MAX_CHARS], int ncomment_lines, int scale, char *RCSID)
char * gpiv_fwrite_pivdata (char *fname, GpivPivData *piv, char comment_line[GPIV_MAX_LINES_C][GPIV_MAX_CHARS], int ncomment_lines, int scale, char *RCSID)
char * gpiv_fread_scdata (char *fname, GpivScalarData *scalar_data, char comment_line[GPIV_MAX_LINES_C][GPIV_MAX_CHARS], int *ncomment_lines)
void gpiv_write_scdata (GpivScalarData *scalar, char comment_line[GPIV_MAX_LINES_C][GPIV_MAX_CHARS], int ncomment_lines, int scale, char *RCSID)
char * gpiv_fwrite_scdata (char *fname, GpivScalarData *scalar, char comment_line[GPIV_MAX_LINES_C][GPIV_MAX_CHARS], int ncomment_lines, int scale, char *RCSID)
char * gpiv_fwrite_sc_griddata (char *fname, GpivScalarData *scalar, char comment_line[GPIV_MAX_LINES_C][GPIV_MAX_CHARS], int ncomment_lines, int scale, char *RCSID)
char * gpiv_fwrite_sc_mtvgriddata (char *fname, GpivScalarData *scalar, char comment_line[GPIV_MAX_LINES_C][GPIV_MAX_CHARS], int ncomment_lines, int scale, char *RCSID)
void gpiv_print_histo (GpivBinData *klass, char comment_line[GPIV_MAX_LINES_C][GPIV_MAX_CHARS], int ncomment_lines, int scale, char *RCSID)
void gpiv_fprint_histo (char *fname, GpivBinData *klass, char comment_line[GPIV_MAX_LINES_C][GPIV_MAX_CHARS], int ncomment_lines, char *RCSID)
void gpiv_print_cumhisto_eqdatbin (GpivBinData *klass, char comment_line[GPIV_MAX_LINES_C][GPIV_MAX_CHARS], int ncomment_lines, char *RCSID)
void gpiv_fprint_cumhisto_eqdatbin (char *fname, GpivBinData *klass, char comment_line[GPIV_MAX_LINES_C][GPIV_MAX_CHARS], int ncomment_lines, char *RCSID)
gchar * gb_fread_image (char *fname, guint16 **img1, guint16 **img2, GpivImagePar image_par)
gchar * gb_fwrite_image (char *fname, guint16 **img1, guint16 **img2, GpivImagePar image_par)
void gb_read_image (guint16 **img1, guint16 **img2, GpivImagePar image_par)
void gb_write_image (guint16 **img1, guint16 **img2, GpivImagePar image_par)
gchar * gpiv_open_raw_image (gchar *fname, guint16 ***img1, guint16 ***img2, GpivImagePar *image_par)
gchar * gpiv_fread_raw_image (char *fname, guint16 **img1, guint16 **img2, GpivImagePar image_par)
gchar * gpiv_fwrite_raw_image (char *fname, guint16 **img1, guint16 **img2, GpivImagePar image_par)
gchar * gpiv_fread_pgm_image (char *fname, guint16 **img1, guint16 **img2, GpivImagePar *image_par, gint line_nr)
gchar * gpiv_fwrite_pgm_image (char *fname, guint16 **img1, guint16 **img2, GpivImagePar image_par)
gchar * gpiv_open_png_image (gchar *fname, guint16 ***img1, guint16 ***img2, GpivImagePar *image_par)
gchar * gpiv_read_png_image (FILE *fp, guint16 ***image1_p, guint16 ***image2_p, GpivImagePar *image_par, gboolean allocate)
gchar * gpiv_write_png_image (FILE *fp, guint16 ***image1_p, guint16 ***image2_p, GpivImagePar *image_par, gboolean free)
gchar * gpiv_open_hdf5_image (gchar *fname, guint16 ***img1, guint16 ***img2, GpivImagePar *image_par)
char * gpiv_fcreate_hdf5 (char *fname)
char * gpiv_fread_hdf5_parameters (char *fname, const char *par_key, void *pstruct)
char * gpiv_fread_hdf5_image (char *fname, guint16 **img1, guint16 **img2, GpivImagePar *image_par)
char * gpiv_fwrite_hdf5_image (char *fname, guint16 **img1, guint16 **img2, GpivImagePar *image_par)
char * gpiv_fwrite_hdf5_parameters (char *fname, const char *par_key, void *pstruct)
char * gpiv_fcount_hdf5_data (char *fname, int *ny, int *nx)
char * gpiv_fread_hdf5_piv_position (char *fname, GpivPivData *piv_data, char *RCSID, int *scale)
char * gpiv_fwrite_hdf5_piv_position (char *fname, GpivPivData *piv_data, char *RCSID, int *scale)
char * gpiv_fread_hdf5_pivdata (char *fname, GpivPivData *piv_data, char *DATA_KEY, char *RCSID, int *scale)
char * gpiv_fwrite_hdf5_pivdata (char *fname, GpivPivData *piv_data, char *DATA_KEY, char *RCSID, int *scale)
char * gpiv_fread_hdf5_sc_position (char *fname, GpivScalarData *scdata)
char * gpiv_fwrite_hdf5_sc_position (char *fname, GpivScalarData *scdata, char *RCSID, int *scale)
char * gpiv_fread_hdf5_scdata (char *fname, GpivScalarData *scalar_data, char *DATA_KEY, char *RCSID)
char * gpiv_fwrite_hdf5_scdata (char *fname, GpivScalarData *scalar_data, char *DATA_KEY, char *RCSID)
char * gpiv_fread_hdf5_histo (char *fname, GpivBinData *klass, char *DATA_KEY, char *RCSID)
char * gpiv_fwrite_hdf5_histo (char *fname, GpivBinData *klass, char *DATA_KEY, char *RCSID)
gchar * gpiv_open_davis_image (gchar *fname, guint16 ***img1, guint16 ***img2, GpivImagePar *image_par)
gchar * gpiv_fread_davis_image (char *fname, guint16 **img1, guint16 **img2, GpivImagePar image_par)
gchar * gpiv_read_davis_image (FILE *fp, guint16 **img1, guint16 **img2, GpivImagePar image_par)


Detailed Description

module for input/output

SOURCES: lib/io.c, lib/io_hdf.c lib/io_image.c lib/io_png.c lib/io_raw.c

LAST MODIFICATION DATE:

Id
io.h,v 1.16 2007-01-29 11:53:54 gerber Exp

Define Documentation

#define GPIV_ASCII_IMG_FMT   "%d %d %f"

Ascii Image Format

#define GPIV_CAM_PAR_KEY   "CAM."

Key of camera parameters

#define GPIV_DAVIS_IMG_DEPTH   12

Depth of mages generated by LaVision's Davis (general: PCO cameras)

#define GPIV_EVAL_PAR_KEY   "EVAL."

Key of evaluation parameters

#define GPIV_EXT_ASCII_IMAGE   ".dat"

Extension of ASCII image file name

#define GPIV_EXT_COV   ".cov"

Extension of covariance data

#define GPIV_EXT_DAVIS   ".img"

DaVis image format

#define GPIV_EXT_DAVIS_UPCASE   ".IMG"

Uppercase DaVis image format

#define GPIV_EXT_ERR_PIV   ".err.piv"

Extension of erroneous-corrected piv file name

#define GPIV_EXT_ERR_STAT   ".stat"

Extension of residu statistics

#define GPIV_EXT_GPIV   ".gpi"

Extension of gpiv file name (HDF 5 format)

#define GPIV_EXT_GPIV_UPCASE   ".GPI"

Uppercase extension of gpiv file name (HDF 5 format)

#define GPIV_EXT_HEADER   ".h"

Extension of image header file name

#define GPIV_EXT_INT   ".int"

Extension of interrogation area

#define GPIV_EXT_MANI   ".ma.piv"

Extension of manipulated file name (ASCII format)

#define GPIV_EXT_NSTR   ".nstr"

Extension of normal strain file name (ASCII format)

#define GPIV_EXT_OLD   ".old.piv"

Extension of old displacements

#define GPIV_EXT_PAR   ".par"

Extension of file with used parameters

#define GPIV_EXT_PGM_IMAGE   ".pgm"

Extension of raw portable graymap (pgm) image file name

#define GPIV_EXT_PGM_IMAGE_UPCASE   ".PGM"

Uppercase extension of pgm

#define GPIV_EXT_PIV   ".piv"

Extension of piv file name (ASCII format)

#define GPIV_EXT_PLK   ".plk"

Extension of peaklocking output

#define GPIV_EXT_PNG_IMAGE   ".png"

Extension of png (Portable Network Graphics) formatted image file name

#define GPIV_EXT_PNG_IMAGE_PROC   "_proc.png"

Extension of processed png image file name

#define GPIV_EXT_PNG_IMAGE_UPCASE   ".PNG"

Uppercase extension of png

#define GPIV_EXT_RAW_IMAGE   ".r"

Extension of raw image file name

#define GPIV_EXT_RAW_IMAGE_PROC   "_proc.r"

Extension of processed raw binary image file name

#define GPIV_EXT_SA   ".sa.piv"

Extension of spatial averaged file name (ASCII format)

#define GPIV_EXT_SC   ".sc.piv"

Extension of scaled data file name (ASCII format)

#define GPIV_EXT_SSTR   ".sstr"

Extension of shear strain file name (ASCII format)

#define GPIV_EXT_SUBSTR   ".substr"

Extension of file name with substracted data

#define GPIV_EXT_TA   ".ta"

Extension of time averaged file name

#define GPIV_EXT_UVHISTO   ".pdf"

Extension of displacement histogram

#define GPIV_EXT_VOR   ".vor"

Extension of vorticity strain file name (ASCII format)

#define GPIV_IMAGE_PAR_KEY   "IMG."

Key of image parameters

#define GPIV_IMAGEPROC_PAR_KEY   "IMGPROC."

Key of image processing parameters

#define GPIV_PIV_FMT   "%4.0f %4.0f %12.3f %12.3f %12.3f %2d\n"

Piv data Format

#define GPIV_PIV_S_FMT   "%-12.5f %-12.5f %-12.5f %-12.5f %-6.2f %-2d\n"

Piv scaled data Format

#define GPIV_POST_PAR_KEY   "POST."

Key of post processing parameters

#define GPIV_SCALAR_FMT   "%4.0f %4.0f %12.3f %2d\n"

Scalar data Format with PIV data positions

#define GPIV_SCALAR_S_FMT   "%-12.3f %-12.3f %-12.3f %-2d\n"

Scalar data Format with PIV scaled data positions

#define GPIV_TRIG_PAR_KEY   "TRIG."

Key of trigger parameters

#define GPIV_VALID_PAR_KEY   "VALID."

Key of validation processing parameters


Function Documentation

gchar* gb_fread_image ( char *  fname,
guint16 **  img1,
guint16 **  img2,
GpivImagePar  image_par 
)

Reads raw image data from file. Previously called gpiv_fread_image. Redirects to gpiv_fread_raw_image.

Parameters:
[in] fname pointer to complete filename
[in] image_par image parameters containing number of rows an columns
[out] img1 first binary image
[out] img2 second binary image
Returns:
NULL on success or *err_msg on failure

gchar* gb_fwrite_image ( char *  fname,
guint16 **  img1,
guint16 **  img2,
GpivImagePar  image_par 
)

Writes binary image to file. Previously called gpiv_fwrite_image. Redirects to gpiv_fwrite_raw_image.

Parameters:
[in] fname pointer to complete filename
[in] img1 first 2-dimensional matrix containing nrows x ncoloms pixels
[in] img2 second 2-dimensional matrix containing nrows x ncoloms pixels
[in] image_par image parameters containing number of rows an columns
Returns:
NULL on success or *err_msg on failure

void gb_read_image ( guint16 **  img1,
guint16 **  img2,
GpivImagePar  image_par 
)

Reads raw data image from stdin. Previously called gpiv_read_image. Redirects to gpiv_fread_raw_image.

Parameters:
[in] image_par image parameters containing number of rows an columns
[out] img1 first binary image
[out] img2 second binary image
Returns:
void

void gb_write_image ( guint16 **  img1,
guint16 **  img2,
GpivImagePar  image_par 
)

Writes binary image to stdout. Previously called gpiv_write_image. Redirects to gpiv_write_raw_image

Parameters:
[in] img1 first binary image
[in] img2 second binary image
[in] image_par image parameters containing number of rows an columns
Returns:
void

int gpiv_count_pivdata ( GpivPivData piv,
char  data_line[GPIV_MAX_LINES][GPIV_MAX_CHARS],
int *  ndata_lines 
)

Reads data from STDIN to find array length of x-and y data, (piv.n, piv.y)provided that both x and y-data are in incremental or decremental order. Determines if scaled data have been used in order to determine which format/header has to be used for writing the data

Parameters:
[in] piv piv data to be read
[out] data_line all lines that are read from STDIN
[out] ndata_lines total number of lines, including comment lines
Returns:
scale 0 or 1 for (non) scaled data

char* gpiv_fcount_hdf5_data ( char *  fname,
int *  ny,
int *  nx 
)

Reads array lengths of 2-dimensional data.

Parameters:
[in] fname pointer to complete filename
[out] ny length of first array index
[out] nx length of second array index
Returns:
NULL on success or *err_msg on failure

int gpiv_fcount_pivdata ( char *  fname,
GpivPivData piv 
)

Reads data from ASCII file to find array length of x-and y data (piv.n, piv.y ), provided that both x and y-data are in incremental or decremental order. Determines if scaled data have been used in order to determine which format/header has to be used for writing the data

Parameters:
[in] fname pointer to complete filename
[in] piv piv data to be read
Returns:
scale 0 or 1 for (non) scaled data

char* gpiv_fcreate_hdf5 ( char *  fname  ) 

Creates an hdf5 data file with POSITION, DATA and PARAMETERS groups.

Parameters:
[in] fname pointer to complete filename
Returns:
NULL on success or *err_msg on failure

int gpiv_find_pivdata_origin ( char  line[GPIV_MAX_CHARS]  ) 

Determines the name of the program that generated the data

Parameters:
[in] line character line containing program that generated data
Returns:
pdf enumerator of data origin

int gpiv_find_pivdata_scale ( char  line[GPIV_MAX_CHARS]  ) 

Determines if the data have been scaled in order to read x-and y positions as floating point varibles

Parameters:
[in] line character line containing program that generated data
Returns:
scale 1 if scaled, else 0

void gpiv_fprint_cumhisto_eqdatbin ( char *  fname,
GpivBinData klass,
char  comment_line[GPIV_MAX_LINES_C][GPIV_MAX_CHARS],
int  ncomment_lines,
char *  RCSID 
)

Writes cumulative histogram data with an equal number of date per bin or klass to ouput file Special output for validation.; work around to print float data as y-values.

Parameters:
[in] fname pointer to complete filename
[in] klass struct bin containing the values for each bin
[in] comment_line lines contain comment (staring with '#' sign at first column)
[in] ncomment_lines number of comment lines
[in] RCSID identifier of program that generated the output datafile
Returns:
void

void gpiv_fprint_histo ( char *  fname,
GpivBinData klass,
char  comment_line[GPIV_MAX_LINES_C][GPIV_MAX_CHARS],
int  ncomment_lines,
char *  RCSID 
)

Writes bins data to file in histogram format

Parameters:
[in] fname pointer to complete filename
[in] klass struct bin containing the values for each bin
[in] comment_line lines contain comment (staring with '#' sign at first column)
[in] ncomment_lines number of comment lines
[in] RCSID identifier of program that generated the output datafile
Returns:
void

char* gpiv_fread_ascii_image ( char *  fname,
guint16 **  img,
GpivImagePar  image_par 
)

Reads ASCII data image from file

Parameters:
[in] fname pointer to complete filename
[in] image_par image parameters containing number of rows an columns
[out] img 2-dimensional matrix containing nrows x ncoloms pixels
Returns:
NULL on success or *err_msg on failure

gchar* gpiv_fread_davis_image ( char *  fname,
guint16 **  img1,
guint16 **  img2,
GpivImagePar  image_par 
)

Reads Davis formatted image, with ext .img from file.

Parameters:
[in] fname pointer to complete filename
[in] image_par containing image dimensions and other image specs
[out] img1 image data of first image
[out] img2 image data of second image
Returns:
NULL on success or *err_msg on failure

char* gpiv_fread_hdf5_histo ( char *  fname,
GpivBinData klass,
char *  DATA_KEY,
char *  RCSID 
)

Reads histogram data to ouput file in hdf version 5 format.

Parameters:
[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, ...)
[in] RCSID identifier of program that generated the output datafile
Returns:
NULL on success or *err_msg on failure

char* gpiv_fread_hdf5_image ( char *  fname,
guint16 **  img1,
guint16 **  img2,
GpivImagePar image_par 
)

Reads image data to a hdf5 data file.

Parameters:
[in] fname pointer to complete filename
[in] image_par image parameters
[out] img1 first image of an image pair
[out] img1 second image of an image pair
Returns:
NULL on success or *err_msg on failure

char* gpiv_fread_hdf5_parameters ( char *  fname,
const char *  par_key,
void *  pstruct 
)

Reads parameters from hdf5 data file.

Parameters:
[in] fname pointer to complete filename
[in] par_key key for apropiate parameter
[out] pstruct parameter structure
Returns:
NULL on success or *err_msg on failure

char* gpiv_fread_hdf5_piv_position ( char *  fname,
GpivPivData piv_data,
char *  RCSID,
int *  scale 
)

Reads position data from hdf5 data file into GpivPivData struct.

Parameters:
[in] fname pointer to complete filename
[out] piv_data parameter structure
[out] RCSID identifier of program that generated datafile
[out] scale flag for scaled piv_data
Returns:
NULL on success or *err_msg on failure

char* gpiv_fread_hdf5_pivdata ( char *  fname,
GpivPivData piv_data,
char *  DATA_KEY,
char *  RCSID,
int *  scale 
)

Reads piv data from hdf5 data file.

Parameters:
[in] fname pointer to complete filename
[out] piv_data struct piv_data containing all variables in a datafile piv.nx and piv.ny have to be known.
[out] DATA_KEY location of the data in the DATA group in the hdf file
[out] RCSID identifier of program that generated datafile
[out] scale flag for scaled piv_data
Returns:
NULL on success or *err_msg on failure

char* gpiv_fread_hdf5_sc_position ( char *  fname,
GpivScalarData scdata 
)

Reads position data from hdf5 data file into GpivScalarData struct.

Parameters:
[in] fname pointer to complete filename
[out] scdata parameter structure
Returns:
NULL on success or *err_msg on failure

char* gpiv_fread_hdf5_scdata ( char *  fname,
GpivScalarData scalar_data,
char *  DATA_KEY,
char *  RCSID 
)

Writes SCALAR data to a hdf5 data file.

Parameters:
[in] fname pointer to complete filename
[in] DATA_KEY key to specify data type/origin (NORMAL_STRAIN, ...)
[in] RCSID identifier of program that generated the output datafile
[out] scalar_data 
Returns:
NULL on success or *err_msg on failure

char* gpiv_fread_image ( char *  fname,
guint16 ***  img1,
guint16 ***  img2,
GpivImagePar image_par 
)

Reads raw image data from file

Parameters:
[in] fname pointer to complete filename
[in] image_par pointer to image parameter structure containing image dimensions and other info
[out] img1 pointer to first binary image
[out] img2 pointer to second binary image
Returns:
NULL on success or *err_msg on failure

gchar* gpiv_fread_pgm_image ( char *  fname,
guint16 **  img1,
guint16 **  img2,
GpivImagePar image_par,
gint  line_nr 
)

Reads raw portable graymap (pgm) format image data from file.

Parameters:
[in] fname pointer to complete filename
[in] image_par image parameters containing number of rows an columns
[in] line_nr number of lines
[out] img1 first binary image, memory will be allocated here
[out] img2 second binary image, memory will be allocated here
Returns:
NULL on success or *err_msg on failure
Deprecated:
pgm images are converted to png by netbpm before reading

char* gpiv_fread_pivdata ( char *  fname,
GpivPivData piv,
char  comment_line[GPIV_MAX_LINES_C][GPIV_MAX_CHARS],
int *  ncomment_lines 
)

Reads PIV data from ascii data file

Parameters:
[in] fname pointer to complete filenamep
[out] piv struct piv_data containing all variables in a datafile piv.nx and piv.ny have to be known.
[out] comment_line lines contain comment (staring with '#' sign at first column)
[out] ncomment_lines number of comment lines
Returns:
NULL on success or *err_msg on failure

gchar* gpiv_fread_raw_image ( char *  fname,
guint16 **  img1,
guint16 **  img2,
GpivImagePar  image_par 
)

Reads raw image data from file.

Parameters:
[in] fname pointer to complete filename
[in] image_par image parameters containing number of rows an columns
[out] img1 first binary image
[out] img2 second binary image
Returns:
NULL on success or *err_msg on failure

char* gpiv_fread_scdata ( char *  fname,
GpivScalarData scalar_data,
char  comment_line[GPIV_MAX_LINES_C][GPIV_MAX_CHARS],
int *  ncomment_lines 
)

Reads scalar data form ascii file

Parameters:
[in] fname pointer to complete filename
[out] scalar_data struct piv_data containing all variables in a datafile piv.nx and piv.ny have to be known.
[out] comment_line lines contain comment (staring with '#' sign at first column)
[out] ncomment_lines number of comment lines
Returns:
NULL on success or *err_msg on failure

char* gpiv_fwrite_ascii_image ( char *  fname,
guint16 **  img,
GpivImagePar  image_par 
)

Writes ASCII data image to file

Parameters:
[in] fname pointer to complete filename
[in] img 2-dimensional matrix containing nrows x ncoloms pixels
[in] image_par image parameters containing number of rows an columns
Returns:
NULL on success or *err_msg on failure

char* gpiv_fwrite_hdf5_histo ( char *  fname,
GpivBinData klass,
char *  DATA_KEY,
char *  RCSID 
)

Writes histogram data to ouput file in hdf version 5 format.

Parameters:
[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, ...)
[in] RCSID identifier of program that generated the output datafile
Returns:
NULL on success or *err_msg on failure

char* gpiv_fwrite_hdf5_image ( char *  fname,
guint16 **  img1,
guint16 **  img2,
GpivImagePar image_par 
)

Writes image data to file in hdf version 5 format.

Parameters:
[in] fname pointer to complete filename
[in] img1 first image of an image pair
[in] img1 second image of an image pair
[in] image_par image parameters
Returns:
NULL on success or *err_msg on failure

char* gpiv_fwrite_hdf5_parameters ( char *  fname,
const char *  par_key,
void *  pstruct 
)

Writes parameters to hdf5 data file.

Parameters:
[in] fname pointer to complete filename
[in] par_key key for apropiate parameter
[in] pstruct parameter structure
Returns:
NULL on success or *err_msg on failure

char* gpiv_fwrite_hdf5_piv_position ( char *  fname,
GpivPivData piv_data,
char *  RCSID,
int *  scale 
)

Writess position data to hdf5 data file into GpivPivData struct.

Parameters:
[in] fname pointer to complete filename
[in] piv_data parameter structure
[in] scale flag for scaled piv_data
[out] RCSID identifier of program that generated datafile
Returns:
NULL on success or *err_msg on failure

char* gpiv_fwrite_hdf5_pivdata ( char *  fname,
GpivPivData piv_data,
char *  DATA_KEY,
char *  RCSID,
int *  scale 
)

Writes PIV data to file in hdf version 5 format.

Parameters:
[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] RCSID identifier of program that generated datafile
[in] scale flag for scaled piv_data, write piv.point_x and piv.point_y as int or as float
Returns:
NULL on success or *err_msg on failure

char* gpiv_fwrite_hdf5_sc_position ( char *  fname,
GpivScalarData scdata,
char *  RCSID,
int *  scale 
)

Writes position data to hdf5 data file into GpivScalarData struct.

Parameters:
[in] fname pointer to complete filename
[out] scdata parameter structure
[out] RCSID identifier of program that generated datafile
[in] scale flag for scaled piv_data
Returns:
NULL on success or *err_msg on failure

char* gpiv_fwrite_hdf5_scdata ( char *  fname,
GpivScalarData scalar_data,
char *  DATA_KEY,
char *  RCSID 
)

Writes SCALAR data to file in hdf version 5 format.

Parameters:
[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] RCSID identifier of program that generated datafile
Returns:
NULL on success or *err_msg on failure

gchar* gpiv_fwrite_pgm_image ( char *  fname,
guint16 **  img1,
guint16 **  img2,
GpivImagePar  image_par 
)

Writes binary portable graymap (pgm) format image to file.

Parameters:
[in] fname pointer to complete filename
[in] img1 first 2-dimensional matrix containing nrows x ncoloms pixels
[in] img2 second 2-dimensional matrix containing nrows x ncoloms pixels
[in] image_par image parameters containing number of rows an columns
Returns:
NULL on success or *err_msg on failure
Deprecated:
image saving will only be done in PNG, HDF5 (.gpi) or raw binary formats

char* gpiv_fwrite_pivdata ( char *  fname,
GpivPivData piv,
char  comment_line[GPIV_MAX_LINES_C][GPIV_MAX_CHARS],
int  ncomment_lines,
int  scale,
char *  RCSID 
)

Writes 2-d vector (piv) data to file

Parameters:
[in] fname pointer to complete filename
[in] piv struct piv_data containing all variables in a datafile
[in] comment_line lines contain comment (staring with '#' sign at first column)
[in] ncomment_lines number of comment lines
[in] scale parameter to write piv.point_x and piv.point_y as int or as float
[in] RCSID identifier of program that generated datafile
Returns:
NULL on success or *err_msg on failure

gchar* gpiv_fwrite_raw_image ( char *  fname,
guint16 **  img1,
guint16 **  img2,
GpivImagePar  image_par 
)

Writes raw binary image to file.

Parameters:
[in] fname pointer to complete filename
[in] img1 first 2-dimensional matrix containing nrows x ncoloms pixels
[in] img2 second 2-dimensional matrix containing nrows x ncoloms pixels
[in] image_par image parameters containing number of rows an columns
Returns:
NULL on success or *err_msg on failure

char* gpiv_fwrite_sc_griddata ( char *  fname,
GpivScalarData scalar,
char  comment_line[GPIV_MAX_LINES_C][GPIV_MAX_CHARS],
int  ncomment_lines,
int  scale,
char *  RCSID 
)

Writes scalar data to file in grid format for gnuplot

Parameters:
[in] fname pointer to complete filename
[in] scalar struct GpivScalarData containing all variables in a datafile
[in] comment_line lines contain comment (staring with '#' sign at first column)
[in] ncomment_lines number of comment lines
[in] scale parameter to write scalar.point_x and scalar.point_y as int or as float
[in] RCSID identifier of program that generated datafile
Returns:
NULL on success or *err_msg on failure

char* gpiv_fwrite_sc_mtvgriddata ( char *  fname,
GpivScalarData scalar,
char  comment_line[GPIV_MAX_LINES_C][GPIV_MAX_CHARS],
int  ncomment_lines,
int  scale,
char *  RCSID 
)

Writes scalar data to file in grid format for plotmtv

Parameters:
[in] fname pointer to complete filename
[in] scalar struct GpivScalarData containing all variables in a datafile
[in] comment_line lines contain comment (staring with '#' sign at first column)
[in] ncomment_lines number of comment lines
[in] scale parameter to write scalar.point_x and scalar.point_y as int or as float
[out] RCSID identifier of program that generated datafile
Returns:
NULL on success or *err_msg on failure

char* gpiv_fwrite_scdata ( char *  fname,
GpivScalarData scalar,
char  comment_line[GPIV_MAX_LINES_C][GPIV_MAX_CHARS],
int  ncomment_lines,
int  scale,
char *  RCSID 
)

Writes scalar data to file

Parameters:
[in] fname pointer to complete filename
[in] scalar struct GpivScalarData containing all variables in a datafile
[in] comment_line lines contain comment (staring with '#' sign at first column)
[in] ncomment_lines number of comment lines
[in] scale parameter to write scalar.point_x and scalar.point_y as int (0) or as float (1)
[in] RCSID identifier of program that generated datafile
Returns:
NULL on success or *err_msg on failure

void gpiv_io_make_fname ( char *  fname_base,
char *  EXT,
char *  fname_out 
)

Constructs (output) filename from base name and exetsion

Parameters:
[in] fname_base file base name
[in] EXT file extension name
[out] fname_out completed filename
Returns:
void

gchar* gpiv_open_davis_image ( gchar *  fname,
guint16 ***  img1,
guint16 ***  img2,
GpivImagePar image_par 
)

Opens an image from davis file. Expects the arrray(s) have not been allocated yet. X_corr parameter is absent in image file and will be set here. Reads image header data from fname.

Parameters:
[in] fname pointer to complete filename
[in] image_par containing image dimensions and other image specs
[out] img1 pointer to image data of first image
[out] img2 pointer to image data of second image
[out] image_par pointer to image parameter struct
Returns:
NULL on success or *err_msg on failure

gchar* gpiv_open_hdf5_image ( gchar *  fname,
guint16 ***  img1,
guint16 ***  img2,
GpivImagePar image_par 
)

Opens an image from hdf file. Expects the arrray(s) have not been allocated yet

Parameters:
[in] fname pointer to complete filename
[out] img1 pointer to first image frame
[out] img2 pointer to second image frame
[out] image_par pointer to image parameter structure
Returns:
NULL on success or *err_msg on failure

gchar* gpiv_open_png_image ( gchar *  fname,
guint16 ***  img1,
guint16 ***  img2,
GpivImagePar image_par 
)

Opens an image from png file. Expects the arrray(s) have not been allocated yet.

Parameters:
[in] fname pointer to complete filename
[out] img1 first 2-dimensional image array
[out] img2 second 2-dimensional image array
[out] image_par pointer to image parameter structure
Returns:
NULL on success or *err_msg on failure

gchar* gpiv_open_raw_image ( gchar *  fname,
guint16 ***  img1,
guint16 ***  img2,
GpivImagePar image_par 
)

Opens an image from raw binary file. Expects the arrray(s) have not been allocated yet. Reads image header data from file.h.

Parameters:
[in] fname pointer to complete filename
[out] img1 pointer to first 2-dimensional image array
[out] img2 pointer to second 2-dimensional image array
[out] image_par pointer to image parameter structure
Returns:
NULL on success or *err_msg on failure

void gpiv_print_cumhisto_eqdatbin ( GpivBinData klass,
char  comment_line[GPIV_MAX_LINES_C][GPIV_MAX_CHARS],
int  ncomment_lines,
char *  RCSID 
)

Writing cumulative histogram data with an equal number of date per bin or klass to stdout. Special output for validation.; work around to print float data as y-values.

Parameters:
[in] klass struct GpivBinData containing the values for each bin
[in] comment_line lines contain comment (staring with '#' sign at first column)
[in] ncomment_lines number of comment lines
[in] RCSID identifier of program that generated the output datafile
Returns:
void

void gpiv_print_histo ( GpivBinData klass,
char  comment_line[GPIV_MAX_LINES_C][GPIV_MAX_CHARS],
int  ncomment_lines,
int  scale,
char *  RCSID 
)

Writes bins data to stdout in histogram format

Parameters:
[in] klass struct GpivBinData containing the values for each bin
[in] comment_line lines contain comment (staring with '#' sign at first column)
[in] ncomment_lines number of comment lines
[in] scale scaled (1) or unscaled (0) data
[in] RCSID identifier of program that generated the output datafile
Returns:
void

void gpiv_read_ascii_image ( guint16 **  img,
GpivImagePar  image_par 
)

Reads ASCII data image from stdin

Parameters:
[in] image_par image parameters
[out] img 2-dimensional matrix containing nrows x ncoloms pixels
Returns:
void

gchar* gpiv_read_davis_image ( FILE *  fp,
guint16 **  img1,
guint16 **  img2,
GpivImagePar  image_par 
)

Reads Davis formatted image, with ext .IMG from file.

Parameters:
[in] fp pointer to file to be read
[in] image_par containing image dimensions and other image specs
[out] img1 image data of first image
[out] img2 image data of second image
Returns:
NULL on success or *err_msg on failure

void gpiv_read_pivdata ( GpivPivData piv,
char  data_line[GPIV_MAX_LINES][GPIV_MAX_CHARS],
int  ndata_lines,
char  comment_line[GPIV_MAX_LINES_C][GPIV_MAX_CHARS],
int *  ncomment_lines 
)

Reads PIV data from stdin

Parameters:
[in] piv struct of PIV data containing all variables in a datafile piv.nx and piv.ny have to be known.
[in] data_line lines contain PIV data
[in] ndata_lines number of data lines
[out] comment_line comment lines (lines starting with '#'), except header
[out] ncomment_lines number of comment lines
Returns:
void

gchar* gpiv_read_png_image ( FILE *  fp,
guint16 ***  image1_p,
guint16 ***  image2_p,
GpivImagePar image_par,
gboolean  allocate 
)

Reads png formatted image. Allocates image data.

Parameters:
[in] fp file pointer
[in] allocate boolean whether to allocate memory for image arrays
[out] image1_p pointer to first 2-dimensional image array
[out] image2_p pointer to second 2-dimensional image array
[out] image_par pointer to image parameter structure
Returns:
NULL on success or *err_msg on failure

void gpiv_write_ascii_image ( guint16 **  img,
GpivImagePar  image_par 
)

Writes ASCII data image to stdout

Parameters:
[in] img 2-dimensional matrix containing nrows x ncoloms pixels
[in] image_par image parameters
Returns:
void
Deprecated:
obsolete as only used for testing while developing software

void gpiv_write_image ( guint16 **  img1,
guint16 **  img2,
GpivImagePar  image_par 
)

Writes raw binary image data to stdout

Parameters:
[in] img1 first binary image
[in] img2 second binary image
[in] image_par image parameters containing number of rows an columns
Returns:
void

void gpiv_write_pivdata ( GpivPivData piv,
char  comment_line[GPIV_MAX_LINES_C][GPIV_MAX_CHARS],
int  ncomment_lines,
int  scale,
char *  RCSID 
)

Writes 2-d vector (piv) data to stdout

Parameters:
[in] piv struct piv_data containing all variables in a datafile
[in] comment_line lines contain comment (staring with '#' sign at first column)
[in] ncomment_lines number of comment lines
[in] scale parameter to write piv.point_x and piv.point_y as int or as float
[in] RCSID identifier of program that generated datafile
Returns:
void

gchar* gpiv_write_png_image ( FILE *  fp,
guint16 ***  image1_p,
guint16 ***  image2_p,
GpivImagePar image_par,
gboolean  free 
)

Writes image data and header to png formatted image. Frees allocated image data.

Parameters:
[in] image1_p pointer to first 2-dimensional image array
[in] image2_p pointer to second 2-dimensional image array
[in] image_par image parameter structure
[in] free boolean whether to free memory of image arrays
[out] fp file pointer
Returns:
NULL on success or *err_msg on failure

void gpiv_write_scdata ( GpivScalarData scalar,
char  comment_line[GPIV_MAX_LINES_C][GPIV_MAX_CHARS],
int  ncomment_lines,
int  scale,
char *  RCSID 
)

Writes scalar data to stdout

Parameters:
[in] scalar struct GpivScalarData containing all variables in a datafile
[in] comment_line lines contain comment (staring with '#' sign at first column)
[in] ncomment_lines number of comment lines
[in] scale parameter to write scalar.point_x and scalar.point_y as int or as float
[in] RCSID identifier of program that generated datafile
Returns:
void


Generated on Sat Mar 31 19:30:54 2007 by  doxygen 1.5.1