sinfo_median.h

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    File name     :    sinfo_median.h
00022    Author         :    N. Devillard
00023    Created on    :    1998
00024    Description    :    Fast sinfo_median finding routines
00025  *--------------------------------------------------------------------------*/
00026 /*
00027     $Id: sinfo_median.h,v 1.3 2007/06/06 07:10:45 amodigli Exp $
00028     $Author: amodigli $
00029     $Date: 2007/06/06 07:10:45 $
00030     $Revision: 1.3 $
00031 */
00032 #ifndef SINFO_MEDIAN_H
00033 #define SINFO_MEDIAN_H
00034 
00035 
00036 /*---------------------------------------------------------------------------
00037                                    Includes
00038  ---------------------------------------------------------------------------*/
00039 
00040 /* Get the definition of a pixelvalue */
00041 #include "sinfo_local_types.h"
00042 
00043 /*---------------------------------------------------------------------------
00044                                Function prototypes
00045  ---------------------------------------------------------------------------*/
00073 /*--------------------------------------------------------------------------*/
00074 
00075 pixelvalue 
00076 sinfo_kth_smallest(pixelvalue a[], int n, int k);
00077 
00092 double 
00093 sinfo_kth_smallest_double(double a[], int n, int k) ;
00094 
00095 #define median_double(a,n) \
00096 sinfo_kth_smallest_double(a,n,(((n)&1)?((n)/2):(((n)/2)-1)))
00097 
00112 pixelvalue
00113 sinfo_opt_med3(
00114     pixelvalue  *   p
00115 ) ;
00116 
00131 pixelvalue
00132 sinfo_opt_med5(
00133     pixelvalue  *   p
00134 );
00135 
00136 
00151 pixelvalue
00152 sinfo_opt_med7(
00153     pixelvalue  *   p
00154 ) ;
00155 
00174 pixelvalue
00175 sinfo_opt_med9(
00176     pixelvalue  *   p
00177 ) ;
00178 
00197 pixelvalue
00198 sinfo_opt_med25(
00199     pixelvalue  *   p
00200 ) ;
00201 
00202 
00218 pixelvalue 
00219 sinfo_median_pixelvalue(pixelvalue * a, int n);
00220 
00221 #endif

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