00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00088
00089
00090 #ifndef __LIBGPIV_IO_H__
00091 #define __LIBGPIV_IO_H__
00092
00093
00094
00095 #define GPIV_PIV_FMT "%4.0f %4.0f %12.3f %12.3f %12.3f %2d\n"
00096 #define GPIV_PIV_S_FMT "%-12.5f %-12.5f %-12.5f %-12.5f %-6.2f %-2d\n"
00097 #define GPIV_SCALAR_FMT "%4.0f %4.0f %12.3f %2d\n"
00098 #define GPIV_SCALAR_S_FMT "%-12.3f %-12.3f %-12.3f %-2d\n"
00100 #define GPIV_EXT_HEADER ".h"
00101 #define GPIV_EXT_RAW_IMAGE ".r"
00102 #define GPIV_EXT_PNG_IMAGE ".png"
00103 #define GPIV_EXT_PNG_IMAGE_UPCASE ".PNG"
00104 #define GPIV_EXT_PNG_IMAGE_PROC "_proc.png"
00105 #define GPIV_EXT_PGM_IMAGE ".pgm"
00106 #define GPIV_EXT_PGM_IMAGE_UPCASE ".PGM"
00107 #define GPIV_EXT_RAW_IMAGE_PROC "_proc.r"
00108 #define GPIV_EXT_PAR ".par"
00110 #define GPIV_EXT_TA ".ta"
00111 #define GPIV_EXT_SUBSTR ".substr"
00113 #define GPIV_EXT_GPIV ".gpi"
00114 #define GPIV_EXT_GPIV_UPCASE ".GPI"
00115 #define GPIV_EXT_PIV ".piv"
00116 #define GPIV_EXT_DAVIS ".img"
00117 #define GPIV_EXT_DAVIS_UPCASE ".IMG"
00118 #define GPIV_EXT_COV ".cov"
00119 #define GPIV_EXT_INT ".int"
00120 #define GPIV_EXT_OLD ".old.piv"
00122 #define GPIV_EXT_ERR_PIV ".err.piv"
00123 #define GPIV_EXT_ERR_STAT ".stat"
00124 #define GPIV_EXT_PLK ".plk"
00125 #define GPIV_EXT_UVHISTO ".pdf"
00127 #define GPIV_EXT_VOR ".vor"
00128 #define GPIV_EXT_NSTR ".nstr"
00129 #define GPIV_EXT_SSTR ".sstr"
00130 #define GPIV_EXT_MANI ".ma.piv"
00131 #define GPIV_EXT_SA ".sa.piv"
00132 #define GPIV_EXT_SC ".sc.piv"
00135
00136 #define GPIV_DAVIS_IMG_DEPTH 12
00137 #define GPIV_IMG_PARAM_RESOURCES
00145 enum GpivDataFormat {
00146 GPIV_RR = 1,
00147 GPIV_DAV = 2
00148 } pdf;
00149
00150
00151
00160 void
00161 gpiv_io_make_fname (const gchar *fname_base,
00162 const gchar *EXT,
00163 gchar *fname_out
00164 );
00165
00166
00173 GpivImage *
00174 gpiv_read_image (FILE *fp
00175 );
00176
00177
00178
00188 GpivImage *
00189 gpiv_fread_image (const gchar *fname
00190 );
00191
00192
00193
00200 enum GpivDataFormat
00201 gpiv_find_pivdata_origin (const gchar line[GPIV_MAX_CHARS]
00202 );
00203
00204
00205
00212 GpivPivData *
00213 gpiv_fread_pivdata (const gchar *fname
00214 );
00215
00216
00217
00226 gchar *
00227 gpiv_fwrite_pivdata (const gchar *fname,
00228 GpivPivData *piv_data,
00229 const gboolean free
00230 );
00231
00232
00233
00240 GpivPivData *
00241 gpiv_read_pivdata (FILE *fp
00242 );
00243
00244
00245
00253 GpivPivData *
00254 gpiv_read_pivdata_fastx (FILE *fp
00255 );
00256
00257
00258
00267 gchar *
00268 gpiv_write_pivdata (FILE *fp,
00269 GpivPivData *piv_data,
00270 const gboolean free
00271 );
00272
00273
00274
00281 GpivScalarData *
00282 gpiv_fread_scdata (const gchar *fname
00283 );
00284
00285
00286
00295 gchar *
00296 gpiv_fwrite_scdata (const gchar *fname,
00297 GpivScalarData *scalar_data,
00298 const gboolean free
00299 );
00300
00301
00302
00309 GpivScalarData *
00310 gpiv_read_scdata (FILE *fp
00311 );
00312
00313
00314
00323 gchar *
00324 gpiv_write_scdata (FILE *fp,
00325 GpivScalarData *scalar_data,
00326 const gboolean free
00327 );
00328
00329
00330
00339 gchar *
00340 gpiv_write_sc_griddata (FILE *fp,
00341 GpivScalarData *scalar_data,
00342 const gboolean free
00343 );
00344
00345
00346
00355 gchar *
00356 gpiv_write_sc_mtvgriddata (FILE *fp,
00357 GpivScalarData *scalar_data,
00358 const gboolean free
00359 );
00360
00361
00370 gchar *
00371 gpiv_print_histo (FILE *fp,
00372 GpivBinData *bin_data,
00373 const gboolean free
00374 );
00375
00376
00387 gchar *
00388 gpiv_print_cumhisto_eqdatbin (FILE *fp,
00389 GpivBinData *klass,
00390 const gboolean free
00391 );
00392
00393
00403 GpivImage *
00404 gpiv_read_raw_image (FILE *fp
00405 );
00406
00407
00418 GpivImage *
00419 gpiv_fread_raw_image (const gchar *fname
00420 );
00421
00422
00430 gchar *
00431 gpiv_write_raw_image (FILE *fp,
00432 GpivImage *gpiv_image
00433 );
00434
00435
00443 gchar *
00444 gpiv_fwrite_raw_image (const gchar *fname,
00445 GpivImage *gpiv_image
00446 );
00447
00448
00455 GpivImage *
00456 gpiv_read_png_image (FILE *fp
00457 );
00458
00459
00469 gchar *
00470 gpiv_write_png_image (FILE *fp,
00471 GpivImage *gpiv_image,
00472 const gboolean free
00473 );
00474
00475
00482 gchar *
00483 gpiv_fcreate_hdf5 (const gchar *fname
00484 );
00485
00486
00495 gchar *
00496 gpiv_fread_hdf5_parameters (const gchar *fname,
00497 const gchar *par_key,
00498 void *pstruct
00499 );
00500
00501
00508 GpivImage *
00509 gpiv_fread_hdf5_image (const gchar *fname
00510 );
00511
00512
00521 gchar *
00522 gpiv_fwrite_hdf5_image (const gchar *fname,
00523 GpivImage *image,
00524 const gboolean free
00525 );
00526
00527
00536 gchar *
00537 gpiv_fwrite_hdf5_parameters (const gchar *fname,
00538 const gchar *par_key,
00539 void *pstruct
00540 );
00541
00542
00550 GpivPivData *
00551 gpiv_fread_hdf5_pivdata (const gchar *fname,
00552 const gchar *DATA_KEY
00553 );
00554
00555
00565 gchar *
00566 gpiv_fwrite_hdf5_pivdata (const gchar *fname,
00567 GpivPivData *piv_data,
00568 const gchar *DATA_KEY,
00569 const gboolean free
00570 );
00571
00572
00580 GpivScalarData *
00581 gpiv_fread_hdf5_scdata (const gchar *fname,
00582 const gchar *DATA_KEY
00583 );
00584
00585
00595 gchar *
00596 gpiv_fwrite_hdf5_scdata (const gchar *fname,
00597 GpivScalarData *scalar_data,
00598 const gchar *DATA_KEY,
00599 const gboolean free
00600 );
00601
00602
00611 gchar *
00612 gpiv_fread_hdf5_histo (const gchar *fname,
00613 GpivBinData *klass,
00614 const gchar *DATA_KEY
00615 );
00616
00617
00626 gchar *
00627 gpiv_fwrite_hdf5_histo (const gchar *fname,
00628 const GpivBinData *klass,
00629 const gchar *DATA_KEY
00630 );
00631
00632
00639 GpivImage *
00640 gpiv_read_davis_image (FILE *fp
00641 );
00642
00643
00644 #endif