bezier.h

00001 #ifndef BEZIER_H
00002 #define BEZIER_H
00003 /*******************************************************************************
00004 * E.S.O. - VLT project
00005 *
00006 * "@(#) $Id: bezier.h,v 1.7 2005/04/19 11:42:24 amodigli Exp $"
00007 *
00008 * who       when      what
00009 * --------  --------  ----------------------------------------------
00010 * schreib  10/10/03  created
00011 */
00012 
00013 /************************************************************************
00014  * bezier.h
00015  * bad pixel interpolation routines using bezier splines
00016  *----------------------------------------------------------------------
00017  */
00018 
00019 /*
00020  * header files
00021  */
00022 
00023 /*
00024 #include <stdio.h>
00025 #include <cpl.h>
00026 */
00027 
00028 /* #include "eclipse.h" */
00029 /* #include "recipes.h" */
00030 /* #include <math.h> */
00031 #include <qfits.h>
00032 #include "spectrum_ops.h"
00033 /*#include <values.h>*/
00034 
00035 /*----------------------------------------------------------------------------
00036  *                      Function ANSI C prototypes
00037  *--------------------------------------------------------------------------*/
00038 #define cubeNONEIGHBOR  -1000000 
00039 /* define new number that indicates that not enough neighors are available for Bezier correction */
00040 #define cubePT_BADPIXEL   0 /*Bad pixel*/
00041 #define cubePT_USE        1 /*Good pixel*/
00042 #define cubePT_FIND       2 /*Correct that pixel*/
00043 #define cubePT_NOINFO     3 
00044 
00045 typedef struct dim_ {
00046   unsigned short x;
00047   unsigned short y;
00048   unsigned short z;
00049 } Dim;
00050 
00051 typedef struct xyzw_ {
00052   double x;
00053   double y;
00054   double z;
00055   double w;
00056 } XYZW;
00057 
00058 /*<python>*/
00059 typedef struct lookup_ {
00060     OneImage *X;
00061     OneImage *hX;
00062     OneImage *Y;
00063     OneImage *Z;
00064     OneCube  *id;
00065     OneCube  *jd;
00066 } Lookup;
00067 /*</python>*/
00068 
00069 
00070 #define i2(im,X,Y)     X+Y*im->lx
00071 #define i3(im,X,Y,Z)   X+Y*im->lx+Z*im->lx*im->ly
00072 
00073 /*----------------------------------------------------------------------------
00074  *                      Function ANSI C prototypes
00075  *--------------------------------------------------------------------------*/
00076 
00077 /*<python>*/
00078 OneImage * cbezierInterpolateImage( OneImage *im, OneImage *mask, Lookup *look, short rx, short ry, short rz,
00079                     int max_rad , float   ** slit_edges );
00080 /*</python>*/
00081 /*<python>*/
00082 OneImage * cbezierFindBad( OneImage *im, OneImage *mask/*, Lookup *look*/, short rx, short ry, short rz,
00083                short lowerI, short highI, short lowerJ, short highJ, float factor );
00084 /*</python>*/
00085 
00086 
00087 
00088 float      cbezierCorrectPixel( int ipos ,int jpos, 
00089                 OneImage *im, 
00090                 OneImage *mask, 
00091                 OneCube  *sc_im, 
00092                 OneCube  *drs_sc_mask, 
00093                 Lookup *look, short rx, short ry, short rz  );
00094 float      cbezierCorrectPixel2D( int ipos ,int jpos, 
00095                 OneImage *im, 
00096                 OneImage *mask, 
00097                 OneCube  *sc_im, 
00098                 OneCube  *drs_sc_mask, 
00099                 /*Lookup *look,*/ short rx, short ry, short rz , double *med, double *stdev, float factor );
00100 
00101 float cbezierInterpol( OneCube * im, OneCube * action );
00102 int Bezier( XYZW *p, int n, double mu, double munk, XYZW *res );
00103 
00104 float      cbezierCorrectCosmic( int ipos ,int jpos,
00105                                OneImage *im,
00106                                OneImage *mask,
00107                                OneCube  *sc_im,
00108                                OneCube  *drs_sc_mask,
00109                                Lookup *look, short rx, short ry, 
00110                                short rz , double *med, double *stdev, float factor );
00111 
00112 
00113 OneImage * cbezierFindCosmic( OneImage *im, OneImage *mask, Lookup *look, 
00114                               short rx, short ry, short rz,short lowerI, 
00115                               short highI, short lowerJ, short highJ, float factor );
00116 
00117 
00118 /*<python>*/
00119 int cCreateXYZ( Lookup *l );
00120 /*</python>*/
00121 
00122 /*<python>*/
00123 Lookup * newLookup( void ) ;
00124 /*</python>*/
00125 
00126 /*<python>*/
00127 void destroyLookup( Lookup *l ) ;
00128 /*</python>*/
00129 
00130 /*<python>*/
00131 int changeMask( OneImage * mask, OneImage * im ) ;
00132 /*</python>*/
00133 
00134 
00135 #endif 
00137 /*--------------------------------------------------------------------------*/

Generated on Wed Oct 26 13:08:51 2005 for SINFONI Pipeline Reference Manual by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001