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

gpiv-io.h

Go to the documentation of this file.
00001 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */
00002 
00003 /*
00004    libgpiv - library for Particle Image Velocimetry
00005 
00006    Copyright (C) 2002, 2003, 2004 Gerber van der Graaf
00007 
00008    This file is part of libgpiv.
00009 
00010    Libgpiv is free software; you can redistribute it and/or modify
00011    it under the terms of the GNU General Public License as published by
00012    the Free Software Foundation; either version 2, or (at your option)
00013    any later version.
00014 
00015    This program is distributed in the hope that it will be useful,
00016    but WITHOUT ANY WARRANTY; without even the implied warranty of
00017    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018    GNU General Public License for more details.
00019 
00020    You should have received a copy of the GNU General Public License
00021    along with this program; if not, write to the Free Software Foundation,
00022    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
00023 
00024 
00025 
00026 
00027 ---------------------------------------------------------------
00028 FILENAME:                io.c
00029 LIBRARY:                 libgpiv:
00030 EXTERNAL FUNCTIONS:      gpiv_io_make_fname
00031                          gpiv_read_header
00032 
00033                          gpiv_fread_image
00034                          gpiv_read_image
00035                          gpiv_write_image
00036 
00037                          gpiv_find_pivdata_origin
00038                          gpiv_read_pivdata
00039                          gpiv_read_pivdata_fastx
00040                          gpiv_write_pivdata
00041                          gpiv_fread_scdata
00042                          gpiv_write_scdata
00043 
00044                          gpiv_fwrite_griddata
00045                          gpiv_print_histo
00046                          gpiv_print_cumhisto_eqdatbin
00047                          gpiv_fprint_cumhisto_eqdatbin
00048 
00049                          gpiv_fread_raw_image
00050                          gpiv_read_raw_image
00051                          gpiv_fwrite_raw_image
00052                          gpiv_write_raw_image
00053 
00054                          gpiv_read_png_image
00055                          gpiv_write_png_image
00056 
00057                          gpiv_fcreate_hdf5
00058                          gpiv_fread_hdf5_image
00059                          gpiv_fwrite_hdf5_image
00060                          gpiv_fread_hdf5_parameters
00061                          gpiv_fwrite_hdf5_parameters
00062                          gpiv_fread_hdf5_position
00063                          gpiv_fwrite_hdf5_position
00064                          gpiv_fwrite_hdf5_piv_position
00065                          gpiv_fread_hdf5_pivdata
00066                          gpiv_fwrite_hdf5_pivdata
00067                          gpiv_fread_hdf5_scdata
00068                          gpiv_fwrite_hdf5_scdata
00069                          gpiv_fread_hdf5_histo
00070                          gpiv_fwrite_hdf5_histo
00071 
00072                          gpiv_fread_davis_image
00073                          gpiv_read_davis_image
00074 
00075 LAST MODIFICATION DATE:  $Id: io.h,v 1.17 2007-06-06 16:59:02 gerber Exp $
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 /* #define HD5_IMAGE_INT */                          /* Use integer for image data in HDF5 format */
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 /* __LIBGPIV_IO_H__ */

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