Main Page | Files | Data Structures | Functions | Global Variables |
gpiv-piv_par.h
Go to the documentation of this file.
1 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */
2 
3 /*
4  libgpiv - library for Particle Image Velocimetry
5 
6  Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Gerber van der Graaf
7 
8  This file is part of libgpiv.
9 
10  Libgpiv is free software; you can redistribute it and/or modify
11  it under the terms of the GNU General Public License as published by
12  the Free Software Foundation; either version 2, or (at your option)
13  any later version.
14 
15  This program is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with this program; if not, write to the Free Software Foundation,
22  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 
24 
25 
26 ------------------------------------------------------------------------------
27 FILENAME: piv_par.c
28 LIBRARY: libgpiv
29 EXTERNAL FUNCTIONS:
30  gpiv_piv_parameters_set
31  gpiv_piv_default_parameters
32  gpiv_piv_get_parameters_from_resources
33 
34  gpiv_piv_read_parameters
35  gpiv_piv_check_parameters_read
36  gpiv_piv_test_parameters
37  gpiv_piv_print_parameters
38  gpiv_piv_cp_parameters
39  gpiv_piv_cp_undef_parameters
40  gpiv_piv_fread_hdf5_parameters
41  gpiv_piv_fwrite_hdf5_parameters
42 
43 --------------------------------------------------------------------- */
44 
55 #ifndef __LIBGPIV_PIVPAR_H__
56 #define __LIBGPIV_PIVPAR_H__
57 
58 /*-----------------------------------------------------------------------------
59  * Parameters for Piv evaluation
60  */
61 
62 #define GPIV_PIVPAR_KEY "PIV"
68 enum GpivIntScheme {
74 };
75 
76 
80 typedef struct __GpivPivPar GpivPivPar;
81 
91 struct __GpivPivPar {
92  guint col_start;
93  gboolean col_start__set;
95  guint col_end;
96  gboolean col_end__set;
98  guint ifit;
99  gboolean ifit__set;
101  guint int_geo;
102  gboolean int_geo__set;
104  guint int_line_col;
105  gboolean int_line_col__set;
113  guint int_line_row;
114  gboolean int_line_row__set;
128  guint int_size_f;
129  gboolean int_size_f__set;
131  guint int_size_i;
132  gboolean int_size_i__set;
134  gint int_shift;
135  gboolean int_shift__set;
138  gboolean int_deform__set;
140  gint peak;
141  gboolean peak__set;
149  int print_par;
150  gboolean print_par__set;
152  int print_piv;
153  gboolean print_piv__set;
155  guint row_start;
156  gboolean row_start__set;
158  guint row_end;
159  gboolean row_end__set;
165  gboolean int_scheme__set;
167  gboolean gauss_weight_ia;
170  gboolean spof_filter;
171  gboolean spof_filter__set;
172 };
173 
174 
175 /*
176  * Function prototypes
177  */
178 
188 void
189 gpiv_piv_default_parameters (GpivPivPar *piv_par_default,
190  const gboolean force
191  );
192 
193 
194 
203 GpivPivPar *
204 gpiv_piv_get_parameters_from_resources (const gchar *localrc,
205  const gboolean verbose
206  );
207 
208 
209 
217 void
219  const gboolean flag
220  );
221 
222 
223 
233 void
234 gpiv_piv_read_parameters (FILE *fp,
235  GpivPivPar *piv_par,
236  const gboolean verbose
237  );
238 
239 
240 
251 gchar *
253  const GpivPivPar *piv_par_default
254  );
255 
256 
257 
266 gchar *
267 gpiv_piv_testonly_parameters (const GpivImagePar *image_par,
268  const GpivPivPar *piv_par
269  );
270 
271 
272 
282 gchar *
284  GpivPivPar *piv_par
285  );
286 
287 
288 
297 void
298 gpiv_piv_print_parameters (FILE *fp,
299  const GpivPivPar *piv_par
300  );
301 
308 GpivPivPar *
309 gpiv_piv_cp_parameters (const GpivPivPar *piv_par
310  );
311 
312 
321 void
322 gpiv_piv_cp_undef_parameters (const GpivPivPar *piv_par_src,
323  GpivPivPar *piv_par_dest
324  );
325 
326 
333 GpivPivPar *
334 gpiv_piv_fread_hdf5_parameters (const gchar *fname
335  );
336 
337 
345 gchar *
346 gpiv_piv_fwrite_hdf5_parameters (const gchar *fname,
347  const GpivPivPar *piv_par
348  );
349 
350 
351 #ifdef ENABLE_MPI
352 
358 gchar *
359 gpiv_piv_mpi_bcast_pivpar (GpivPivPar *piv_par);
360 #endif /* ENABLE_MPI */
361 #endif /* __LIBGPIV_PIVPAR_H__ */
zero ofsetting using central differential scheme
Definition: gpiv-piv_par.h:72
gchar * gpiv_piv_testadjust_parameters(const GpivImagePar *image_par, GpivPivPar *piv_par)
Tests if all piv parameters have been read and have been defined to valid values. ...
gboolean print_par__set
flag if print_par has been defined
Definition: gpiv-piv_par.h:150
gboolean int_line_row__set
flag if int_line_row has been defined
Definition: gpiv-piv_par.h:114
guint ifit
Type of sub-pixel estimation.
Definition: gpiv-piv_par.h:98
gboolean spof_filter__set
flag if spof_filter has been defined
Definition: gpiv-piv_par.h:171
gboolean int_geo__set
flag if int_geo has been defined
Definition: gpiv-piv_par.h:102
gboolean int_shift__set
flag if int_shift has been defined
Definition: gpiv-piv_par.h:135
void gpiv_piv_cp_undef_parameters(const GpivPivPar *piv_par_src, GpivPivPar *piv_par_dest)
Copies piv parameters from piv_par_src to piv_par_dest if piv_par_dest have not been set...
gboolean int_line_col__set
flag if int_line_col has been defined
Definition: gpiv-piv_par.h:105
gboolean int_point_col__set
flag if int_point_col has been defined
Definition: gpiv-piv_par.h:123
Linear kernel weighting if Interrogation Area's.
Definition: gpiv-piv_par.h:70
gboolean print_piv__set
flag if print_piv has been defined
Definition: gpiv-piv_par.h:153
int print_par
print parameters
Definition: gpiv-piv_par.h:149
gboolean int_size_i__set
flag if int_size_f has been defined
Definition: gpiv-piv_par.h:132
void gpiv_piv_read_parameters(FILE *fp, GpivPivPar *piv_par, const gboolean verbose)
Reads all parameters for PIV evaluation.
gchar * gpiv_piv_fwrite_hdf5_parameters(const gchar *fname, const GpivPivPar *piv_par)
Writes piv parameters from hdf5 data file.
gboolean pre_shift_col__set
flag if pre_shift_col has been defined
Definition: gpiv-piv_par.h:144
GpivIntScheme
PIV interrogation scheme.
Definition: gpiv-piv_par.h:68
gchar * gpiv_piv_check_parameters_read(GpivPivPar *piv_par, const GpivPivPar *piv_par_default)
Checks if all PIV parameters have been read.
gboolean int_line_row_end__set
flag if int_line_row_end has been defined
Definition: gpiv-piv_par.h:120
gboolean peak__set
flag if peak has been defined
Definition: gpiv-piv_par.h:141
gboolean spline_degree__set
flag if spline_degree has been defined
Definition: gpiv-piv_par.h:162
guint int_line_col_start
first column of image to use for interrogation along a line
Definition: gpiv-piv_par.h:107
guint int_geo
Interrogation along a line or within an area of interest.
Definition: gpiv-piv_par.h:101
gboolean int_line_row_start__set
flag if int_line_row_start has been defined
Definition: gpiv-piv_par.h:117
int pre_shift_row
general pre-shift in vertical direction (rows)
Definition: gpiv-piv_par.h:146
enum GpivIntScheme int_scheme
Way to correct on biasing effects with value of GpivIntScheme.
Definition: gpiv-piv_par.h:164
gboolean row_end__set
flag if row_end has been defined
Definition: gpiv-piv_par.h:159
guint int_line_col
interrogation along a column
Definition: gpiv-piv_par.h:104
guint int_point_row
row of a interrogation area for single point
Definition: gpiv-piv_par.h:125
guint row_start
last row in image to use for interrogation
Definition: gpiv-piv_par.h:155
gchar * gpiv_piv_testonly_parameters(const GpivImagePar *image_par, const GpivPivPar *piv_par)
Tests all piv parameters if have been read and have been defined to valid values. ...
int pre_shift_col
general pre-shift in horizontal direction (columns)
Definition: gpiv-piv_par.h:143
int spline_degree
degree of b-splines to be used for image data interpolation
Definition: gpiv-piv_par.h:161
gboolean int_line_col_start__set
flag if int_line_col_start has been defined
Definition: gpiv-piv_par.h:108
Image parameters or header info.
Definition: gpiv-img.h:122
gint int_shift
interrogation area shift
Definition: gpiv-piv_par.h:134
guint col_end
last column in image to use for interrogation
Definition: gpiv-piv_par.h:95
GpivPivPar * gpiv_piv_cp_parameters(const GpivPivPar *piv_par)
Copies piv parameters.
gboolean int_deform__set
flag if int_deform has been defined
Definition: gpiv-piv_par.h:138
guint row_end
first row of image to use for interrogation
Definition: gpiv-piv_par.h:158
classical zero ofsetting
Definition: gpiv-piv_par.h:71
guint int_line_row
interrogation along a row
Definition: gpiv-piv_par.h:113
gboolean col_end__set
flag if col_end has been defined
Definition: gpiv-piv_par.h:96
Parameters for PIV evaluation (interrogation) of images.
Definition: gpiv-piv_par.h:91
gboolean spof_filter
Symmetric Phase Only filtering of covariance function.
Definition: gpiv-piv_par.h:170
gboolean pre_shift_row__set
flag if pre_shift_row has been defined
Definition: gpiv-piv_par.h:147
guint int_line_col_end
last column of image to use for interrogation along a line
Definition: gpiv-piv_par.h:110
gboolean gauss_weight_ia
Gaussian weighting to I.A.
Definition: gpiv-piv_par.h:167
GpivPivPar * gpiv_piv_fread_hdf5_parameters(const gchar *fname)
Reads piv parameters from hdf5 data file.
gboolean int_size_f__set
flag if int_size_i has been defined
Definition: gpiv-piv_par.h:129
guint int_size_i
initial interrogation area size; to start with
Definition: gpiv-piv_par.h:131
void gpiv_piv_parameters_set(GpivPivPar *piv_par, const gboolean flag)
Sets flags for all piv_par__set.
gboolean row_start__set
flag if row_start has been defined
Definition: gpiv-piv_par.h:156
gboolean int_point_row__set
flag if int_point_row has been defined
Definition: gpiv-piv_par.h:126
gboolean gauss_weight_ia__set
flag if gauss_weight_ia has been defined
Definition: gpiv-piv_par.h:168
gint peak
peak number of correlation function to be used as estimator
Definition: gpiv-piv_par.h:140
guint int_size_f
final interrogation area size; to be ended with
Definition: gpiv-piv_par.h:128
guint col_start
first column of image to use for interrogation
Definition: gpiv-piv_par.h:92
gboolean ifit__set
flag if ifit has been defined
Definition: gpiv-piv_par.h:99
guint int_line_row_end
first row of image to use for interrogation along a column
Definition: gpiv-piv_par.h:119
gboolean col_start__set
flag if col_start has been defined
Definition: gpiv-piv_par.h:93
guint int_line_row_start
first row of image to use for interrogation along a column
Definition: gpiv-piv_par.h:116
int print_piv
print piv data
Definition: gpiv-piv_par.h:152
void gpiv_piv_default_parameters(GpivPivPar *piv_par_default, const gboolean force)
Sets default parameter values.
gboolean int_line_col_end__set
flag if int_line_col_end has been defined
Definition: gpiv-piv_par.h:111
gboolean int_scheme__set
flag if int_scheme has been defined
Definition: gpiv-piv_par.h:165
int int_deform
deform image for improved accuracy
Definition: gpiv-piv_par.h:137
void gpiv_piv_print_parameters(FILE *fp, const GpivPivPar *piv_par)
Prints parameters to fp.
guint int_point_col
column of a interrogation area for single point
Definition: gpiv-piv_par.h:122
GpivPivPar * gpiv_piv_get_parameters_from_resources(const gchar *localrc, const gboolean verbose)
Reads piv parameters from system-wide gpiv.conf and $HOME/.gpivrc.
image deformation
Definition: gpiv-piv_par.h:73

Generated for libgpiv-0.6.1 by doxygen 1.8.13