ifw-odp  2.0.0-alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
clipm_testlib_tools.h
Go to the documentation of this file.
1 
2 /*********************************************************************
3  * E.S.O. - VLT project
4  *
5  * "@(#) $Id: clipm_testlib_tools.h 262792 2014-12-10 11:08:28Z cgarcia $"
6  *
7  * Clipm testing tools
8  *
9  * who when what
10  * -------- ---------- ----------------------------------------------
11  * hlorch 2007-06-12 created
12  */
13 
14 #ifndef CLIPM_TESTLIB_TOOLS_H
15 #define CLIPM_TESTLIB_TOOLS_H
16 
17 /*-----------------------------------------------------------------------------
18  Includes
19  -----------------------------------------------------------------------------*/
20 
21 #include <cpl.h>
22 
23 /*-----------------------------------------------------------------------------
24  Declaration Block
25  -----------------------------------------------------------------------------*/
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 /*-----------------------------------------------------------------------------
32  Prototypes
33  -----------------------------------------------------------------------------*/
34 
35 void clipm_testlib_array_dump( const cpl_array *array,
36  const char *name);
37 
39  cpl_size xsize,
40  cpl_size ysize);
41 
43  double xmin,
44  double ymin,
45  double xmax,
46  double ymax,
47  cpl_size homogeneity,
48  cpl_size N,
49  cpl_type type);
50 
52  int xsize,
53  int ysize,
54  cpl_matrix *locations,
55  cpl_type type,
56  double weight,
57  double sigma);
58 
59 cpl_error_code clipm_testlib_image_add_wgn(cpl_image *image,
60  const cpl_size window_xxyy[4],
61  double sigma,
62  double noise_abs_limit);
63 
65  const char *ctype_str);
66 
68  cpl_type type);
69 
71  int *iterator,
72  cpl_type in_types_or,
73  const cpl_size in_window_xxyy[4],
74  const cpl_image *in_image,
75  cpl_type *out_type,
76  cpl_size **out_window_xxyy,
77  cpl_image **out_image,
78  cpl_size *out_ngoodpix);
79 
81  cpl_image *img,
82  const cpl_size window_xxyy[4],
83  const char *pattern_name);
84 
85 cpl_error_code clipm_testlib_image_reject_all(
86  cpl_image *img,
87  const cpl_size window_xxyy[4]);
88 
90  const cpl_image *img,
91  const cpl_size window_xxyy[4]);
92 
94  const cpl_image *img,
95  cpl_size x1,
96  cpl_size y1,
97  cpl_size x2,
98  cpl_size y2);
99 
101  const cpl_image *img,
102  const cpl_matrix *kernel,
103  int extend_bpm);
104 
106  const cpl_image *img,
107  const cpl_size window_xxyy[4],
108  cpl_size ll[2],
109  cpl_size ur[2],
110  cpl_size size[2]);
111 
113  const cpl_image *img,
114  const char *func,
115  const char *identifier,
116  int nr);
117 
118 /*----------------------------------------------------------------------------*/
119 
120 #ifdef __cplusplus
121 } /* extern "C" */
122 #endif
123 
124 #endif /* CLIPM_TESTLIB_TOOLS_H */
void clipm_testlib_array_dump(const cpl_array *array, const char *name)
Dump an array to stdout.
Definition: clipm_testlib_tools.c:50
cpl_image * clipm_testlib_image_create_gaussians(int xsize, int ysize, cpl_matrix *locations, cpl_type type, double weight, double sigma)
Create an image containing a set of equal gaussian peaks.
Definition: clipm_testlib_tools.c:260
cpl_error_code clipm_testlib_image_add_wgn(cpl_image *image, const cpl_size window_xxyy[4], double sigma, double noise_abs_limit)
Add white gaussian noise to an image.
Definition: clipm_testlib_tools.c:353
int clipm_testlib_iterate_types_windows(int *iterator, cpl_type in_types_or, const cpl_size in_window_xxyy[4], const cpl_image *in_image, cpl_type *out_type, cpl_size **out_window_xxyy, cpl_image **out_image, cpl_size *out_ngoodpix)
Definition: clipm_testlib_tools.c:512
const char * clipm_testlib_cpltype_2_literal(cpl_type type)
Get CPL type as string.
Definition: clipm_testlib_tools.c:492
cpl_image * clipm_testlib_image_conv_matrix(const cpl_image *img, const cpl_matrix *kernel, int extend_bpm)
Simple reference convolution implementation.
Definition: clipm_testlib_tools.c:966
cpl_error_code clipm_testlib_image_get_window_details(const cpl_image *img, const cpl_size window_xxyy[4], cpl_size ll[2], cpl_size ur[2], cpl_size size[2])
Return the corners of a window and its size.
Definition: clipm_testlib_tools.c:1096
cpl_size clipm_testlib_image_count_bad(const cpl_image *img, const cpl_size window_xxyy[4])
Count the bad pixels in an image (window).
Definition: clipm_testlib_tools.c:855
cpl_size clipm_testlib_image_count_bad_wdw(const cpl_image *img, cpl_size x1, cpl_size y1, cpl_size x2, cpl_size y2)
Count the bad pixels in an image (window).
Definition: clipm_testlib_tools.c:920
cpl_error_code _clipm_testlib_image_save_if_verbose(const cpl_image *img, const char *func, const char *identifier, int nr)
Write an image to disk and print a message.
Definition: clipm_testlib_tools.c:1151
cpl_image * clipm_testlib_image_create_invalid(cpl_size xsize, cpl_size ysize)
Create an image of type CPL_TYPE_INVALID.
Definition: clipm_testlib_tools.c:107
cpl_error_code clipm_testlib_image_reject_all(cpl_image *img, const cpl_size window_xxyy[4])
Reject all pixels in image (window)
Definition: clipm_testlib_tools.c:796
cpl_type clipm_testlib_ctype_2_cpltype(const char *ctype_str)
Get CPL type from C-type identifier string.
Definition: clipm_testlib_tools.c:453
cpl_error_code clipm_testlib_image_reject_pattern(cpl_image *img, const cpl_size window_xxyy[4], const char *pattern_name)
Reject a pattern of pixels.
Definition: clipm_testlib_tools.c:700
cpl_matrix * clipm_testlib_generate_poisson_points(double xmin, double ymin, double xmax, double ymax, cpl_size homogeneity, cpl_size N, cpl_type type)
Generate a list of N random points stored in a matrix.
Definition: clipm_testlib_tools.c:157