60 #ifndef __LIBGPIV_IMG_H__ 61 #define __LIBGPIV_IMG_H__ 65 #define GPIV_IMGPAR_DEFAULT__DEPTH 8 66 #define GPIV_IMGPAR_DEFAULT__NCOLUMNS 256 67 #define GPIV_IMGPAR_DEFAULT__NROWS 256 68 #define GPIV_IMGPAR_DEFAULT__X_CORR 1 69 #define GPIV_IMGPAR_DEFAULT__S_SCALE 1.0 70 #define GPIV_IMGPAR_DEFAULT__T_SCALE 1.0 71 #define GPIV_IMGPAR_DEFAULT__Z_OFF_X 0.0 72 #define GPIV_IMGPAR_DEFAULT__Z_OFF_Y 0.0 74 #define GPIV_IMGPAR_DEFAULT__TITLE "" 75 #define GPIV_IMGPAR_DEFAULT__CREATION_DATE "" 76 #define GPIV_IMGPAR_DEFAULT__LOCATION "" 77 #define GPIV_IMGPAR_DEFAULT__AUTHOR "" 78 #define GPIV_IMGPAR_DEFAULT__SOFTWARE "gpiv / gpiv_rr" 79 #define GPIV_IMGPAR_DEFAULT__SOURCE "" 80 #define GPIV_IMGPAR_DEFAULT__USERTEXT "" 81 #define GPIV_IMGPAR_DEFAULT__WARNING "" 82 #define GPIV_IMGPAR_DEFAULT__DISCLAIMER "See The GNU General Public License (GPL)" 83 #define GPIV_IMGPAR_DEFAULT__COMMENT "" 84 #define GPIV_IMGPAR_DEFAULT__COPYRIGHT "" 85 #define GPIV_IMGPAR_DEFAULT__EMAIL "" 86 #define GPIV_IMGPAR_DEFAULT__URL "" 89 #define GPIV_IMGPAR_KEY "IMG" 90 #define GPIV_IMGPAR_KEY__DEPTH "depth" 91 #define GPIV_IMGPAR_KEY__NCOLUMNS "ncolumns" 92 #define GPIV_IMGPAR_KEY__NROWS "nrows" 93 #define GPIV_IMGPAR_KEY__X_CORR "x_corr" 94 #define GPIV_IMGPAR_KEY__S_SCALE "s_scale" 95 #define GPIV_IMGPAR_KEY__T_SCALE "t_scale" 96 #define GPIV_IMGPAR_KEY__Z_OFF_X "zoff_x" 97 #define GPIV_IMGPAR_KEY__Z_OFF_Y "zoff_y" 99 #define GPIV_IMGPAR_KEY__TITLE "title" 100 #define GPIV_IMGPAR_KEY__CREATION_DATE "creation_date" 101 #define GPIV_IMGPAR_KEY__LOCATION "location" 102 #define GPIV_IMGPAR_KEY__AUTHOR "author" 103 #define GPIV_IMGPAR_KEY__SOFTWARE "software" 104 #define GPIV_IMGPAR_KEY__SOURCE "source" 105 #define GPIV_IMGPAR_KEY__USERTEXT "usertext" 106 #define GPIV_IMGPAR_KEY__WARNING "warning" 107 #define GPIV_IMGPAR_KEY__DISCLAIMER "disclaimer" 108 #define GPIV_IMGPAR_KEY__COMMENT "comment" 109 #define GPIV_IMGPAR_KEY__COPYRIGHT "copyright" 110 #define GPIV_IMGPAR_KEY__EMAIL "email" 111 #define GPIV_IMGPAR_KEY__URL "url" 113 typedef struct __GpivImagePar GpivImagePar; 230 const gboolean verbose
263 const gboolean include_key,
264 const gboolean verbose,
void gpiv_img_print_parameters(FILE *fp, const GpivImagePar *image_par)
Prints image header or parameters to fp.
gboolean location__set
flag if location has been defined
gfloat t_scale
time-scale, used by gpiv_post_scale()
gboolean source__set
flag if source has been defined
gchar title[GPIV_MAX_CHARS]
Project name.
gboolean usertext__set
flag if usertext has been defined
gboolean z_off_y__set
flag if z_off_y has been defined
gchar comment[GPIV_MAX_CHARS]
Comment from other image formats.
gboolean x_corr__set
flag if x_corr has been defined
GpivImagePar * gpiv_img_cp_parameters(const GpivImagePar *image_par)
Generate a new copy of image parameters from image_par if image_par_dest have not been set...
gchar source[GPIV_MAX_CHARS]
Camera name and type.
GpivImagePar * gpiv_img_get_parameters_from_resources(const gchar *localrc, const gboolean verbose)
Reads image parameters from localrc, $HOME/.gpivrc and system-wide gpiv.conf.
gfloat z_off_y
zero offset in y (row) direction, used by gpiv_post_scale()
void gpiv_img_parameters_set(GpivImagePar *image_par, const gboolean flag)
Sets flag for image_par__set.
void gpiv_img_default_parameters(GpivImagePar *image_par, const gboolean force)
Sets default parameter values.
Piv image header and data.
gchar * gpiv_img_check_header_required_read(const GpivImagePar *image_par)
Checks out if the required image header info for reading/storing has been read.
gboolean creation_date__set
flag if creation_date has been defined
gchar * gpiv_img_check_header_scale_read(const GpivImagePar *image_par)
Checks out if image header info for time/spatial scaling has been read.
void gpiv_img_ovwrt_parameters(const GpivImagePar *image_par_src, GpivImagePar *image_par_dest)
Overwrites image parameters from image_par_src to image_par_dest.
gboolean nrows__set
flag if nrows has been defined
guint16 ** frame2
Second image of a double-frame image pair.
GpivImagePar * gpiv_img_fread_hdf5_parameters(const gchar *fname)
Reads image parameters from hdf5 data file without IMAGE_PAR_KEY.
gchar url[GPIV_MAX_CHARS]
URL of program, author, image and/or data.
gboolean depth__set
flag if depth has been defined
gchar * gpiv_img_test_header(const GpivImagePar *image_par)
Checks out if all header parameters have been read.
guint16 ** frame1
First image of a double-frame image pair.
gchar email[GPIV_MAX_CHARS]
E-mail author.
gboolean software__set
flag if software has been defined
Image parameters or header info.
gfloat s_scale
spatial scale, used by gpiv_post_scale()
gchar * gpiv_img_fwrite_hdf5_parameters(const gchar *fname, const GpivImagePar *image_par)
Writes image parameters to an existing hdf5 data file.
gchar software[GPIV_MAX_CHARS]
Program that generated the image.
guint depth
Image color depth.
guint nrows
Number of image rows.
#define GPIV_MAX_CHARS
Maximum number of characters on a line.
gboolean t_scale__set
flag if t_scale has been defined
gboolean ncolumns__set
flag if ncolumns has been defined
gchar warning[GPIV_MAX_CHARS]
Warning message.
gboolean comment__set
flag if comment has been defined
gfloat z_off_x
zero offset in x (column) direction, used by gpiv_post_scale()
void gpiv_img_read_header(FILE *fp, GpivImagePar *image_par, const gboolean include_key, const gboolean verbose, FILE *fp_par_out)
Reads each line of file fp and looks for image header parameters.
gchar * gpiv_img_check_header_read(const GpivImagePar *image_par)
Checks out if all image header info has been read.
void gpiv_img_print_header(FILE *fp, const GpivImagePar *image_par)
Prints header information to file fp.
void gpiv_img_fprint_header(const gchar *fname, const GpivImagePar *image_par)
Prints image header parameters to file.
gboolean url__set
flag if url has been defined
gchar copyright[GPIV_MAX_CHARS]
Copyright text.
gboolean email__set
flag if email has been defined
gboolean copyright__set
flag if copyright has been defined
gchar usertext[GPIV_MAX_CHARS]
User comment.
gchar disclaimer[GPIV_MAX_CHARS]
Disclaimer or licence text.
gchar location[GPIV_MAX_CHARS]
Location of origin.
gboolean title__set
flag if title has been defined
void gpiv_img_fprint_parameters(const gchar *fname, const GpivImagePar *image_par)
Prints image header or parameters to file.
GpivImagePar * header
Image header.
gchar creation_date[GPIV_MAX_CHARS]
Date of origin.
gboolean x_corr
cross-correlation image pair
gboolean z_off_x__set
flag if z_off_x has been defined
gchar * gpiv_img_fread_davis_parameters(const gchar *fname, GpivImagePar *image_par)
Reads image specifications from Davis formatted image, with ext .IMG, from file.
gboolean s_scale__set
flag if s_scale has been defined
gboolean disclaimer__set
flag if disclaimer has been defined
gboolean author__set
flag if author has been defined
gboolean warning__set
flag if warning has been defined
guint ncolumns
Number of image columns.
gchar author[GPIV_MAX_CHARS]
Author name.