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

gpiv-post_par.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 LIBRARY:                libgpiv
00029 SOURCE:                 post_par.c
00030 EXTERNAL FUNCTIONS:
00031                         gpiv_post_parameters_set
00032                         gpiv_post_default_parameters
00033                         gpiv_post_get_parameters_from_resources
00034 
00035                         gpiv_post_read_parameters
00036                         gpiv_post_check_parameters_read
00037                         gpiv_post_fprint_parameters
00038                         gpiv_post_fread_hdf5_parameters
00039                         gpiv_post_fwrite_hdf5_parameters
00040 
00041  ------------------------------------------------------------------- */
00042 
00052 #ifndef __LIBGPIV_POSTPAR_H__
00053 #define __LIBGPIV_POSTPAR_H__
00054 
00055 #define GPIV_POSTPAR_KEY                       "POST"        
00061 enum GpivOperationManipiv {
00062     GPIV_FAST_Y = 0,           
00063     GPIV_FLIP_X = 1,           
00064     GPIV_FLIP_Y = 2,           
00065     GPIV_REVERT = 3,           
00066     GPIV_ROT90 = 4,            
00067     GPIV_ROT180 = 5,           
00068     GPIV_FILTER_BLOCK = 6,     
00069     GPIV_PASS_BLOCK = 7,       
00070     GPIV_ADD_XY = 8            
00071 } OPERATOR_MANIPIV;
00072 
00073 
00074 
00078 enum GpivDifferentiation {
00079     GPIV_CENTRAL = 0,          
00080     GPIV_LEAST_SQUARES = 1,    
00081     GPIV_RICHARDSON = 2,       
00082     GPIV_CIRCULATION = 3       
00083 };
00084 
00085 
00086 
00090 enum GpivOperation {
00091     GPIV_VORTICITY = 0,        
00092     GPIV_S_STRAIN = 1,         
00093     GPIV_N_STRAIN = 2          
00094 };
00095 
00096 
00097 
00101 enum GpivScaleType {
00102     GPIV_SCALE = 0,            
00103     GPIV_SCALE_INV = 1         
00104 } GPIV_SCALE_TYPE;
00105 
00106 
00107 
00108 typedef struct __GpivRoi GpivRoi;
00109 
00113 struct __GpivRoi {
00114     float x_1;                  
00115     float y_1;                  
00116     float x_2;                  
00117     float y_2;                  
00118 };
00119 
00120 
00121 typedef struct __GpivPostPar GpivPostPar;
00122 
00135 struct __GpivPostPar {
00136     enum GpivOperationManipiv operator_manipiv; 
00137     gboolean operator_manipiv__set;                
00140     gboolean set;              
00141     gboolean set__set;         
00143     float set_dx;              
00145     gboolean set_dx__set;      
00147     float set_dy;              
00149     gboolean set_dy__set;      
00151     GpivRoi *block;            
00153     gboolean block__set;
00154 
00155 /*
00156  * Parameters for spatial average (s-avg)
00157  */
00158     int subtract;              
00159     gboolean subtract__set;    
00161     float z_off_dx;            
00162     gboolean z_off_dx__set;    
00164     float z_off_dy;            
00165     gboolean z_off_dy__set;    
00167 /*
00168  * Parameters for vorticity and strain
00169  */
00170     enum GpivDifferentiation diff_type;  
00171     enum GpivOperation operator_vorstra; 
00173     int diff_type__set;             
00174     gboolean operator_vorstra__set; 
00176 /*
00177  * Parameters for scaling PIV data. Other parameters for scaling are in 
00178  * __GpivImagePar.
00179  */
00180     enum GpivScaleType scale_type;   
00181     gboolean scale_type__set; 
00182 };
00183 
00184 
00185 
00186 
00194 void
00195 gpiv_post_parameters_set                (GpivPostPar            *post_par,
00196                                         const gboolean          flag
00197                                         );
00198 
00199 
00200 
00208 void
00209 gpiv_post_default_parameters            (GpivPostPar            *post_par_default,
00210                                         const gboolean          force
00211                                         );
00212 
00213 
00214 
00224 GpivPostPar *
00225 gpiv_post_get_parameters_from_resources (const gchar            *localrc,
00226                                          const gboolean         verbose
00227                                          );
00228 
00229 
00238 void 
00239 gpiv_post_read_parameters               (FILE                   *fp_par, 
00240                                         GpivPostPar             *post_par,
00241                                         const gboolean          print_par
00242                                         );
00243 
00244 
00245 
00256 gchar *
00257 gpiv_post_check_parameters_read         (GpivPostPar            *post_par,
00258                                         const GpivPostPar       *post_par_default
00259                                         );
00260 
00261 
00262 
00270 void 
00271 gpiv_post_print_parameters              (FILE                   *fp_par_out,
00272                                         const GpivPostPar       *post_par
00273                                         );
00274 
00275 
00276 
00283 GpivPostPar *
00284 gpiv_post_fread_hdf5_parameters         (const gchar            *fname
00285                                         );
00286 
00287 
00288 
00296 gchar *
00297 gpiv_post_fwrite_hdf5_parameters        (const gchar            *fname, 
00298                                         const GpivPostPar       *post_par 
00299                                         );
00300 
00301 
00302 
00303 #endif /* __LIBGPIV_POSTPAR_H_ */

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