00001 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */ 00002 00003 /*----------------------------------------------------------------------------- 00004 00005 libgpiv - library for Particle Image Velocimetry 00006 00007 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Gerber van der Graaf 00008 00009 This file is part of libgpiv. 00010 00011 Libgpiv is free software; you can redistribute it and/or modify 00012 it under the terms of the GNU General Public License as published by 00013 the Free Software Foundation; either version 2, or (at your option) 00014 any later version. 00015 00016 This program is distributed in the hope that it will be useful, 00017 but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 GNU General Public License for more details. 00020 00021 You should have received a copy of the GNU General Public License 00022 along with this program; if not, write to the Free Software Foundation, 00023 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00024 00025 -----------------------------------------------------------------------------*/ 00026 00185 #ifndef __LIBGPIV_H__ 00186 #define __LIBGPIV_H__ 00187 00188 /* 00189 * Includes external library headers to be used in Libgpiv 00190 */ 00191 #include <stdlib.h> 00192 #include <stdio.h> 00193 #include <stdarg.h> 00194 00195 #include <math.h> 00196 #include <gsl/gsl_fit.h> 00197 #include <assert.h> 00198 00199 #include <time.h> 00200 #include <fftw3.h> 00201 #include <hdf5.h> 00202 #include <glib-2.0/glib.h> 00203 #include <png.h> 00204 00205 #ifdef ENABLE_CAM 00206 #include <libraw1394/raw1394.h> 00207 #include <libdc1394/dc1394_control.h> 00208 #endif /* ENABLE_CAM */ 00209 00210 #ifdef ENABLE_TRIG 00211 #include <rtai.h> 00212 #include <fcntl.h> 00213 #endif /* ENABLE_TRIG */ 00214 00215 #ifdef ENABLE_MPI 00216 #include <mpi/mpi.h> 00217 #endif /* ENABLE_MPI */ 00218 00219 #ifdef _OPENMP 00220 #include <omp.h> 00221 #endif 00222 00223 /* 00224 * General macro definitions 00225 */ 00226 00227 #define USE_FFTW3 00228 00229 #define LIBNAME "LIBGPIV" 00230 #define GPIV_SYSTEM_RSC_FILE "gpiv.conf" 00231 #define GPIV_HOME_RSC_FILE ".gpivrc" 00232 #define GPIV_NIMG_MAX 40 00233 #define GPIV_MAX_CHARS 80 00234 #define GPIV_MAX_LINES 6400 00235 #define GPIV_MAX_LINES_C 20 00236 #define GPIV_MAX_IMG_SIZE 2000 00237 #define GPIV_MAX_IMG_DEPTH 16 00238 #define GPIV_MIN_INTERR_SIZE 4 00239 #define GPIV_MAX_INTERR_SIZE 128 00240 #define GPIV_NBINS_MAX 100 00241 #define GPIV_NBINS_DEFAULT 10 00242 #define GPIV_SNR_NAN 99.0 00244 #define IA_GAUSS_WEIGHTING 00245 #define SPOF_FILTERING 00248 #ifndef SYSTEM_RSC_DIR 00249 #define SYSTEM_RSC_DIR "/etc" 00250 #endif /* SYSTEM_RSC_DIR */ 00251 00252 00253 /* 00254 * Data structure declarations 00255 */ 00256 00257 typedef struct __GpivPivData GpivPivData; 00266 struct __GpivPivData { 00267 guint nx; 00268 guint ny; 00269 guint nz; 00272 gfloat **point_x; 00273 gfloat **point_y; 00274 gfloat **point_z; 00276 gfloat **dx; 00277 gfloat **dy; 00278 gfloat **dz; 00280 gfloat **snr; 00285 gint **peak_no; 00288 gfloat **scalar; 00290 guint count; 00292 gfloat mean_dx; 00293 gfloat sdev_dx; 00294 gfloat min_dx; 00295 gfloat max_dx; 00297 gfloat mean_dy; 00298 gfloat sdev_dy; 00299 gfloat min_dy; 00300 gfloat max_dy; 00302 gfloat mean_dz; 00303 gfloat sdev_dz; 00304 gfloat min_dz; 00305 gfloat max_dz; 00308 gboolean scale; 00309 gboolean scale__set; 00311 gchar *comment; 00312 }; 00313 00314 00315 typedef struct __GpivScalarData GpivScalarData; 00320 struct __GpivScalarData { 00321 guint nx; 00322 guint ny; 00325 gfloat **point_x; 00326 gfloat **point_y; 00327 gfloat **scalar; 00329 gint **flag; 00332 gboolean scale; 00333 gboolean scale__set; 00335 gchar *comment; 00336 }; 00337 00338 00339 typedef struct __GpivBinData GpivBinData; 00340 00347 struct __GpivBinData { 00348 guint nbins; 00351 guint *count; 00352 gfloat *bound; 00353 gfloat *centre; 00354 gfloat min; 00355 gfloat max; 00358 gchar *comment; 00359 }; 00360 00361 00362 /* 00363 * Includes Libgpiv library headers 00364 */ 00365 00366 #include <gpiv/gpiv-genpar.h> 00367 00368 #ifdef ENABLE_CAM 00369 #include <gpiv/gpiv-cam.h> 00370 #endif /* ENABLE_CAM */ 00371 00372 #ifdef ENABLE_TRIG 00373 #include <gpiv/gpiv-trig.h> 00374 #endif /* ENABLE_TRIG */ 00375 00376 #include <gpiv/gpiv-img.h> 00377 #include <gpiv/gpiv-img_utils.h> 00378 #include <gpiv/gpiv-imgproc.h> 00379 #include <gpiv/gpiv-piv.h> 00380 #include <gpiv/gpiv-piv_par.h> 00381 #include <gpiv/gpiv-piv_utils.h> 00382 #include <gpiv/gpiv-valid.h> 00383 #include <gpiv/gpiv-valid_par.h> 00384 #include <gpiv/gpiv-post.h> 00385 #include <gpiv/gpiv-post_par.h> 00386 #include <gpiv/gpiv-post_utils.h> 00387 #include <gpiv/gpiv-io.h> 00388 #include <gpiv/gpiv-utils.h> 00389 #include <gpiv/gpiv-utils_alloc.h> 00390 00391 00392 #ifdef GPIV_ENABLE_DEPRECATED 00393 #include <gpiv/back_intface.h> 00394 #endif 00395 00396 00397 #endif /* __LIBGPIV_H__ */