Main Page | Files | Data Structures | Functions | Global Variables |
include/gpiv/gpiv-valid_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, 2005, 2006, 2007, 2008 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:               gpiv-valid_par.h
00029 LIBRARY:                libgpiv
00030 EXTERNAL FUNCTIONS:
00031 SOURCE:                 valid_par.c
00032                         gpiv_valid_parameters_set
00033                         gpiv_valid_default_parameters
00034                         gpiv_valid_get_parameters_from_resources
00035 
00036                         gpiv_valid_read_parameters
00037                         gpiv_valid_check_parameters_read
00038                         gpiv_valid_testonly_parameters
00039                         gpiv_valid_testadjust_parameters
00040                         gpiv_valid_print_parameters
00041                         gpiv_valid_fread_hdf5_parameters
00042                         gpiv_valid_fwrite_hdf5_parameters
00043 
00044                         gpiv_valid_mpi_bcast_validpar
00045 
00046  --------------------------------------------------------------------------- */
00047 
00058 #ifndef __LIBGPIV_VALIDPAR_H__
00059 #define __LIBGPIV_VALIDPAR_H__
00060 
00061 
00062 #define GPIV_VALIDPAR_KEY      "VALID" 
00063 #define GPIV_VALIDPAR_MAX__NEIGHBORS 9 
00070 enum ResiduType {
00071     GPIV_VALID_RESIDUTYPE__SNR,         
00072     GPIV_VALID_RESIDUTYPE__MEDIAN,      
00073     GPIV_VALID_RESIDUTYPE__NORMMEDIAN   
00079 };
00080 
00081 
00082 
00086 enum SubstitutionType {
00087     GPIV_VALID_SUBSTYPE__NONE,          
00088     GPIV_VALID_SUBSTYPE__L_MEAN,        
00089     GPIV_VALID_SUBSTYPE__MEDIAN,        
00090     GPIV_VALID_SUBSTYPE__COR_PEAK       
00091 };
00092 
00093 
00094 
00095 typedef struct __GpivValidPar GpivValidPar;
00096 
00103  struct __GpivValidPar {
00104     gfloat data_yield;                 
00107     gfloat residu_max;                 
00108     guint neighbors;                    
00109     enum ResiduType residu_type;       
00110     enum SubstitutionType subst_type;  
00111     gint histo_type;                   
00113     gboolean data_yield__set;          
00114     gboolean residu_max__set;          
00115     gboolean neighbors__set;           
00116     gboolean residu_type__set;         
00117     gboolean subst_type__set;          
00118     gboolean histo_type__set;          
00119 };
00120 
00121 
00130 void
00131 gpiv_valid_parameters_set       (GpivValidPar       *valid_par,
00132                     const gboolean      flag
00133                     );
00134 
00135 
00136 
00144 void
00145 gpiv_valid_default_parameters       (GpivValidPar       *valid_par_default,
00146                     const gboolean      force
00147                     );
00148 
00149 
00150 
00159 GpivValidPar *
00160 gpiv_valid_get_parameters_from_resources(const gchar        *localrc,
00161                     const gboolean      verbose
00162                     );
00163 
00164 
00165 
00175 void 
00176 gpiv_valid_read_parameters      (FILE           *fp_par,
00177                     GpivValidPar        *valid_par,
00178                     const gboolean      print_par
00179                     );
00180 
00181 
00182 
00194 gchar *
00195 gpiv_valid_check_parameters_read    (GpivValidPar           *valid_par,
00196                     const GpivValidPar  *valid_par_default
00197                     );
00198 
00199 
00200 
00201 
00202 
00210 gchar *
00211 gpiv_valid_testonly_parameters          (const GpivValidPar     *valid_par
00212                     );
00213 
00214 
00223 gchar *
00224 gpiv_valid_testadjust_parameters    (GpivValidPar       *valid_par
00225                     );
00226 
00227 
00236 void 
00237 gpiv_valid_print_parameters     (FILE                   *fp,
00238                     const GpivValidPar  *valid_par
00239                     );
00240 
00241 
00248 GpivValidPar *
00249 gpiv_valid_cp_parameters        (const GpivValidPar *valid_par
00250                     );
00251 
00252 
00261 void
00262 gpiv_valid_dupl_parameters      (const GpivValidPar     *valid_par_src, 
00263                     GpivValidPar        *valid_par_dest
00264                     );
00265 
00266 
00273 GpivValidPar *
00274 gpiv_valid_fread_hdf5_parameters        (const gchar        *fname
00275                     );
00276 
00277 
00278 
00286 gchar *
00287 gpiv_valid_fwrite_hdf5_parameters   (const gchar            *fname, 
00288                     const GpivValidPar  *valid_par
00289                     );
00290 
00291 #ifdef ENABLE_MPI
00292 
00298 void
00299 gpiv_valid_mpi_bcast_validpar       (GpivValidPar       *valid_par
00300                     );
00301 
00302 #endif /* ENABLE_MPI */
00303 #endif /* __LIBGPIV_VALIDPAR_H__ */
00304