00001 /* 00002 * This file is part of the ESO SINFONI Pipeline 00003 * Copyright (C) 2004,2005 European Southern Observatory 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA 00018 */ 00019 00020 /*---------------------------------------------------------------------------- 00021 00022 File name : sinfo_resampling.h 00023 Author : Nicolas Devillard 00024 Created on : Jan 04, 1996 00025 Description : resampling routines 00026 00027 ---------------------------------------------------------------------------*/ 00028 00029 /* 00030 00031 $Id: sinfo_new_resampling.h,v 1.9 2007/06/06 07:10:45 amodigli Exp $ 00032 $Author: amodigli $ 00033 $Date: 2007/06/06 07:10:45 $ 00034 $Revision: 1.9 $ 00035 00036 */ 00037 00038 #ifndef SINFO_NEW_RESAMPLING_H 00039 #define SINFO_NEW_RESAMPLING_H 00040 00041 /*--------------------------------------------------------------------------- 00042 Includes 00043 ---------------------------------------------------------------------------*/ 00044 00045 /* 00046 #include "my_image_handling.h" 00047 #include "sinfo_matrix.h" 00048 */ 00049 #include "sinfo_poly2d.h" 00050 #include <cpl.h> 00051 #include "sinfo_msg.h" 00052 00053 00054 /*--------------------------------------------------------------------------- 00055 Defines 00056 ---------------------------------------------------------------------------*/ 00057 00058 00059 #define TRANSFO_AFFINE 0 00060 #define TRANSFO_DEG2 1 00061 #define TRANSFO_HOMOGRAPHIC 2 00062 00063 /* Number of pixels set to 0 by the shift resampling */ 00064 #define SHIFT_REJECT_L 2 00065 #define SHIFT_REJECT_R 2 00066 #define SHIFT_REJECT_T 2 00067 #define SHIFT_REJECT_B 2 00068 00069 /* 00070 * Kernel definition in terms of sampling 00071 */ 00072 00073 00074 /* Number of tabulations in kernel */ 00075 #define TABSPERPIX (1000) 00076 #define KERNEL_WIDTH (2.0) 00077 #define KERNEL_SAMPLES (1+(int)(TABSPERPIX * KERNEL_WIDTH)) 00078 00079 #define TANH_STEEPNESS (5.0) 00080 00081 00082 /*--------------------------------------------------------------------------- 00083 Function ANSI C prototypes 00084 ---------------------------------------------------------------------------*/ 00085 00086 /*-------------------------------------------------------------------------*/ 00110 /*--------------------------------------------------------------------------*/ 00111 00112 00113 double * 00114 sinfo_new_generate_interpolation_kernel(const char * kernel_type) ; 00115 00116 00117 /*-------------------------------------------------------------------------*/ 00153 /*--------------------------------------------------------------------------*/ 00154 00155 00156 cpl_image * 00157 sinfo_new_warp_image_generic( 00158 cpl_image * image_in, 00159 char * kernel_type, 00160 cpl_polynomial * poly_u, 00161 cpl_polynomial * poly_v 00162 ) ; 00163 00164 00165 /*-------------------------------------------------------------------------*/ 00186 /*--------------------------------------------------------------------------*/ 00187 00188 double * sinfo_new_generate_tanh_kernel(double steep) ; 00189 00190 00191 /*-------------------------------------------------------------------------*/ 00204 /*--------------------------------------------------------------------------*/ 00205 00206 void sinfo_new_show_interpolation_kernel(char * kernel_name) ; 00207 00208 00209 #endif