Main Page | Files | Data Structures | Functions | Global Variables |
include/gpiv/gpiv-valid.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 LIBRARY:                libgpiv
00029 EXTERNAL FUNCTIONS:
00030 SOURCE:                 valid_par.c
00031                         gpiv_valid_parameters_set
00032                         gpiv_valid_default_parameters
00033                         gpiv_valid_read_parameters
00034                         gpiv_valid_check_parameters_read
00035                         gpiv_valid_test_parameter
00036                         gpiv_valid_fprint_parameters
00037 
00038 SOURCE:                 valid.c
00039                         gpiv_valid_residu
00040                         gpiv_valid_residu_stats
00041                         gpiv_valid_peaklck
00042                         gpiv_valid_errvec
00043                         gpiv_valid_gradient
00044                         gpiv_cumhisto_eqdatbin_gnuplot
00045                         gpiv_valid_threshold
00046 
00047  ------------------------------------------------------------------- */
00048 
00059 #ifndef __LIBGPIV_VALID_H__
00060 #define __LIBGPIV_VALID_H__
00061 
00062 
00063 #include <gpiv/gpiv-valid_par.h>
00064 
00065 #define GPIV_GRADIENT_THRESHOLD        2.0     
00066 #define GPIV_THRESHOLD_DEFAULT         1.2     
00067 #define GPIV_VALID_MAX_SWEEP           9       
00068 #define GPIV_RESIDU_MAX_NORMMEDIAN     2.0     
00073 typedef struct __GpivLinRegData GpivLinRegData;
00074 
00078 struct __GpivLinRegData {       
00079     double c0;                  
00080     double c1;                  
00081     double cov00;               
00082     double cov01;               
00083     double cov11;               
00084     double sumsq;               
00085 };
00086 
00087 
00088 
00098 gchar *
00099 gpiv_valid_residu           (GpivPivData            *piv_data, 
00100                     const GpivValidPar  *valid_par,
00101                     const gboolean      incl_point
00102                     );
00103 
00104 
00105 
00116 GpivBinData *
00117 gpiv_valid_residu_stats         (const GpivPivData      *piv_data,
00118                     const guint     nbins,
00119                     GpivLinRegData      *linreg
00120                     );
00121 
00122 
00123 
00132 GpivBinData *
00133 gpiv_valid_peaklck          (const GpivPivData      *piv_data,
00134                     const guint     nbins
00135                     );
00136 
00137 
00149 gchar *
00150 gpiv_valid_errvec           (GpivPivData        *piv_data,
00151                     const GpivImage     *image,
00152                     const GpivPivPar    *piv_par,
00153                     const GpivValidPar  *valid_par,
00154                     const gboolean      interrogate_valid
00155                     );
00156 
00157 
00168 void 
00169 gpiv_valid_gradient         (const GpivPivPar       *piv_par, 
00170                     GpivPivData     *piv_data
00171                     );
00172 
00173 
00185 void
00186 gpiv_cumhisto_eqdatbin_gnuplot      (const gchar            *fname_out, 
00187                     const gchar     *title, 
00188                     const gchar     *GNUPLOT_DISPLAY_COLOR,
00189                     const gint      GNUPLOT_DISPLAY_SIZE,
00190                     const GpivLinRegData    *linreg
00191                     );
00192 
00193 
00203 gfloat 
00204 gpiv_valid_threshold            (const GpivPivPar       *piv_par,
00205                     const GpivValidPar  *valid_par,
00206                     const GpivLinRegData    *linreg
00207                     );
00208 
00209 
00210 
00211 
00212 
00213 #endif /* __LIBGPIV_VALID_H__ */
00214