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

gpiv-img.h File Reference

module for image header en parameters More...

Go to the source code of this file.

Data Structures

struct  __GpivImagePar
 Image parameters or header info. More...
struct  __GpivImage
 Piv image header and data. More...

Defines

#define GPIV_IMGPAR_DEFAULT__DEPTH   8
#define GPIV_IMGPAR_DEFAULT__NCOLUMNS   256
#define GPIV_IMGPAR_DEFAULT__NROWS   256
#define GPIV_IMGPAR_DEFAULT__X_CORR   1
#define GPIV_IMGPAR_DEFAULT__S_SCALE   1.0
#define GPIV_IMGPAR_DEFAULT__T_SCALE   1.0
#define GPIV_IMGPAR_DEFAULT__Z_OFF_X   0.0
#define GPIV_IMGPAR_DEFAULT__Z_OFF_Y   0.0
#define GPIV_IMGPAR_DEFAULT__TITLE   ""
#define GPIV_IMGPAR_DEFAULT__CREATION_DATE   ""
#define GPIV_IMGPAR_DEFAULT__LOCATION   ""
#define GPIV_IMGPAR_DEFAULT__AUTHOR   ""
#define GPIV_IMGPAR_DEFAULT__SOFTWARE   "gpiv / gpiv_rr"
#define GPIV_IMGPAR_DEFAULT__SOURCE   ""
#define GPIV_IMGPAR_DEFAULT__USERTEXT   ""
#define GPIV_IMGPAR_DEFAULT__WARNING   ""
#define GPIV_IMGPAR_DEFAULT__DISCLAIMER   "See The GNU General Public License (GPL)"
#define GPIV_IMGPAR_DEFAULT__COMMENT   ""
#define GPIV_IMGPAR_DEFAULT__COPYRIGHT   ""
#define GPIV_IMGPAR_DEFAULT__EMAIL   ""
#define GPIV_IMGPAR_DEFAULT__URL   ""
#define GPIV_IMGPAR_KEY   "IMG"
#define GPIV_IMGPAR_KEY__DEPTH   "depth"
#define GPIV_IMGPAR_KEY__NCOLUMNS   "ncolumns"
#define GPIV_IMGPAR_KEY__NROWS   "nrows"
#define GPIV_IMGPAR_KEY__X_CORR   "x_corr"
#define GPIV_IMGPAR_KEY__S_SCALE   "s_scale"
#define GPIV_IMGPAR_KEY__T_SCALE   "t_scale"
#define GPIV_IMGPAR_KEY__Z_OFF_X   "zoff_x"
#define GPIV_IMGPAR_KEY__Z_OFF_Y   "zoff_y"
#define GPIV_IMGPAR_KEY__TITLE   "title"
#define GPIV_IMGPAR_KEY__CREATION_DATE   "creation_date"
#define GPIV_IMGPAR_KEY__LOCATION   "location"
#define GPIV_IMGPAR_KEY__AUTHOR   "author"
#define GPIV_IMGPAR_KEY__SOFTWARE   "software"
#define GPIV_IMGPAR_KEY__SOURCE   "source"
#define GPIV_IMGPAR_KEY__USERTEXT   "usertext"
#define GPIV_IMGPAR_KEY__WARNING   "warning"
#define GPIV_IMGPAR_KEY__DISCLAIMER   "disclaimer"
#define GPIV_IMGPAR_KEY__COMMENT   "comment"
#define GPIV_IMGPAR_KEY__COPYRIGHT   "copyright"
#define GPIV_IMGPAR_KEY__EMAIL   "email"
#define GPIV_IMGPAR_KEY__URL   "url"

Typedefs

typedef __GpivImagePar GpivImagePar
typedef __GpivImage GpivImage

Functions

void gpiv_img_parameters_set (GpivImagePar *image_par, const gboolean flag)
GpivImagePargpiv_img_get_parameters_from_resources (const gchar *localrc, const gboolean verbose)
void gpiv_img_default_parameters (GpivImagePar *image_par, const gboolean force)
void gpiv_img_read_header (FILE *fp, GpivImagePar *image_par, const gboolean include_key, const gboolean verbose, FILE *fp_par_out)
char * gpiv_img_check_header_read (const GpivImagePar *image_par)
char * gpiv_img_check_header_required_read (const GpivImagePar *image_par)
char * gpiv_img_check_header_scale_read (const GpivImagePar *image_par)
char * gpiv_img_test_header (const GpivImagePar *image_par)
void gpiv_img_print_header (FILE *fp, const GpivImagePar *image_par)
void gpiv_img_fprint_header (const gchar *fname, const GpivImagePar *image_par)
GpivImagePargpiv_img_cp_parameters (const GpivImagePar *image_par)
void gpiv_img_ovwrt_parameters (const GpivImagePar *image_par_src, GpivImagePar *image_par_dest)
void gpiv_img_print_parameters (FILE *fp, const GpivImagePar *image_par)
void gpiv_img_fprint_parameters (const gchar *fname, const GpivImagePar *image_par)
GpivImagePargpiv_img_fread_hdf5_parameters (const gchar *fname)
gchar * gpiv_img_fwrite_hdf5_parameters (const gchar *fname, const GpivImagePar *image_par)
char * gpiv_img_fread_davis_parameters (const gchar *fname, GpivImagePar *image_par)


Detailed Description

module for image header en parameters

SOURCE: lib/img.c

LAST MODIFICATION DATE:

Id
img.h,v 1.16 2007-06-06 16:59:02 gerber Exp

Definition in file gpiv-img.h.


Define Documentation

#define GPIV_IMGPAR_DEFAULT__AUTHOR   ""

Default parameter for author of __GpivImagePar

Definition at line 77 of file gpiv-img.h.

#define GPIV_IMGPAR_DEFAULT__COMMENT   ""

Default parameter for comment of __GpivImagePar

Definition at line 83 of file gpiv-img.h.

#define GPIV_IMGPAR_DEFAULT__COPYRIGHT   ""

Default parameter for copyright of __GpivImagePar

Definition at line 84 of file gpiv-img.h.

#define GPIV_IMGPAR_DEFAULT__CREATION_DATE   ""

Default parameter for creation_date of __GpivImagePar

Definition at line 75 of file gpiv-img.h.

#define GPIV_IMGPAR_DEFAULT__DEPTH   8

Default parameter for depth of __GpivImagePar

Definition at line 65 of file gpiv-img.h.

#define GPIV_IMGPAR_DEFAULT__DISCLAIMER   "See The GNU General Public License (GPL)"

Default parameter for disclaimer of __GpivImagePar

Definition at line 82 of file gpiv-img.h.

#define GPIV_IMGPAR_DEFAULT__EMAIL   ""

Default parameter for email of __GpivImagePar

Definition at line 85 of file gpiv-img.h.

#define GPIV_IMGPAR_DEFAULT__LOCATION   ""

Default parameter for location of __GpivImagePar

Definition at line 76 of file gpiv-img.h.

#define GPIV_IMGPAR_DEFAULT__NCOLUMNS   256

Default parameter for ncolumns of __GpivImagePar

Definition at line 66 of file gpiv-img.h.

#define GPIV_IMGPAR_DEFAULT__NROWS   256

Default parameter for nrows of __GpivImagePar

Definition at line 67 of file gpiv-img.h.

#define GPIV_IMGPAR_DEFAULT__S_SCALE   1.0

Default parameter for s_scale of __GpivImagePar

Definition at line 69 of file gpiv-img.h.

#define GPIV_IMGPAR_DEFAULT__SOFTWARE   "gpiv / gpiv_rr"

Default parameter for software of __GpivImagePar

Definition at line 78 of file gpiv-img.h.

#define GPIV_IMGPAR_DEFAULT__SOURCE   ""

Default parameter for source of __GpivImagePar

Definition at line 79 of file gpiv-img.h.

#define GPIV_IMGPAR_DEFAULT__T_SCALE   1.0

Default parameter for t_scale of __GpivImagePar

Definition at line 70 of file gpiv-img.h.

#define GPIV_IMGPAR_DEFAULT__TITLE   ""

Default parameter for title of __GpivImagePar

Definition at line 74 of file gpiv-img.h.

#define GPIV_IMGPAR_DEFAULT__URL   ""

Default parameter for url of __GpivImagePar

Definition at line 86 of file gpiv-img.h.

#define GPIV_IMGPAR_DEFAULT__USERTEXT   ""

Default parameter for usertext of __GpivImagePar

Definition at line 80 of file gpiv-img.h.

#define GPIV_IMGPAR_DEFAULT__WARNING   ""

Default parameter for warning of __GpivImagePar

Definition at line 81 of file gpiv-img.h.

#define GPIV_IMGPAR_DEFAULT__X_CORR   1

Default parameter for x_corr of __GpivImagePar

Definition at line 68 of file gpiv-img.h.

#define GPIV_IMGPAR_DEFAULT__Z_OFF_X   0.0

Default parameter for z_off_x of __GpivImagePar

Definition at line 71 of file gpiv-img.h.

#define GPIV_IMGPAR_DEFAULT__Z_OFF_Y   0.0

Default parameter for z_off_y of __GpivImagePar

Definition at line 72 of file gpiv-img.h.

#define GPIV_IMGPAR_KEY   "IMG"

Key of image parameters

Definition at line 89 of file gpiv-img.h.

#define GPIV_IMGPAR_KEY__AUTHOR   "author"

Key for author of __GpivImagePar

Definition at line 102 of file gpiv-img.h.

#define GPIV_IMGPAR_KEY__COMMENT   "comment"

Key for comment of __GpivImagePar

Definition at line 108 of file gpiv-img.h.

#define GPIV_IMGPAR_KEY__COPYRIGHT   "copyright"

Key for copyright of __GpivImagePar

Definition at line 109 of file gpiv-img.h.

#define GPIV_IMGPAR_KEY__CREATION_DATE   "creation_date"

Key for creation_date of __GpivImagePar

Definition at line 100 of file gpiv-img.h.

#define GPIV_IMGPAR_KEY__DEPTH   "depth"

Key for depth of __GpivImagePar

Definition at line 90 of file gpiv-img.h.

#define GPIV_IMGPAR_KEY__DISCLAIMER   "disclaimer"

Key for disclaimer of __GpivImagePar

Definition at line 107 of file gpiv-img.h.

#define GPIV_IMGPAR_KEY__EMAIL   "email"

Key for email of __GpivImagePar

Definition at line 110 of file gpiv-img.h.

#define GPIV_IMGPAR_KEY__LOCATION   "location"

Key for location of __GpivImagePar

Definition at line 101 of file gpiv-img.h.

#define GPIV_IMGPAR_KEY__NCOLUMNS   "ncolumns"

Key for ncolumns of __GpivImagePar

Definition at line 91 of file gpiv-img.h.

#define GPIV_IMGPAR_KEY__NROWS   "nrows"

Key for nrows of __GpivImagePar

Definition at line 92 of file gpiv-img.h.

#define GPIV_IMGPAR_KEY__S_SCALE   "s_scale"

Key for s_scale of __GpivImagePar

Definition at line 94 of file gpiv-img.h.

#define GPIV_IMGPAR_KEY__SOFTWARE   "software"

Key for software of __GpivImagePar

Definition at line 103 of file gpiv-img.h.

#define GPIV_IMGPAR_KEY__SOURCE   "source"

Key for source of __GpivImagePar

Definition at line 104 of file gpiv-img.h.

#define GPIV_IMGPAR_KEY__T_SCALE   "t_scale"

Key for t_scale of __GpivImagePar

Definition at line 95 of file gpiv-img.h.

#define GPIV_IMGPAR_KEY__TITLE   "title"

Key for title of __GpivImagePar

Definition at line 99 of file gpiv-img.h.

#define GPIV_IMGPAR_KEY__URL   "url"

Key for url of __GpivImagePar

Definition at line 111 of file gpiv-img.h.

#define GPIV_IMGPAR_KEY__USERTEXT   "usertext"

Key for usertext of __GpivImagePar

Definition at line 105 of file gpiv-img.h.

#define GPIV_IMGPAR_KEY__WARNING   "warning"

Key for warning of __GpivImagePar

Definition at line 106 of file gpiv-img.h.

#define GPIV_IMGPAR_KEY__X_CORR   "x_corr"

Key for x_corr of __GpivImagePar

Definition at line 93 of file gpiv-img.h.

#define GPIV_IMGPAR_KEY__Z_OFF_X   "zoff_x"

Key for z_off_x of __GpivImagePar

Definition at line 96 of file gpiv-img.h.

#define GPIV_IMGPAR_KEY__Z_OFF_Y   "zoff_y"

Key for z_off_y of __GpivImagePar

Definition at line 97 of file gpiv-img.h.


Typedef Documentation

typedef struct __GpivImage GpivImage

Definition at line 188 of file gpiv-img.h.

typedef struct __GpivImagePar GpivImagePar

Definition at line 113 of file gpiv-img.h.


Function Documentation

char* gpiv_img_check_header_read ( const GpivImagePar image_par  ) 

Checks out if all image header info has been read

Parameters:
[in] image_par image parameters
Returns:
NULL on success or error message on failure

char* gpiv_img_check_header_required_read ( const GpivImagePar image_par  ) 

Checks out if the required image header info for reading/storing has been read

Parameters:
[in] image_par image parameters
Returns:
NULL on success or error message on failure

char* gpiv_img_check_header_scale_read ( const GpivImagePar image_par  ) 

Checks out if image header info for time/spatial scaling has been read

Parameters:
[in] image_par image parameters
Returns:
NULL on success or error message on failure

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

Parameters:
[in] image_par source image parameters to be copied
Returns:
GpivImagePar

void gpiv_img_default_parameters ( GpivImagePar image_par,
const gboolean  force 
)

Sets default parameter values

Parameters:
[in] force flag to enforce parameters set to defaults
[out] image_par image parameters
Returns:
void

void gpiv_img_fprint_header ( const gchar *  fname,
const GpivImagePar image_par 
)

Prints image header parameters to file. Identic to gpiv_img_fprint_parameters(), but without GPIV_IMGPAR_KEY

Parameters:
[in] fname header filename
[in] image_par image parameters
Returns:
void

void gpiv_img_fprint_parameters ( const gchar *  fname,
const GpivImagePar image_par 
)

Prints image header or parameters to file. Idententic to gpiv_img_fprint_header(), but includes IMAGE_PAR_KEY

Parameters:
[in] fname header filename
[in] image_par image parameters
Returns:
void

char* gpiv_img_fread_davis_parameters ( const gchar *  fname,
GpivImagePar image_par 
)

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

Parameters:
[in] fname filename
[out] image_par image parameters
Returns:
NULL on success or error message on failure

GpivImagePar* gpiv_img_fread_hdf5_parameters ( const gchar *  fname  ) 

Reads image parameters from hdf5 data file without IMAGE_PAR_KEY

Parameters:
[in] fname filename
Returns:
GpivImagePar or NULL on failure

gchar* gpiv_img_fwrite_hdf5_parameters ( const gchar *  fname,
const GpivImagePar image_par 
)

Writes image parameters to an existing hdf5 data file

Parameters:
[in] fname filename
[in] image_par image parameters
Returns:
NULL on success or error message on failure

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

Parameters:
[in] localrc resource filename containing parameter at current directory
[in] verbose prints parameter values when read
Returns:
GpivImagePar or NULL on failure

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

Parameters:
[in] image_par_src source image parameters to be copied
[in] image_par_dest the copied image parameters
Returns:
void

void gpiv_img_parameters_set ( GpivImagePar image_par,
const gboolean  flag 
)

Sets flag for image_par__set

Parameters:
[in] flag flag to enforce parameters set to defaults
[out] image_par image parameter
Returns:
void

void gpiv_img_print_header ( FILE *  fp,
const GpivImagePar image_par 
)

Prints header information to file fp. Identic to gpiv_img_print_parameters(), but without GPIV_IMGPAR_KEY

Parameters:
[in] fp file pointer. If NULL, stdout will be used
[in] image_par image parameters
Returns:
void

void gpiv_img_print_parameters ( FILE *  fp,
const GpivImagePar image_par 
)

Prints image header or parameters to fp. Idententic to gpiv_img_print_header(), but includes IMAGE_PAR_KEY

Parameters:
[in] fp file pointer. If NULL, stdout will be used
[in] image_par image parameters
Returns:
void

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

Parameters:
[in] fp file pointer to header or paremeter file. If NULL, stdin will be used.
[in] fp_par_out file pointer of which parameter will have to be printed or NULL for stdout
[in] verbose flag to print parameters to fp_par_out (TRUE) or not (FALSE)
[in] include_key flag if module key is included
[out] image_par image header parameters
Returns:
void

char* gpiv_img_test_header ( const GpivImagePar image_par  ) 

Checks out if all header parameters have been read

Parameters:
[in] image_par image parameters
Returns:
NULL on success or error message on failure


Generated on Tue Nov 20 19:46:20 2007 for Libgpiv by doxygen 1.5.1