CR2RE Pipeline Reference Manual 1.6.8
hdrl_elemop.h
1/* $Id: hdrl_elemop.h,v 1.4 2013-10-17 15:44:14 jtaylor Exp $
2 *
3 * This file is part of the HDRL
4 * Copyright (C) 2013 European Southern Observatory
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21/*
22 * $Author: jtaylor $
23 * $Date: 2013-10-17 15:44:14 $
24 * $Revision: 1.4 $
25 */
26
27#ifndef HDRL_ELEMOP_H
28#define HDRL_ELEMOP_H
29
30#ifndef HDRL_USE_PRIVATE
31#error This file is not allowed to be included outside of hdrl
32#endif
33
34/*-----------------------------------------------------------------------------
35 Includes
36 -----------------------------------------------------------------------------*/
37
38#include "hdrl_types.h"
39#include <cpl.h>
40
41CPL_BEGIN_DECLS
42
43/*-----------------------------------------------------------------------------
44 Define
45 -----------------------------------------------------------------------------*/
46
47
48/*-----------------------------------------------------------------------------
49 Functions prototypes
50 -----------------------------------------------------------------------------*/
51
52/* ---------------------------------------------------------------------------*/
65/* ---------------------------------------------------------------------------*/
66cpl_error_code
67hdrl_elemop_image_add_image(cpl_image * a, cpl_image * ae,
68 const cpl_image * b, const cpl_image * be);
69cpl_error_code
70hdrl_elemop_image_sub_image(cpl_image * a, cpl_image * ae,
71 const cpl_image * b, const cpl_image * be);
72cpl_error_code
73hdrl_elemop_image_mul_image(cpl_image * a, cpl_image * ae,
74 const cpl_image * b, const cpl_image * be);
75cpl_error_code
76hdrl_elemop_image_div_image(cpl_image * a, cpl_image * ae,
77 const cpl_image * b, const cpl_image * be);
78cpl_error_code
79hdrl_elemop_image_pow_image(cpl_image * a, cpl_image * ae,
80 const cpl_image * b, const cpl_image * be);
81
82/* ---------------------------------------------------------------------------*/
95/* ---------------------------------------------------------------------------*/
96cpl_error_code
97hdrl_elemop_image_add_scalar(cpl_image * a, cpl_image * ae,
98 const hdrl_data_t b, const hdrl_error_t be);
99cpl_error_code
100hdrl_elemop_image_sub_scalar(cpl_image * a, cpl_image * ae,
101 const hdrl_data_t b, const hdrl_error_t be);
102cpl_error_code
103hdrl_elemop_image_mul_scalar(cpl_image * a, cpl_image * ae,
104 const hdrl_data_t b, const hdrl_error_t be);
105cpl_error_code
106hdrl_elemop_image_div_scalar(cpl_image * a, cpl_image * ae,
107 const hdrl_data_t b, const hdrl_error_t be);
108cpl_error_code
109hdrl_elemop_image_pow_scalar(cpl_image * a, cpl_image * ae,
110 const hdrl_data_t b, const hdrl_error_t be);
111cpl_error_code
112hdrl_elemop_image_exp_scalar(cpl_image * a, cpl_image * ae,
113 const hdrl_data_t b, const hdrl_error_t be);
114/* ---------------------------------------------------------------------------*/
128/* ---------------------------------------------------------------------------*/
129cpl_error_code
130hdrl_elemop_imagelist_add_imagelist(cpl_imagelist * a, cpl_imagelist * ae,
131 const cpl_imagelist * b, const cpl_imagelist * be);
132cpl_error_code
133hdrl_elemop_imagelist_sub_imagelist(cpl_imagelist * a, cpl_imagelist * ae,
134 const cpl_imagelist * b, const cpl_imagelist * be);
135cpl_error_code
136hdrl_elemop_imagelist_mul_imagelist(cpl_imagelist * a, cpl_imagelist * ae,
137 const cpl_imagelist * b, const cpl_imagelist * be);
138cpl_error_code
139hdrl_elemop_imagelist_div_imagelist(cpl_imagelist * a, cpl_imagelist * ae,
140 const cpl_imagelist * b, const cpl_imagelist * be);
141cpl_error_code
142hdrl_elemop_imagelist_pow_imagelist(cpl_imagelist * a, cpl_imagelist * ae,
143 const cpl_imagelist * b, const cpl_imagelist * be);
144
145/* ---------------------------------------------------------------------------*/
159/* ---------------------------------------------------------------------------*/
160cpl_error_code
161hdrl_elemop_imagelist_add_vector(cpl_imagelist * a, cpl_imagelist * ae,
162 const cpl_vector * b, const cpl_vector * be);
163cpl_error_code
164hdrl_elemop_imagelist_sub_vector(cpl_imagelist * a, cpl_imagelist * ae,
165 const cpl_vector * b, const cpl_vector * be);
166cpl_error_code
167hdrl_elemop_imagelist_mul_vector(cpl_imagelist * a, cpl_imagelist * ae,
168 const cpl_vector * b, const cpl_vector * be);
169cpl_error_code
170hdrl_elemop_imagelist_div_vector(cpl_imagelist * a, cpl_imagelist * ae,
171 const cpl_vector * b, const cpl_vector * be);
172cpl_error_code
173hdrl_elemop_imagelist_pow_vector(cpl_imagelist * a, cpl_imagelist * ae,
174 const cpl_vector * b, const cpl_vector * be);
175
176/* ---------------------------------------------------------------------------*/
190/* ---------------------------------------------------------------------------*/
191cpl_error_code
192hdrl_elemop_imagelist_add_image(cpl_imagelist * a, cpl_imagelist * ae,
193 const cpl_image * b, const cpl_image * be);
194cpl_error_code
195hdrl_elemop_imagelist_sub_image(cpl_imagelist * a, cpl_imagelist * ae,
196 const cpl_image * b, const cpl_image * be);
197cpl_error_code
198hdrl_elemop_imagelist_mul_image(cpl_imagelist * a, cpl_imagelist * ae,
199 const cpl_image * b, const cpl_image * be);
200cpl_error_code
201hdrl_elemop_imagelist_div_image(cpl_imagelist * a, cpl_imagelist * ae,
202 const cpl_image * b, const cpl_image * be);
203cpl_error_code
204hdrl_elemop_imagelist_pow_image(cpl_imagelist * a, cpl_imagelist * ae,
205 const cpl_image * b, const cpl_image * be);
206
207/* see hdrl_elemop.c for doc strings */
208cpl_error_code hdrl_elemop_add(hdrl_data_t * a, hdrl_error_t * ea, size_t na,
209 const hdrl_data_t * b, const hdrl_error_t * eb, size_t nb,
210 const cpl_binary * mask);
211cpl_error_code hdrl_elemop_sub(hdrl_data_t * a, hdrl_error_t * ea, size_t na,
212 const hdrl_data_t * b, const hdrl_error_t * eb, size_t nb,
213 const cpl_binary * mask);
214cpl_error_code hdrl_elemop_mul(hdrl_data_t * a, hdrl_error_t * ea, size_t na,
215 const hdrl_data_t * b, const hdrl_error_t * eb, size_t nb,
216 const cpl_binary * mask);
217cpl_error_code hdrl_elemop_div(hdrl_data_t * a, hdrl_error_t * ea, size_t na,
218 const hdrl_data_t * b, const hdrl_error_t * eb, size_t nb,
219 const cpl_binary * mask);
220cpl_error_code hdrl_elemop_pow(hdrl_data_t * a, hdrl_error_t * ea, size_t na,
221 const hdrl_data_t * b, const hdrl_error_t * eb, size_t nb,
222 const cpl_binary * mask);
223cpl_error_code hdrl_elemop_pow_inverted(
224 hdrl_data_t * a, hdrl_error_t * ea, size_t na,
225 const hdrl_data_t * b, const hdrl_error_t * eb, size_t nb,
226 const cpl_binary * mask);
227
228/*-----------------------------------------------------------------------------
229 Private declarations - must not be used outside of hdrl
230 -----------------------------------------------------------------------------*/
231
232#ifdef HDRL_USE_PRIVATE
233
234#endif
235
236CPL_END_DECLS
237
238#endif