SINFONI Pipeline Reference Manual  2.6.0
sinfo_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  File name : sinfo_resampling.h
22  Author : Nicolas Devillard
23  Created on : Jan 04, 1996
24  Description : resampling routines
25 
26  ---------------------------------------------------------------------------*/
27 
28 /*
29 
30  $Id: sinfo_resampling.h,v 1.4 2007-06-06 07:10:45 amodigli Exp $
31  $Author: amodigli $
32  $Date: 2007-06-06 07:10:45 $
33  $Revision: 1.4 $
34 
35  */
36 
37 #ifndef SINFO_RESAMPLING_H
38 #define SINFO_RESAMPLING_H
39 
40 /*---------------------------------------------------------------------------
41  Includes
42  ---------------------------------------------------------------------------*/
43 
44 #include <cpl.h>
45 #include "sinfo_msg.h"
46 /*---------------------------------------------------------------------------
47  Defines
48  ---------------------------------------------------------------------------*/
49 #define TRANSFO_AFFINE 0
50 #define TRANSFO_DEG2 1
51 #define TRANSFO_HOMOGRAPHIC 2
52 
53 /* Number of pixels set to 0 by the shift resampling */
54 #define SHIFT_REJECT_L 2
55 #define SHIFT_REJECT_R 2
56 #define SHIFT_REJECT_T 2
57 #define SHIFT_REJECT_B 2
58 
59 /*
60  * Kernel definition in terms of sampling
61  */
62 
63 
64 /* Number of tabulations in kernel */
65 #define TABSPERPIX (1000)
66 #define KERNEL_WIDTH (2.0)
67 #define KERNEL_SAMPLES (1+(int)(TABSPERPIX * KERNEL_WIDTH))
68 
69 #define TANH_STEEPNESS (5.0)
70 
71 
72 /*---------------------------------------------------------------------------
73  Function ANSI C prototypes
74  ---------------------------------------------------------------------------*/
75 
100 double *
101 sinfo_generate_interpolation_kernel(const char * kernel_type) ;
102 
103 
115 double
116 sinfo_sinc(double x) ;
117 
155 double *
156 sinfo_invert_linear_transform(double *trans) ;
157 #endif