00001 /* $Id: irplib_filter.h,v 1.7 2008/01/21 07:58:07 llundin Exp $ 00002 * 00003 * This file is part of the irplib package 00004 * Copyright (C) 2002,2003 European Southern Observatory 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA 00019 */ 00020 00021 /* 00022 * $Author: llundin $ 00023 * $Date: 2008/01/21 07:58:07 $ 00024 * $Revision: 1.7 $ 00025 * $Name: uves-4_2_2 $ 00026 */ 00027 00028 #ifndef IRPLIB_FILTER_H 00029 #define IRPLIB_FILTER_H 00030 00031 /*----------------------------------------------------------------------------- 00032 Includes 00033 -----------------------------------------------------------------------------*/ 00034 00035 #include <cpl.h> 00036 00037 /*----------------------------------------------------------------------------- 00038 New type 00039 -----------------------------------------------------------------------------*/ 00040 00041 /* Three bits (currently) used for border mode */ 00042 #define IRPLIB_FILTER_BORDER_MODE (7<<1) 00043 00044 typedef enum { 00045 IRPLIB_FILTER_MEDIAN = 0, 00046 IRPLIB_FILTER_AVERAGE = 1, 00047 IRPLIB_FILTER_BORDER_NOP = 0<<1, 00048 IRPLIB_FILTER_BORDER_CROP = 1<<1, 00049 IRPLIB_FILTER_BORDER_FILTER = 2<<1, 00050 IRPLIB_FILTER_BORDER_COPY = 3<<1, 00051 IRPLIB_FILTER_BORDER_EXTRAPOL_OUT = 4<<1 00052 } irplib_filter_mode; 00053 00054 /*----------------------------------------------------------------------------- 00055 Function prototypes 00056 -----------------------------------------------------------------------------*/ 00057 00058 cpl_error_code irplib_image_filter(cpl_image *, const cpl_image *, int, int, 00059 irplib_filter_mode); 00060 00061 /* These three functions have little error checking, 00062 they are only to be called from irplib_image_filter(). */ 00063 00064 void irplib_image_filter_double(double *, const double *, unsigned, unsigned, 00065 unsigned, unsigned, unsigned); 00066 00067 void irplib_image_filter_float(float *, const float *, unsigned, unsigned, 00068 unsigned, unsigned, unsigned); 00069 00070 void irplib_image_filter_int(int *, const int *, unsigned, unsigned, unsigned, 00071 unsigned, unsigned); 00072 00073 #endif
1.5.1