/* $Id: cpl_apertures-test.c,v 1.20 2007/12/11 11:58:39 llundin Exp $ * * This file is part of the ESO Common Pipeline Library * Copyright (C) 2001-2004 European Southern Observatory * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* * $Author: llundin $ * $Date: 2007/12/11 11:58:39 $ * $Revision: 1.20 $ * $Name: $ */ /*----------------------------------------------------------------------------- Includes -----------------------------------------------------------------------------*/ #include #include #include #include #include #include #include #include #include #include "cpl_apertures.h" /*----------------------------------------------------------------------------- Define -----------------------------------------------------------------------------*/ #define IMAGESZ 10 #define IMAGESZ2 512 /*----------------------------------------------------------------------------- Main -----------------------------------------------------------------------------*/ int main(void) { cpl_image * imd ; cpl_image * labels ; cpl_mask * bin ; cpl_apertures * aperts ; double * val ; const double psigmas[] = {5, 2, 1, 0.5}; cpl_vector * sigmas; int i, j, pos ; cpl_test_init(PACKAGE_BUGREPORT, CPL_MSG_WARNING); /* Insert tests below */ /* Create test image and the labels */ cpl_msg_info("","Create a %dx%d test image", IMAGESZ, IMAGESZ) ; val = cpl_malloc(IMAGESZ*IMAGESZ*sizeof(double)) ; for (i=0 ; i