sinfo_new_bezier.h

00001 #ifndef SINFO_NEW_BEZIER_H
00002 #define SINFO_NEW_BEZIER_H
00003 /*
00004  * This file is part of the ESO SINFONI Pipeline
00005  * Copyright (C) 2004,2005 European Southern Observatory
00006  *
00007  * This program is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation; either version 2 of the License, or
00010  * (at your option) any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, 51 Franklin St, Fifth Floor, Boston, MA  02111-1307  USA
00020  */
00021 /*************************************************************************
00022 * E.S.O. - VLT project
00023 *
00024 * "@(#) $Id: sinfo_new_bezier.h,v 1.12 2007/06/06 07:10:45 amodigli Exp $"
00025 *
00026 * who       when      what
00027 * --------  --------  ----------------------------------------------
00028 * schreib  10/10/03  created
00029 */
00030 
00031 /************************************************************************
00032  * bezier.h
00033  * bad pixel interpolation routines using bezier splines
00034  *----------------------------------------------------------------------
00035  */
00036 
00037 /*
00038  * header files
00039  */
00040 
00041 #include <cpl.h>
00042 #include "sinfo_spectrum_ops.h"
00043 #include "sinfo_msg.h"
00044 #include "sinfo_image_ops.h"
00045 /*----------------------------------------------------------------------------
00046  *                        Function ANSI C prototypes
00047  *--------------------------------------------------------------------------*/
00048 #define cubeNONEIGHBOR  -1000000 
00049 /* define new number that indicates that not enough neighors 
00050    are available for sinfo_Bezier correction */
00051 #define cubePT_BADPIXEL   0 /*Bad pixel*/
00052 #define cubePT_USE        1 /*Good pixel*/
00053 #define cubePT_FIND       2 /*Correct that pixel*/
00054 #define cubePT_NOINFO     3 
00055 
00056 typedef struct new_dim_ {
00057   unsigned short x;
00058   unsigned short y;
00059   unsigned short z;
00060 } new_Dim;
00061 
00062 typedef struct new_xyzw_ {
00063   double x;
00064   double y;
00065   double z;
00066   double w;
00067 } new_XYZW;
00068 
00069 typedef struct new_lookup_ {
00070     cpl_image *X;
00071     cpl_image *hX;
00072     cpl_image *Y;
00073     cpl_image *Z;
00074     cpl_imagelist  *id;
00075     cpl_imagelist  *jd;
00076 } new_Lookup;
00077 
00078 
00079 int sinfo_im_xy(cpl_image* im, int X, int Y); 
00080 int sinfo_im_xyz(cpl_image* im, int X, int Y, int Z); 
00081 int sinfo_cu_xy(cpl_imagelist* cu, int X, int Y); 
00082 int sinfo_cu_xyz(cpl_imagelist* cu, int X, int Y, int Z); 
00083 
00084 /*----------------------------------------------------------------------------
00085  *                        Function ANSI C prototypes
00086  *--------------------------------------------------------------------------*/
00087 
00088 cpl_image * 
00089 sinfo_new_c_bezier_interpolate_image(cpl_image *im, 
00090                                           cpl_image *mask, 
00091                                           new_Lookup *look, 
00092                                           short rx, 
00093                                           short ry, 
00094                                           short rz,
00095                           int max_rad , 
00096                                           float   ** slit_edges );
00097 
00098 cpl_image * 
00099 sinfo_new_c_bezier_find_bad(cpl_image *im, 
00100                                  cpl_image *mask/*, sinfo_new_lookup *look*/, 
00101                                  short rx, 
00102                                  short ry, 
00103                                  short rz,
00104                      short lowerI, 
00105                                  short highI, 
00106                                  short lowerJ, 
00107                                  short highJ, 
00108                                  float factor );
00109 
00110 
00111 float      
00112 sinfo_new_c_bezier_correct_pixel(int ipos, 
00113                                      int jpos, 
00114                      cpl_image *im, 
00115                      cpl_image *mask, 
00116                      cpl_imagelist  *sc_im, 
00117                      cpl_imagelist  *drs_sc_mask, 
00118                      new_Lookup *look, 
00119                                      short rx, 
00120                                      short ry, 
00121                                      short rz  );
00122 
00123 
00124 float      
00125 sinfo_new_c_bezier_correct_pixel_2D( int ipos ,
00126                                         int jpos, 
00127                         cpl_image *im, 
00128                         cpl_image *mask, 
00129                         cpl_imagelist  *sc_im, 
00130                         cpl_imagelist  *drs_sc_mask, 
00131                         /*new_Lookup *look,*/ 
00132                                         short rx, 
00133                                         short ry, 
00134                                         short rz , 
00135                                         double *med, 
00136                                         double *stdev, 
00137                                         float factor );
00138 
00139 float sinfo_new_c_bezier_interpol(cpl_imagelist * im, cpl_imagelist * action );
00140 
00141 int sinfo_new_bezier(new_XYZW *p,int n,double mu,double munk,new_XYZW *res );
00142 
00143 float      
00144 sinfo_new_c_bezier_correct_cosmic( int ipos ,
00145                                        int jpos,
00146                                        cpl_image *im,
00147                                        cpl_image *mask,
00148                                        cpl_imagelist  *sc_im,
00149                                        cpl_imagelist  *drs_sc_mask,
00150                                        new_Lookup *look, 
00151                                        short rx, 
00152                                        short ry, 
00153                                        short rz , 
00154                                        double *med, 
00155                                        double *stdev, 
00156                                        float factor );
00157 
00158 
00159 cpl_image * 
00160 sinfo_new_c_bezier_find_cosmic(cpl_image *im, 
00161                                     cpl_image *mask, 
00162                                     new_Lookup *look, 
00163                                     short rx, 
00164                                     short ry, 
00165                                     short rz,
00166                                     short lowerI, 
00167                                     short highI, 
00168                                     short lowerJ, 
00169                                     short highJ, 
00170                                     float factor );
00171 
00172 
00173 int sinfo_new_c_create_XYZ( new_Lookup *l );
00174 
00175 new_Lookup * sinfo_new_lookup( void ) ;
00176 
00177 void sinfo_new_destroy_lookup( new_Lookup *l ) ;
00178 
00179 int sinfo_new_change_mask(cpl_image * mask,cpl_image * im ) ;
00180 
00181 
00182 #endif 
00184 /*--------------------------------------------------------------------------*/

Generated on 3 Mar 2013 for SINFONI Pipeline Reference Manual by  doxygen 1.6.1