This file is indexed.

/usr/include/gpiv/gpiv-piv.h is in libgpiv3-dev 0.6.1-3build2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */

/*-----------------------------------------------------------------------------

   libgpiv - library for Particle Image Velocimetry

   Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Gerber van der Graaf

   This file is part of libgpiv.

   Libgpiv is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  

-------------------------------------------------------------------------------
LIBRARY:                libgpiv

SOURCE:                 piv.c

EXTERNAL FUNCTIONS:
                        gpiv_piv_count_pivdata_fromimage
                        gpiv_piv_select_int_point
                        gpiv_piv_interrogate_img
                        gpiv_piv_interrogate_ia
                        gpiv_piv_isizadapt
                        gpiv_piv_write_deformed_image
                        gpiv_piv_weight_kernel_lin
                        gpiv_fread_fftw_wisdom
                        gpiv_fwrite_fftw_wisdom


------------------------------------------------------------------------------*/

/*!
\file                   gpiv-piv.h
\brief                  module for PIV image evaluation

SOURCES:                lib/piv.c

LAST MODIFICATION DATE: $Id: gpiv-piv.h,v 1.2 2008-04-09 06:10:28 gerber Exp $
 */



#ifndef __LIBGPIV_PIV_H__
#define __LIBGPIV_PIVL_H__


#include <gpiv/gpiv-piv_par.h>
#include <gpiv/gpiv-valid_par.h>



#define GPIV_ZEROPAD_FACT 2     /**< magnification factor of zero-padded int.\ area */
#define GPIV_DIFF_ISI  0        /**< difference between interrogation sizes 
                                   of first and second image if zero 
                                   offset has been used */
#define GPIV_CUM_RESIDU_MIN 0.25 /**< minimum cumulative residu for convergence */
#define GPIV_MAX_PIV_SWEEP 10   /**< maximum number of PIV evaluation sweeps,
                                   starting from zero */
#define GPIV_SNR_DISABLE 88.0    /**< snr value for manually disabled estimator */
#define GPIV_DEFORMED_IMG_NAME "gpiv_defimg" /**< Deformed image to be stored in TMP_DIR */ 
#define GPIV_LOGFILE "gpiv.log"  /**< Log file to be stored in TMP_DIR */


#define CMPR_FACT 2            /**< Image compression factor for speeding up the
                                  evaluation */
#define GPIV_SHIFT_FACTOR 3    /**< For initial grid, apply 
                                  int_shift = int_size_i / GPIV_SHIFT_FACTOR */



/**
 * Type of sub-pixel estimation
 */
enum GpivIFit {
    GPIV_NONE = 0,     /**< No fitting */
    GPIV_GAUSS = 1,    /**< Gauss fitting */
    GPIV_POWER = 2,    /**< Power fitting */
    GPIV_GRAVITY = 3   /**< Plain gravity fitting */
};



/**
 * Interrogation geometry
 */
enum GpivIntGeo {
    GPIV_AOI = 0,      /**< Area of interst */
    GPIV_LINE_C = 1,   /**< Along column line */
    GPIV_LINE_R = 2,   /**< Along row line */
    GPIV_POINT = 3     /**< At single point */
};



typedef struct __GpivCovariance GpivCov;
/*!
 * \brief Covariance data
 *
 * The structure holds the 2-dimensional covariance data, some variables and 
 * other related parameters in order to 'fold' the data in an array.
 */
struct __GpivCovariance {	/**< data structure of covariance data */
    float **z;			/**< 2-dim array containing covariance data */
    float min;			/**< minimum covariance value */
    float max;			/**< maximum covariance value */

    long top_x;                 /**< x-position of maximum at pixel level */
    long top_y;                 /**< y-position of maximum at pixel level */
    float subtop_x;             /**< x-position of maximum at sub-pixel level */
    float subtop_y;             /**< y-position of maximum at sub-pixel level */
    float snr;                  /**< Signal to Noice defined by quotient of first 
                                   and second highest peaks */

    int z_rnl;			/**< lowest negative row index */
    int z_rnh;			/**< highest negative row index */
    int z_rpl;			/**< lowest positive row index */
    int z_rph;			/**< highest positive row index */

    int z_cnl;			/**< lowest negative column index */
    int z_cnh;			/**< highest negative column index */
    int z_cpl;			/**< lowest positive column index */
    int z_cph;			/**< highest positive index */

    int z_rl;			/**< general lowest row index */
    int z_rh;			/**< general highest row index */
    int z_cl;			/**< general lowest column index */
    int z_ch;			/**< general highest column index */
};



/*-----------------------------------------------------------------------------
 * Function prototypes
 */



/**
 *     Calculates the number of interrogation areas from the image sizes, 
 *     pre-shift and area of interest.
 *
 *     @param[in] image_par    structure of image parameters
 *     @param[in] piv_par      structure of piv evaluation parameters
 *     @param[out] nx          number of columns (second array index)
 *     @param[out] ny          number of rows (first array index)
 *     @return                 NULL on success or error message on failure
 */
gchar *
gpiv_piv_count_pivdata_fromimage        (const GpivImagePar     *image_par,
                                         const GpivPivPar       *piv_par,
                                         guint                  *nx,
                                         guint                  *ny
                                         );


/**
 *     PIV interrogation of an image pair at an entire grid.
 *
 *     @param[in] image        image containing data and header info
 *     @param[in] piv_par      image interrogation parameters
 *     @param[in] valid_par    PIV data validation parameters
 *     @param[out] verbose     prints progress of interrogation to stdout
 *     @return                 GpivPivData containing PIV estimators on success
 *                             or NULL on failure
 */
GpivPivData *
gpiv_piv_interrogate_img     		(const GpivImage        *image,
                              		const GpivPivPar       	*piv_par,
                              		const GpivValidPar     	*valid_par,
                              		const gboolean         	verbose
                              		);
 

/**
 *      Interrogates a single Interrogation Area.
 *
 *      @param[in] index_y      y-index of interrogation area position  
 *      @param[in] index_x      x-index of interrogation area position
 *      @param[in] image        structure of image
 *      @param[in] piv_par      structure of piv evaluation parameters
 *      @param[in] sweep        sweep number of iterative process 
 *      @param[in] last_sweep   flag for last sweep
 *      @param[in] int_area_1   first interrogation area
 *      @param[in] int_area_2   second interrogation area
 *      @param[out] cov          structure containing covariance data
 *      @param[out] piv_data    modified piv data at [index_y][index_x] from 
 *                              interrogation
 *      @return                 NULL on success or error message on failure
 */
gchar *
gpiv_piv_interrogate_ia      		(const guint           index_y,
                             		const guint            index_x,
                          		const GpivImage        *image,
                              		const GpivPivPar       *piv_par,
                              		const guint            sweep,
                              		const guint            last_sweep,
                              		gfloat                 **int_area_1,
                              		gfloat                 **int_area_2,
                              		GpivCov                *cov,
                              		GpivPivData            *piv_data
                              		);



/**
 *     Adjusts interrogation area sizes. For each interrogation sweep,
 *     (dest) int_size_i is halved, until it reaches (src)
 *     int_size_f. Then, isiz_last is set TRUE, which will avoid
 *     changing the interrogation sizes in next calls.
 *
 *     @param[in] piv_par_src          original parameters
 *     @param[out] piv_par_dest        actual parameters, to be modified 
 *                                     during sweeps
 *     @param[out] isiz_last           flag for last interrogation sweep
 *     @return                         void
 */
void
gpiv_piv_isizadapt      		(const GpivPivPar       *piv_par_src,
                         		GpivPivPar             	*piv_par_dest,
                         		gboolean               	*isiz_last
                         		);



/**
 *     Stores deformed image to file system with pre defined name to TMPDIR
 *     and prints message to stdout.
 *
 *     @param[in] image        image containing header and image data frames
 *     @return                 NULL on success or error message on failure
 */
gchar *
gpiv_piv_write_deformed_image  		(GpivImage 		*image
                                	);




/**
 *     Reads fftw wisdoms from file and stores into a (public) string.
 *
 *     @param[in] dir          direction of fft; forward (+1) or inverse (-1)
 *     @return                 void
 */
void
gpiv_fread_fftw_wisdom 			(const gint   		dir
                        		);



/**
 *     Writes fftw wisdoms to a file.
 *
 *     @param[in] dir          direction of fft; forward (+1) or inverse (-1)
 *     @return                 void
 *
 */
void 
gpiv_fwrite_fftw_wisdom        		(const gint     	dir
                                	);


/**
 *      Calculates dx, dy of piv_data_dest from piv_data_src
 *      by bi-linear interpolation of inner points with shifted knots
 *      or extrapolation of outer lying points.
 *
 *      @param[in] piv_data_src         input piv data
 *      @param[out] piv_data_dest       output piv data
 *      @return NULL on success or *err_msg on failure
 */
gchar *
gpiv_piv_dxdy_at_new_grid       	(const GpivPivData      *piv_data_src,
                                 	GpivPivData            	*piv_data_dest
                                 	);



/**
 *     Shifts the knots of a 2-dimensional grid containing PIV data for improved 
 *     (bi-linear) interpolation.
 *
 *     See: T. Blu, P. Thevenaz, "Linear Interpolation Revitalized",
 *     IEEE Trans. in Image Processing, vol13, no 5, May 2004
 *
 *     @param[in] piv_data     piv data that will be shifted in-place
 *     @return                 NULL on success or error message on failure
 */
gchar *
gpiv_piv_shift_grid     		(GpivPivData    	*piv_data
                         		);



/**
 *      Generates grid by Calculating the positions of interrogation areas.
 *
 *      @param[in] nx           number of horizontal grid points
 *      @param[in] ny           number of vertical grid points
 *      @param[in] image_par    structure of image parameters
 *      @param[in] piv_par      structure of piv evaluation parameters
 *      @return                 piv_data or NULL on failure
 */
GpivPivData *
gpiv_piv_gridgen        		(const guint            nx,
                         		const guint            	ny,
                         		const GpivImagePar     	*image_par,
                         		const GpivPivPar       	*piv_par
                         		);



/**
 *     Adjust grid nodes if zero_off or adaptive interrogation 
 *     area has been used. This is performed by modifying int_shift equal 
 *     to int_shift / GPIV_SHIFT_FACTOR, until it reaches (src)
 *     int_shift. Then, grid_last is set TRUE, which will avoid
 *     changing the interrogation shift in next calls and signal the
 *     (while loop in) the calling function.
 *     
 *     @param[in] image_par               image parameters
 *     @param[in] piv_par_src        piv evaluation parameters
 *     @param[in] piv_data                input PIV data
 *     @param[in] sweep                   interrogation sweep step
 *     @param[out] piv_par_dest       modified piv evaluation parameters
 *     @param[out] grid_last               flag if final grid refinement has been 
 *     @return                         piv_data or NULL on failure
 */
GpivPivData *
gpiv_piv_gridadapt      		(const GpivImagePar     *image_par, 
                         		const GpivPivPar       	*piv_par_src,
                         		GpivPivPar             	*piv_par_dest,
                         		const GpivPivData      	*piv_data,
                         		const guint            	sweep, 
                         		gboolean               	*grid_last
                         		);


#endif /* __LIBGPIV_PIV_H__ */