This file is indexed.

/usr/include/gpiv/gpiv-img.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
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
/* -*- 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:
EXTERNAL FUNCTIONS:
                         gpiv_img_parameters_set
                         gpiv_img_get_parameters

                         gpiv_img_read_header
			 gpiv_img_check_header_read
			 gpiv_img_check_header_required_read
			 gpiv_img_check_header_scale_read
			 gpiv_img_test_header
			 gpiv_img_print_header
			 gpiv_img_fprint_header
			 gpiv_img_print_parameters
			 gpiv_img_fprint_parameters
                         gpiv_img_cp_parameters
                         gpiv_img_ovwrt_parameters
			 gpiv_img_fread_hdf5_parameters
			 gpiv_img_fwrite_hdf5_parameters
                         gpiv_img_fread_davis_parameters
			 
-----------------------------------------------------------------------------*/

/*!
\file                    gpiv-img.h
\brief                   module for image header en parameters

SOURCE:                  lib/img.c

LAST MODIFICATION DATE:  $Id: gpiv-img.h,v 1.3 2008-09-25 13:19:53 gerber Exp $
 */

#ifndef __LIBGPIV_IMG_H__
#define __LIBGPIV_IMG_H__



#define GPIV_IMGPAR_DEFAULT__DEPTH     8	/**< Default parameter for depth of __GpivImagePar */
#define GPIV_IMGPAR_DEFAULT__NCOLUMNS  256	/**< Default parameter for ncolumns of __GpivImagePar */
#define GPIV_IMGPAR_DEFAULT__NROWS     256	/**< Default parameter for nrows of __GpivImagePar */
#define GPIV_IMGPAR_DEFAULT__X_CORR    1	/**< Default parameter for x_corr of __GpivImagePar */
#define GPIV_IMGPAR_DEFAULT__S_SCALE   1.0	/**< Default parameter for s_scale of __GpivImagePar */
#define GPIV_IMGPAR_DEFAULT__T_SCALE   1.0	/**< Default parameter for t_scale of __GpivImagePar */
#define GPIV_IMGPAR_DEFAULT__Z_OFF_X   0.0	/**< Default parameter for z_off_x of __GpivImagePar */
#define GPIV_IMGPAR_DEFAULT__Z_OFF_Y   0.0	/**< Default parameter for z_off_y of __GpivImagePar */

#define GPIV_IMGPAR_DEFAULT__TITLE     ""	/**< Default parameter for title of __GpivImagePar */
#define GPIV_IMGPAR_DEFAULT__CREATION_DATE ""	/**< Default parameter for creation_date of __GpivImagePar */
#define GPIV_IMGPAR_DEFAULT__LOCATION  ""  	/**< Default parameter for location of __GpivImagePar */
#define GPIV_IMGPAR_DEFAULT__AUTHOR    ""	/**< Default parameter for author of __GpivImagePar */
#define GPIV_IMGPAR_DEFAULT__SOFTWARE  "gpiv / gpiv_rr"	     /**< Default parameter for software of __GpivImagePar */
#define GPIV_IMGPAR_DEFAULT__SOURCE    ""	/**< Default parameter for source of __GpivImagePar */
#define GPIV_IMGPAR_DEFAULT__USERTEXT  ""	/**< Default parameter for usertext of __GpivImagePar */
#define GPIV_IMGPAR_DEFAULT__WARNING   ""	/**< Default parameter for warning of __GpivImagePar */
#define GPIV_IMGPAR_DEFAULT__DISCLAIMER "See The GNU General Public License (GPL)"      /**< Default parameter for disclaimer of __GpivImagePar */
#define GPIV_IMGPAR_DEFAULT__COMMENT   ""	/**< Default parameter for comment of __GpivImagePar */
#define GPIV_IMGPAR_DEFAULT__COPYRIGHT ""	/**< Default parameter for copyright of __GpivImagePar */
#define GPIV_IMGPAR_DEFAULT__EMAIL     ""	/**< Default parameter for email of __GpivImagePar */
#define GPIV_IMGPAR_DEFAULT__URL       ""	/**< Default parameter for url of __GpivImagePar */


#define GPIV_IMGPAR_KEY                "IMG"		/**< Key of image parameters */
#define GPIV_IMGPAR_KEY__DEPTH         "depth"          /**< Key for depth of __GpivImagePar */
#define GPIV_IMGPAR_KEY__NCOLUMNS      "ncolumns"       /**< Key for ncolumns of __GpivImagePar */
#define GPIV_IMGPAR_KEY__NROWS         "nrows"          /**< Key for nrows of __GpivImagePar */
#define GPIV_IMGPAR_KEY__X_CORR        "x_corr"         /**< Key for x_corr of __GpivImagePar */
#define GPIV_IMGPAR_KEY__S_SCALE       "s_scale"        /**< Key for s_scale of __GpivImagePar */
#define GPIV_IMGPAR_KEY__T_SCALE       "t_scale"        /**< Key for t_scale of __GpivImagePar */
#define GPIV_IMGPAR_KEY__Z_OFF_X       "zoff_x"         /**< Key for z_off_x of __GpivImagePar */
#define GPIV_IMGPAR_KEY__Z_OFF_Y       "zoff_y"         /**< Key for z_off_y of __GpivImagePar */

#define GPIV_IMGPAR_KEY__TITLE         "title"          /**< Key for title of __GpivImagePar */
#define GPIV_IMGPAR_KEY__CREATION_DATE "creation_date"  /**< Key for creation_date of __GpivImagePar */
#define GPIV_IMGPAR_KEY__LOCATION      "location"       /**< Key for location of __GpivImagePar */
#define GPIV_IMGPAR_KEY__AUTHOR        "author"         /**< Key for author of __GpivImagePar */
#define GPIV_IMGPAR_KEY__SOFTWARE      "software"       /**< Key for software of __GpivImagePar */
#define GPIV_IMGPAR_KEY__SOURCE        "source"         /**< Key for source of __GpivImagePar */
#define GPIV_IMGPAR_KEY__USERTEXT      "usertext"       /**< Key for usertext of __GpivImagePar */
#define GPIV_IMGPAR_KEY__WARNING       "warning"        /**< Key for warning of __GpivImagePar */
#define GPIV_IMGPAR_KEY__DISCLAIMER    "disclaimer"     /**< Key for disclaimer of __GpivImagePar */
#define GPIV_IMGPAR_KEY__COMMENT       "comment"        /**< Key for comment of __GpivImagePar */
#define GPIV_IMGPAR_KEY__COPYRIGHT     "copyright"      /**< Key for copyright of __GpivImagePar */
#define GPIV_IMGPAR_KEY__EMAIL         "email"          /**< Key for email of __GpivImagePar */
#define GPIV_IMGPAR_KEY__URL           "url"            /**< Key for url of __GpivImagePar */

typedef struct __GpivImagePar GpivImagePar;

/*!
 * \brief Image parameters or header info
 *
 * Some of these parameters are required to be resident in the image header. 
 * Else, they might be loaded from the configuration resources, 
 * with gpiv_scan_resourcefiles() or with gpiv_scan_parameter().
 */
struct __GpivImagePar {
    guint depth;                        /**< Image color depth */
    gboolean depth__set;                /**< flag if depth has been defined */

    guint ncolumns;                     /**< Number of image columns */
    gboolean ncolumns__set;             /**< flag if ncolumns has been defined */

    guint nrows;                        /**< Number of image rows */
    gboolean nrows__set;                /**< flag if nrows has been defined */

    gboolean x_corr;                    /**< cross-correlation image pair */
    gboolean x_corr__set;               /**< flag if x_corr has been defined */

    gfloat s_scale;                     /**< spatial scale, used by gpiv_post_scale() */
    gboolean s_scale__set;              /**< flag if s_scale has been defined */

    gfloat t_scale;                     /**< time-scale, used by gpiv_post_scale() */
    gboolean t_scale__set;              /**< flag if t_scale has been defined */

    gfloat z_off_x;                     /**< zero offset in x (column) direction, used by gpiv_post_scale() */
    gboolean z_off_x__set;              /**< flag if z_off_x has been defined */

    gfloat z_off_y;                     /**< zero offset in y (row) direction, used by gpiv_post_scale() */
    gboolean z_off_y__set;              /**< flag if z_off_y has been defined */

    gchar title[GPIV_MAX_CHARS];        /**< Project name */
    gboolean title__set;                /**< flag if title has been defined */

    gchar creation_date[GPIV_MAX_CHARS];/**< Date of origin */
    gboolean creation_date__set;        /**< flag if creation_date has been defined */

    gchar location[GPIV_MAX_CHARS];     /**< Location of origin */
    gboolean location__set;             /**< flag if location has been defined */

    gchar author[GPIV_MAX_CHARS];       /**< Author name */
    gboolean author__set;               /**< flag if author has been defined */

    gchar software[GPIV_MAX_CHARS];     /**< Program that generated the image */
    gboolean software__set;             /**< flag if software has been defined */

    gchar source[GPIV_MAX_CHARS];       /**< Camera name and type */
    gboolean source__set;               /**< flag if source has been defined */

    gchar usertext[GPIV_MAX_CHARS];     /**< User comment */
    gboolean usertext__set;             /**< flag if usertext has been defined */

    gchar warning[GPIV_MAX_CHARS];      /**< Warning message */
    gboolean warning__set;              /**< flag if warning has been defined */

    gchar disclaimer[GPIV_MAX_CHARS];   /**< Disclaimer or licence text */
    gboolean disclaimer__set;           /**< flag if disclaimer has been defined */

    gchar comment[GPIV_MAX_CHARS];      /**< Comment from other image formats */
    gboolean comment__set;              /**< flag if comment has been defined */

    gchar copyright[GPIV_MAX_CHARS];    /**< Copyright text */
    gboolean copyright__set;            /**< flag if copyright has been defined */

    gchar email[GPIV_MAX_CHARS];        /**< E-mail author */
    gboolean email__set;                /**< flag if email has been defined */

    gchar url[GPIV_MAX_CHARS];          /**< URL of program, author, image and/or data */
    gboolean url__set;                  /**< flag if url has been defined */
};


typedef struct __GpivImage GpivImage;
/*!
 * \brief Piv image header and data
 *
 * Two image frames have been included for double-framed PIV image pairs.
 */
struct __GpivImage {
    GpivImagePar *header;              /**< Image header */ 
    guint16 **frame1;                  /**< First image of a double-frame image pair */
    guint16 **frame2;                  /**< Second image of a double-frame image pair */
};


/*
 * Function prototypes
 */

/**
 *      Sets flag for image_par__set
 *
 *      @param[in] flag         flag to enforce parameters set to defaults
 *      @param[out] image_par   image parameters
 *      @return                 void
 */
void
gpiv_img_parameters_set (GpivImagePar   *image_par,
                         const gboolean flag
                         );



/**
 *      Reads image parameters from localrc, $HOME/.gpivrc and system-wide 
 *      gpiv.conf 
 *
 *      @param[in] localrc      resource filename containing parameter at 
 *                              current directory
 *      @param[in] verbose      prints parameter values when read
 *      @return                 GpivImagePar or NULL on failure
 */
GpivImagePar *
gpiv_img_get_parameters_from_resources  (const gchar		*localrc,
                                         const gboolean		verbose
                                         );


/**
 *      Sets default parameter values
 *
 *      @param[in] force        flag to enforce parameters set to defaults
 *      @param[out] image_par   image parameters
 *      @return                 void
 */
void
gpiv_img_default_parameters		(GpivImagePar		*image_par,
					const gboolean		force
					);



/**
 *      Reads each line of file fp and looks for image header parameters 
 *
 *      @param[in] fp                    file pointer to header or paremeter file.
 *                                       If NULL, stdin will be used.
 *      @param[in] fp_par_out            file pointer of which parameter will have to be printed
 *                                       or NULL for stdout
 *      @param[in] verbose               flag to print parameters to fp_par_out (TRUE) or not (FALSE)
 *      @param[in] include_key           flag if module key is included
 *      @param[out] image_par            image header parameters
 *      @return                          void
 */
void
gpiv_img_read_header			(FILE			*fp,
					GpivImagePar		*image_par,
					const gboolean		include_key,
					const gboolean		verbose,
					FILE			*fp_par_out
					);



/**
 *      Checks out if all image header info has been read
 *
 *      @param[in] image_par     image parameters
 *      @return                  NULL on success or error message on failure
 */
gchar *
gpiv_img_check_header_read		(const GpivImagePar     *image_par
					);



/**
 *      Checks out if the required image header info for reading/storing
 *      has been read
 *
 *      @param[in] image_par    image parameters
 *      @return                 NULL on success or error message on failure
 *
 */
gchar *
gpiv_img_check_header_required_read     (const GpivImagePar     *image_par
					);



/**
 *      Checks out if image header info for time/spatial scaling has been read
 *
 *      @param[in] image_par    image parameters
 *      @return                 NULL on success or error message on failure
 */
gchar *
gpiv_img_check_header_scale_read        (const GpivImagePar     *image_par
					);


/**
 *      Checks out if all header parameters have been read
 *
 *      @param[in] image_par    image parameters
 *      @return                 NULL on success or error message on failure
 */
gchar *
gpiv_img_test_header			(const GpivImagePar	*image_par
					);


/**
 *      Prints header information to file fp. Identic to 
 *      gpiv_img_print_parameters(), but without GPIV_IMGPAR_KEY
 *
 *      @param[in] fp           file pointer. If NULL, stdout will be used
 *      @param[in] image_par    image parameters
 *      @return                 void
 */
void 
gpiv_img_print_header			(FILE			*fp,
					const GpivImagePar	*image_par
					);


/**
 *      Prints image header parameters to file. Identic to 
 *      gpiv_img_fprint_parameters(), but without GPIV_IMGPAR_KEY
 *
 *      @param[in] fname        header filename
 *      @param[in] image_par    image parameters
 *      @return                 void
 */
void 
gpiv_img_fprint_header			(const gchar		*fname,
					const GpivImagePar	*image_par
					);


/**
 *      Generate a new copy of image parameters from image_par if 
 *      image_par_dest have not been set
 *
 *      @param[in] image_par    source image parameters to be copied
 *      @return                 GpivImagePar
 */
GpivImagePar *
gpiv_img_cp_parameters			(const GpivImagePar	*image_par
					);


/**
 *      Overwrites image parameters from image_par_src to image_par_dest
 *
 *      @param[in] image_par_src        source image parameters to be copied
 *      @param[in] image_par_dest       the copied image parameters
 *      @return                         void
 */
void
gpiv_img_ovwrt_parameters		(const GpivImagePar	*image_par_src,
					GpivImagePar		*image_par_dest
					);


/**
 *      Prints image header or parameters to fp. Idententic to
 *      gpiv_img_print_header(), but includes IMAGE_PAR_KEY
 *
 *      @param[in] fp           file pointer. If NULL, stdout will be used
 *      @param[in] image_par    image parameters
 *      @return                 void
 */
void
gpiv_img_print_parameters		(FILE                   *fp, 
					const GpivImagePar	*image_par
					);


/**
 *      Prints image header or parameters to file. Idententic to
 *      gpiv_img_fprint_header(), but includes IMAGE_PAR_KEY
 *
 *      @param[in] fname        header filename
 *      @param[in] image_par    image parameters
 *      @return                 void
 */
void 
gpiv_img_fprint_parameters		(const gchar            *fname,
					const GpivImagePar	*image_par
					);


/**
 *      Reads image parameters from hdf5 data file without IMAGE_PAR_KEY
 *
 *      @param[in] fname        filename
 *      @return                 GpivImagePar or NULL on failure
 */
GpivImagePar *
gpiv_img_fread_hdf5_parameters		(const gchar		*fname
					);


/**
 *      Writes image parameters to an existing hdf5 data file
 *
 *      @param[in] fname        filename
 *      @param[in] image_par    image parameters
 *      @return                 NULL on success or error message on failure
 */
gchar *
gpiv_img_fwrite_hdf5_parameters		(const gchar            *fname,
					const GpivImagePar	*image_par
					);



/**
 *      Reads image specifications from Davis formatted image, with ext .IMG, 
 *      from file
 *
 *      @param[in] fname        filename
 *      @param[out] image_par   image parameters
 *      @return                 NULL on success or error message on failure
 */
gchar *
gpiv_img_fread_davis_parameters		(const gchar		*fname,
					GpivImagePar		*image_par
					);

#ifdef ENABLE_MPI
/**
 *      Broadcasts only required parameters of GpivImagePar for MPI
 *
 *      @param[in] image_par   image parameters
 */
void
gpiv_img_mpi_bcast_imgpar		(GpivImagePar		*image_par
					);

#endif /* ENABLE_MPI */
#endif /* __LIBGPIV_IMG_H__ */