Main Page | Files | Data Structures | Functions | Global Variables |
gpiv-img.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 
5 
6  libgpiv - library for Particle Image Velocimetry
7 
8  Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Gerber van der Graaf
9 
10  This file is part of libgpiv.
11 
12  Libgpiv is free software; you can redistribute it and/or modify
13  it under the terms of the GNU General Public License as published by
14  the Free Software Foundation; either version 2, or (at your option)
15  any later version.
16 
17  This program is distributed in the hope that it will be useful,
18  but WITHOUT ANY WARRANTY; without even the implied warranty of
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  GNU General Public License for more details.
21 
22  You should have received a copy of the GNU General Public License
23  along with this program; if not, write to the Free Software Foundation,
24  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 
26 
27 
28 -------------------------------------------------------------------------------
29 LIBRARY: libgpiv:
30 EXTERNAL FUNCTIONS:
31  gpiv_img_parameters_set
32  gpiv_img_get_parameters
33 
34  gpiv_img_read_header
35  gpiv_img_check_header_read
36  gpiv_img_check_header_required_read
37  gpiv_img_check_header_scale_read
38  gpiv_img_test_header
39  gpiv_img_print_header
40  gpiv_img_fprint_header
41  gpiv_img_print_parameters
42  gpiv_img_fprint_parameters
43  gpiv_img_cp_parameters
44  gpiv_img_ovwrt_parameters
45  gpiv_img_fread_hdf5_parameters
46  gpiv_img_fwrite_hdf5_parameters
47  gpiv_img_fread_davis_parameters
48 
49 -----------------------------------------------------------------------------*/
50 
60 #ifndef __LIBGPIV_IMG_H__
61 #define __LIBGPIV_IMG_H__
62 
63 
64 
65 #define GPIV_IMGPAR_DEFAULT__DEPTH 8
66 #define GPIV_IMGPAR_DEFAULT__NCOLUMNS 256
67 #define GPIV_IMGPAR_DEFAULT__NROWS 256
68 #define GPIV_IMGPAR_DEFAULT__X_CORR 1
69 #define GPIV_IMGPAR_DEFAULT__S_SCALE 1.0
70 #define GPIV_IMGPAR_DEFAULT__T_SCALE 1.0
71 #define GPIV_IMGPAR_DEFAULT__Z_OFF_X 0.0
72 #define GPIV_IMGPAR_DEFAULT__Z_OFF_Y 0.0
74 #define GPIV_IMGPAR_DEFAULT__TITLE ""
75 #define GPIV_IMGPAR_DEFAULT__CREATION_DATE ""
76 #define GPIV_IMGPAR_DEFAULT__LOCATION ""
77 #define GPIV_IMGPAR_DEFAULT__AUTHOR ""
78 #define GPIV_IMGPAR_DEFAULT__SOFTWARE "gpiv / gpiv_rr"
79 #define GPIV_IMGPAR_DEFAULT__SOURCE ""
80 #define GPIV_IMGPAR_DEFAULT__USERTEXT ""
81 #define GPIV_IMGPAR_DEFAULT__WARNING ""
82 #define GPIV_IMGPAR_DEFAULT__DISCLAIMER "See The GNU General Public License (GPL)"
83 #define GPIV_IMGPAR_DEFAULT__COMMENT ""
84 #define GPIV_IMGPAR_DEFAULT__COPYRIGHT ""
85 #define GPIV_IMGPAR_DEFAULT__EMAIL ""
86 #define GPIV_IMGPAR_DEFAULT__URL ""
89 #define GPIV_IMGPAR_KEY "IMG"
90 #define GPIV_IMGPAR_KEY__DEPTH "depth"
91 #define GPIV_IMGPAR_KEY__NCOLUMNS "ncolumns"
92 #define GPIV_IMGPAR_KEY__NROWS "nrows"
93 #define GPIV_IMGPAR_KEY__X_CORR "x_corr"
94 #define GPIV_IMGPAR_KEY__S_SCALE "s_scale"
95 #define GPIV_IMGPAR_KEY__T_SCALE "t_scale"
96 #define GPIV_IMGPAR_KEY__Z_OFF_X "zoff_x"
97 #define GPIV_IMGPAR_KEY__Z_OFF_Y "zoff_y"
99 #define GPIV_IMGPAR_KEY__TITLE "title"
100 #define GPIV_IMGPAR_KEY__CREATION_DATE "creation_date"
101 #define GPIV_IMGPAR_KEY__LOCATION "location"
102 #define GPIV_IMGPAR_KEY__AUTHOR "author"
103 #define GPIV_IMGPAR_KEY__SOFTWARE "software"
104 #define GPIV_IMGPAR_KEY__SOURCE "source"
105 #define GPIV_IMGPAR_KEY__USERTEXT "usertext"
106 #define GPIV_IMGPAR_KEY__WARNING "warning"
107 #define GPIV_IMGPAR_KEY__DISCLAIMER "disclaimer"
108 #define GPIV_IMGPAR_KEY__COMMENT "comment"
109 #define GPIV_IMGPAR_KEY__COPYRIGHT "copyright"
110 #define GPIV_IMGPAR_KEY__EMAIL "email"
111 #define GPIV_IMGPAR_KEY__URL "url"
113 typedef struct __GpivImagePar GpivImagePar;
114 
123  guint depth;
124  gboolean depth__set;
126  guint ncolumns;
127  gboolean ncolumns__set;
129  guint nrows;
130  gboolean nrows__set;
132  gboolean x_corr;
133  gboolean x_corr__set;
135  gfloat s_scale;
136  gboolean s_scale__set;
138  gfloat t_scale;
139  gboolean t_scale__set;
141  gfloat z_off_x;
142  gboolean z_off_x__set;
144  gfloat z_off_y;
145  gboolean z_off_y__set;
148  gboolean title__set;
154  gboolean location__set;
157  gboolean author__set;
160  gboolean software__set;
163  gboolean source__set;
166  gboolean usertext__set;
169  gboolean warning__set;
172  gboolean disclaimer__set;
175  gboolean comment__set;
178  gboolean copyright__set;
181  gboolean email__set;
184  gboolean url__set;
185 };
186 
187 
188 typedef struct __GpivImage GpivImage;
194 struct __GpivImage {
196  guint16 **frame1;
197  guint16 **frame2;
198 };
199 
200 
201 /*
202  * Function prototypes
203  */
204 
212 void
214  const gboolean flag
215  );
216 
217 
218 
228 GpivImagePar *
229 gpiv_img_get_parameters_from_resources (const gchar *localrc,
230  const gboolean verbose
231  );
232 
233 
241 void
243  const gboolean force
244  );
245 
246 
247 
260 void
261 gpiv_img_read_header (FILE *fp,
262  GpivImagePar *image_par,
263  const gboolean include_key,
264  const gboolean verbose,
265  FILE *fp_par_out
266  );
267 
268 
269 
276 gchar *
278  );
279 
280 
281 
290 gchar *
292  );
293 
294 
295 
302 gchar *
304  );
305 
306 
313 gchar *
314 gpiv_img_test_header (const GpivImagePar *image_par
315  );
316 
317 
326 void
327 gpiv_img_print_header (FILE *fp,
328  const GpivImagePar *image_par
329  );
330 
331 
340 void
341 gpiv_img_fprint_header (const gchar *fname,
342  const GpivImagePar *image_par
343  );
344 
345 
353 GpivImagePar *
354 gpiv_img_cp_parameters (const GpivImagePar *image_par
355  );
356 
357 
365 void
366 gpiv_img_ovwrt_parameters (const GpivImagePar *image_par_src,
367  GpivImagePar *image_par_dest
368  );
369 
370 
379 void
380 gpiv_img_print_parameters (FILE *fp,
381  const GpivImagePar *image_par
382  );
383 
384 
393 void
394 gpiv_img_fprint_parameters (const gchar *fname,
395  const GpivImagePar *image_par
396  );
397 
398 
405 GpivImagePar *
406 gpiv_img_fread_hdf5_parameters (const gchar *fname
407  );
408 
409 
417 gchar *
418 gpiv_img_fwrite_hdf5_parameters (const gchar *fname,
419  const GpivImagePar *image_par
420  );
421 
422 
423 
432 gchar *
433 gpiv_img_fread_davis_parameters (const gchar *fname,
434  GpivImagePar *image_par
435  );
436 
437 #ifdef ENABLE_MPI
438 
443 void
444 gpiv_img_mpi_bcast_imgpar (GpivImagePar *image_par
445  );
446 
447 #endif /* ENABLE_MPI */
448 #endif /* __LIBGPIV_IMG_H__ */
449 

Generated on Thu Mar 20 2014 09:01:34 for libgpiv-0.6.1 by doxygen 1.8.1.2