SINFONI Pipeline Reference Manual  2.5.2
sinfo_new_resampling.h
1 /*
2  * This file is part of the ESO SINFONI Pipeline
3  * Copyright (C) 2004,2005 European Southern Observatory
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
18  */
19 
20 /*----------------------------------------------------------------------------
21 
22  File name : sinfo_resampling.h
23  Author : Nicolas Devillard
24  Created on : Jan 04, 1996
25  Description : resampling routines
26 
27  ---------------------------------------------------------------------------*/
28 
29 /*
30 
31  $Id: sinfo_new_resampling.h,v 1.9 2007-06-06 07:10:45 amodigli Exp $
32  $Author: amodigli $
33  $Date: 2007-06-06 07:10:45 $
34  $Revision: 1.9 $
35 
36  */
37 
38 #ifndef SINFO_NEW_RESAMPLING_H
39 #define SINFO_NEW_RESAMPLING_H
40 
41 /*---------------------------------------------------------------------------
42  Includes
43  ---------------------------------------------------------------------------*/
44 
45 /*
46 #include "my_image_handling.h"
47 #include "sinfo_matrix.h"
48 */
49 #include "sinfo_poly2d.h"
50 #include <cpl.h>
51 #include "sinfo_msg.h"
52 
53 
54 /*---------------------------------------------------------------------------
55  Defines
56  ---------------------------------------------------------------------------*/
57 
58 
59 #define TRANSFO_AFFINE 0
60 #define TRANSFO_DEG2 1
61 #define TRANSFO_HOMOGRAPHIC 2
62 
63 /* Number of pixels set to 0 by the shift resampling */
64 #define SHIFT_REJECT_L 2
65 #define SHIFT_REJECT_R 2
66 #define SHIFT_REJECT_T 2
67 #define SHIFT_REJECT_B 2
68 
69 /*
70  * Kernel definition in terms of sampling
71  */
72 
73 
74 /* Number of tabulations in kernel */
75 #define TABSPERPIX (1000)
76 #define KERNEL_WIDTH (2.0)
77 #define KERNEL_SAMPLES (1+(int)(TABSPERPIX * KERNEL_WIDTH))
78 
79 #define TANH_STEEPNESS (5.0)
80 
81 
82 /*---------------------------------------------------------------------------
83  Function ANSI C prototypes
84  ---------------------------------------------------------------------------*/
85 
86 /*-------------------------------------------------------------------------*/
110 /*--------------------------------------------------------------------------*/
111 
112 
113 double *
114 sinfo_new_generate_interpolation_kernel(const char * kernel_type) ;
115 
116 
117 /*-------------------------------------------------------------------------*/
153 /*--------------------------------------------------------------------------*/
154 
155 
156 cpl_image *
157 sinfo_new_warp_image_generic(
158  cpl_image * image_in,
159  char * kernel_type,
160  cpl_polynomial * poly_u,
161  cpl_polynomial * poly_v
162 ) ;
163 
164 
165 /*-------------------------------------------------------------------------*/
186 /*--------------------------------------------------------------------------*/
187 
188 double * sinfo_new_generate_tanh_kernel(double steep) ;
189 
190 
191 /*-------------------------------------------------------------------------*/
204 /*--------------------------------------------------------------------------*/
205 
206 void sinfo_new_show_interpolation_kernel(char * kernel_name) ;
207 
208 
209 #endif