| cpl_apertures.h | | cpl_apertures.h | |
|
| /* $Id: cpl_apertures.h,v 1.2 2008/07/21 08:48:40 llundin Exp $ | | /* $Id: cpl_apertures.h,v 1.3 2008/12/10 14:14:24 llundin Exp $ | |
| * | | * | |
| * This file is part of the ESO Common Pipeline Library | | * This file is part of the ESO Common Pipeline Library | |
| * Copyright (C) 2001-2008 European Southern Observatory | | * Copyright (C) 2001-2008 European Southern Observatory | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * 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 | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| | | | |
| skipping to change at line 23 | | skipping to change at line 23 | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| * GNU General Public License for more details. | | * GNU General Public License for more details. | |
| * | | * | |
| * You should have received a copy of the GNU General Public License | | * You should have received a copy of the GNU General Public License | |
| * along with this program; if not, write to the Free Software | | * along with this program; if not, write to the Free Software | |
| * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A | | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A | |
| */ | | */ | |
| | | | |
| /* | | /* | |
| * $Author: llundin $ | | * $Author: llundin $ | |
|
| * $Date: 2008/07/21 08:48:40 $ | | * $Date: 2008/12/10 14:14:24 $ | |
| * $Revision: 1.2 $ | | * $Revision: 1.3 $ | |
| * $Name: cpl-4_2_0b3 $ | | * $Name: cpl-5_0_0 $ | |
| */ | | */ | |
| | | | |
| #ifndef CPL_APERTURES_H | | #ifndef CPL_APERTURES_H | |
| #define CPL_APERTURES_H | | #define CPL_APERTURES_H | |
| | | | |
| /*-------------------------------------------------------------------------
---- | | /*-------------------------------------------------------------------------
---- | |
| Includes | | Includes | |
| --------------------------------------------------------------------------
---*/ | | --------------------------------------------------------------------------
---*/ | |
| | | | |
| #include <stdio.h> | | #include <stdio.h> | |
| #include <cpl_vector.h> | | #include <cpl_vector.h> | |
| #include <cpl_image.h> | | #include <cpl_image.h> | |
| | | | |
| CPL_BEGIN_DECLS | | CPL_BEGIN_DECLS | |
| | | | |
| /*-------------------------------------------------------------------------
---- | | /*-------------------------------------------------------------------------
---- | |
| New types | | New types | |
| --------------------------------------------------------------------------
---*/ | | --------------------------------------------------------------------------
---*/ | |
| | | | |
|
| typedef struct _cpl_apertures_ cpl_apertures ; | | typedef struct _cpl_apertures_ cpl_apertures; | |
| | | | |
| /*-------------------------------------------------------------------------
---- | | /*-------------------------------------------------------------------------
---- | |
| Function prototypes | | Function prototypes | |
| --------------------------------------------------------------------------
---*/ | | --------------------------------------------------------------------------
---*/ | |
| | | | |
| /* IO functions */ | | /* IO functions */ | |
|
| cpl_apertures * cpl_apertures_new(int) ; | | void cpl_apertures_delete(cpl_apertures *); | |
| void cpl_apertures_delete(cpl_apertures *) ; | | void cpl_apertures_dump(const cpl_apertures *, FILE *); | |
| void cpl_apertures_dump(const cpl_apertures *, FILE *) ; | | | |
| | | | |
| /* Statistics computation */ | | /* Statistics computation */ | |
|
| cpl_apertures * cpl_apertures_new_from_image(const cpl_image *, const cpl_i
mage *) ; | | cpl_apertures * cpl_apertures_new_from_image(const cpl_image *, const cpl_i
mage *); | |
| | | | |
| /* Accessor functions */ | | /* Accessor functions */ | |
|
| int cpl_apertures_get_size(const cpl_apertures *) ; | | int cpl_apertures_get_size(const cpl_apertures *); | |
| double cpl_apertures_get_max_x(const cpl_apertures *, int) ; | | double cpl_apertures_get_max_x(const cpl_apertures *, int); | |
| double cpl_apertures_get_max_y(const cpl_apertures *, int) ; | | double cpl_apertures_get_max_y(const cpl_apertures *, int); | |
| double cpl_apertures_get_centroid_x(const cpl_apertures *, int) ; | | double cpl_apertures_get_centroid_x(const cpl_apertures *, int); | |
| double cpl_apertures_get_centroid_y(const cpl_apertures *, int) ; | | double cpl_apertures_get_centroid_y(const cpl_apertures *, int); | |
| int cpl_apertures_get_npix(const cpl_apertures *, int) ; | | int cpl_apertures_get_npix(const cpl_apertures *, int); | |
| int cpl_apertures_get_left(const cpl_apertures *, int) ; | | int cpl_apertures_get_left(const cpl_apertures *, int); | |
| int cpl_apertures_get_left_y(const cpl_apertures *, int) ; | | int cpl_apertures_get_left_y(const cpl_apertures *, int); | |
| int cpl_apertures_get_right(const cpl_apertures *, int) ; | | int cpl_apertures_get_right(const cpl_apertures *, int); | |
| int cpl_apertures_get_right_y(const cpl_apertures *, int) ; | | int cpl_apertures_get_right_y(const cpl_apertures *, int); | |
| int cpl_apertures_get_top_x(const cpl_apertures *, int) ; | | int cpl_apertures_get_top_x(const cpl_apertures *, int); | |
| int cpl_apertures_get_top(const cpl_apertures *, int) ; | | int cpl_apertures_get_top(const cpl_apertures *, int); | |
| int cpl_apertures_get_bottom_x(const cpl_apertures *, int) ; | | int cpl_apertures_get_bottom_x(const cpl_apertures *, int); | |
| int cpl_apertures_get_bottom(const cpl_apertures *, int) ; | | int cpl_apertures_get_bottom(const cpl_apertures *, int); | |
| double cpl_apertures_get_max(const cpl_apertures *, int) ; | | double cpl_apertures_get_max(const cpl_apertures *, int); | |
| double cpl_apertures_get_min(const cpl_apertures *, int) ; | | double cpl_apertures_get_min(const cpl_apertures *, int); | |
| double cpl_apertures_get_mean(const cpl_apertures *, int) ; | | double cpl_apertures_get_mean(const cpl_apertures *, int); | |
| double cpl_apertures_get_median(const cpl_apertures *, int) ; | | double cpl_apertures_get_median(const cpl_apertures *, int); | |
| double cpl_apertures_get_stdev(const cpl_apertures *, int) ; | | double cpl_apertures_get_stdev(const cpl_apertures *, int); | |
| double cpl_apertures_get_flux(const cpl_apertures *, int) ; | | double cpl_apertures_get_flux(const cpl_apertures *, int); | |
| | | | |
| /* Sorting functions */ | | /* Sorting functions */ | |
| cpl_error_code cpl_apertures_sort_by_npix(cpl_apertures *); | | cpl_error_code cpl_apertures_sort_by_npix(cpl_apertures *); | |
| cpl_error_code cpl_apertures_sort_by_max(cpl_apertures *); | | cpl_error_code cpl_apertures_sort_by_max(cpl_apertures *); | |
| cpl_error_code cpl_apertures_sort_by_flux(cpl_apertures *); | | cpl_error_code cpl_apertures_sort_by_flux(cpl_apertures *); | |
| | | | |
| /* Detection functions */ | | /* Detection functions */ | |
| cpl_apertures * cpl_apertures_extract(const cpl_image *, const cpl_vector *
, | | cpl_apertures * cpl_apertures_extract(const cpl_image *, const cpl_vector *
, | |
| int *); | | int *); | |
| cpl_apertures * cpl_apertures_extract_window(const cpl_image *, | | cpl_apertures * cpl_apertures_extract_window(const cpl_image *, | |
| const cpl_vector *, int, int, | | const cpl_vector *, int, int, | |
| int, int, int *); | | int, int, int *); | |
| | | | |
|
| cpl_apertures * cpl_apertures_extract_sigma(const cpl_image *, double) ; | | cpl_apertures * cpl_apertures_extract_sigma(const cpl_image *, double); | |
| | | | |
| CPL_END_DECLS | | CPL_END_DECLS | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 7 change blocks. |
| 30 lines changed or deleted | | 29 lines changed or added | |
|
| cpl_array.h | | cpl_array.h | |
|
| /* $Id: cpl_array.h,v 1.5 2007/07/17 10:48:55 cizzo Exp $ | | /* $Id: cpl_array.h,v 1.11 2009/02/10 18:23:34 cizzo Exp $ | |
| * | | * | |
| * This file is part of the ESO Common Pipeline Library | | * This file is part of the ESO Common Pipeline Library | |
| * Copyright (C) 2001-2006 European Southern Observatory | | * Copyright (C) 2001-2006 European Southern Observatory | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * 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 | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| | | | |
| skipping to change at line 23 | | skipping to change at line 23 | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| * GNU General Public License for more details. | | * GNU General Public License for more details. | |
| * | | * | |
| * You should have received a copy of the GNU General Public License | | * You should have received a copy of the GNU General Public License | |
| * along with this program; if not, write to the Free Software | | * along with this program; if not, write to the Free Software | |
| * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 US
A | | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 US
A | |
| */ | | */ | |
| | | | |
| /* | | /* | |
| * $Author: cizzo $ | | * $Author: cizzo $ | |
|
| * $Date: 2007/07/17 10:48:55 $ | | * $Date: 2009/02/10 18:23:34 $ | |
| * $Revision: 1.5 $ | | * $Revision: 1.11 $ | |
| * $Name: cpl-4_2_0b3 $ | | * $Name: cpl-5_0_0 $ | |
| */ | | */ | |
| | | | |
| #ifndef CPL_ARRAY_H | | #ifndef CPL_ARRAY_H | |
| #define CPL_ARRAY_H | | #define CPL_ARRAY_H | |
| | | | |
| #include <cpl_macros.h> | | #include <cpl_macros.h> | |
| #include <cpl_type.h> | | #include <cpl_type.h> | |
| #include <cpl_error.h> | | #include <cpl_error.h> | |
| | | | |
| CPL_BEGIN_DECLS | | CPL_BEGIN_DECLS | |
| | | | |
| skipping to change at line 52 | | skipping to change at line 52 | |
| cpl_array *cpl_array_wrap_double(double *, int); | | cpl_array *cpl_array_wrap_double(double *, int); | |
| cpl_array *cpl_array_wrap_string(char **, int); | | cpl_array *cpl_array_wrap_string(char **, int); | |
| cpl_error_code cpl_array_copy_data(cpl_array *, const double *); | | cpl_error_code cpl_array_copy_data(cpl_array *, const double *); | |
| cpl_error_code cpl_array_copy_data_int(cpl_array *, const int *); | | cpl_error_code cpl_array_copy_data_int(cpl_array *, const int *); | |
| cpl_error_code cpl_array_copy_data_float(cpl_array *, const float *); | | cpl_error_code cpl_array_copy_data_float(cpl_array *, const float *); | |
| cpl_error_code cpl_array_copy_data_double(cpl_array *, const double *); | | cpl_error_code cpl_array_copy_data_double(cpl_array *, const double *); | |
| cpl_error_code cpl_array_copy_data_string(cpl_array *, const char **); | | cpl_error_code cpl_array_copy_data_string(cpl_array *, const char **); | |
| void cpl_array_delete(cpl_array *); | | void cpl_array_delete(cpl_array *); | |
| void *cpl_array_unwrap(cpl_array *); | | void *cpl_array_unwrap(cpl_array *); | |
| int cpl_array_get_size(const cpl_array *); | | int cpl_array_get_size(const cpl_array *); | |
|
| | | cpl_error_code cpl_array_set_size(cpl_array *, int); | |
| cpl_type cpl_array_get_type(const cpl_array *); | | cpl_type cpl_array_get_type(const cpl_array *); | |
| int cpl_array_has_invalid(const cpl_array *); | | int cpl_array_has_invalid(const cpl_array *); | |
| int cpl_array_has_valid(const cpl_array *); | | int cpl_array_has_valid(const cpl_array *); | |
| int cpl_array_count_invalid(const cpl_array *); | | int cpl_array_count_invalid(const cpl_array *); | |
| int *cpl_array_get_data_int(cpl_array *); | | int *cpl_array_get_data_int(cpl_array *); | |
| const int *cpl_array_get_data_int_const(const cpl_array *); | | const int *cpl_array_get_data_int_const(const cpl_array *); | |
| float *cpl_array_get_data_float(cpl_array *); | | float *cpl_array_get_data_float(cpl_array *); | |
| const float *cpl_array_get_data_float_const(const cpl_array *); | | const float *cpl_array_get_data_float_const(const cpl_array *); | |
| double *cpl_array_get_data_double(cpl_array *); | | double *cpl_array_get_data_double(cpl_array *); | |
| const double *cpl_array_get_data_double_const(const cpl_array *); | | const double *cpl_array_get_data_double_const(const cpl_array *); | |
| | | | |
| skipping to change at line 83 | | skipping to change at line 84 | |
| cpl_error_code cpl_array_set_string(cpl_array *, int, const char *); | | cpl_error_code cpl_array_set_string(cpl_array *, int, const char *); | |
| cpl_error_code cpl_array_set_invalid(cpl_array *, int); | | cpl_error_code cpl_array_set_invalid(cpl_array *, int); | |
| cpl_error_code cpl_array_fill_window(cpl_array *, int, int, double); | | cpl_error_code cpl_array_fill_window(cpl_array *, int, int, double); | |
| cpl_error_code cpl_array_fill_window_int(cpl_array *, int, int, int); | | cpl_error_code cpl_array_fill_window_int(cpl_array *, int, int, int); | |
| cpl_error_code cpl_array_fill_window_float(cpl_array *, int, int, float); | | cpl_error_code cpl_array_fill_window_float(cpl_array *, int, int, float); | |
| cpl_error_code cpl_array_fill_window_double(cpl_array *, int, int, double); | | cpl_error_code cpl_array_fill_window_double(cpl_array *, int, int, double); | |
| cpl_error_code cpl_array_fill_window_string(cpl_array *, int, int, | | cpl_error_code cpl_array_fill_window_string(cpl_array *, int, int, | |
| const char *); | | const char *); | |
| cpl_error_code cpl_array_fill_window_invalid(cpl_array *, int, int); | | cpl_error_code cpl_array_fill_window_invalid(cpl_array *, int, int); | |
| cpl_array *cpl_array_duplicate(const cpl_array *); | | cpl_array *cpl_array_duplicate(const cpl_array *); | |
|
| | | cpl_array *cpl_array_extract(const cpl_array *, int start, int count); | |
| | | cpl_error_code cpl_array_insert_window(cpl_array *, int start, int count); | |
| | | cpl_error_code cpl_array_erase_window(cpl_array *, int start, int count); | |
| | | cpl_error_code cpl_array_insert(cpl_array *, const cpl_array *, int); | |
| | | | |
| | | cpl_error_code cpl_array_add(cpl_array *, const cpl_array *); | |
| | | cpl_error_code cpl_array_subtract(cpl_array *, const cpl_array *); | |
| | | cpl_error_code cpl_array_multiply(cpl_array *, const cpl_array *); | |
| | | cpl_error_code cpl_array_divide(cpl_array *, const cpl_array *); | |
| | | cpl_error_code cpl_array_add_scalar(cpl_array *, double); | |
| | | cpl_error_code cpl_array_subtract_scalar(cpl_array *, double); | |
| | | cpl_error_code cpl_array_multiply_scalar(cpl_array *, double); | |
| | | cpl_error_code cpl_array_divide_scalar(cpl_array *, double); | |
| | | cpl_error_code cpl_array_abs(cpl_array *); | |
| | | cpl_error_code cpl_array_logarithm(cpl_array *, double); | |
| | | cpl_error_code cpl_array_power(cpl_array *, double); | |
| | | cpl_error_code cpl_array_exponential(cpl_array *, double); | |
| | | | |
| | | double cpl_array_get_mean(const cpl_array *); | |
| | | double cpl_array_get_median(const cpl_array *); | |
| | | double cpl_array_get_stdev(const cpl_array *); | |
| | | | |
| | | double cpl_array_get_max(const cpl_array *); | |
| | | double cpl_array_get_min(const cpl_array *); | |
| | | cpl_error_code cpl_array_get_maxpos(const cpl_array *, int *); | |
| | | cpl_error_code cpl_array_get_minpos(const cpl_array *, int *); | |
| | | | |
| CPL_END_DECLS | | CPL_END_DECLS | |
| | | | |
| #endif | | #endif | |
| /* end of cpl_array.h */ | | /* end of cpl_array.h */ | |
| | | | |
End of changes. 4 change blocks. |
| 4 lines changed or deleted | | 31 lines changed or added | |
|
| cpl_dfs.h | | cpl_dfs.h | |
|
| /* $Id: cpl_dfs.h,v 1.10 2008/05/27 09:37:52 llundin Exp $ | | /* $Id: cpl_dfs.h,v 1.14 2009/01/28 16:02:09 llundin Exp $ | |
| * | | * | |
| * This file is part of the IIINSTRUMENT Pipeline | | * This file is part of the IIINSTRUMENT Pipeline | |
| * Copyright (C) 2002,2003 European Southern Observatory | | * Copyright (C) 2002,2003 European Southern Observatory | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * 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 | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| | | | |
| skipping to change at line 23 | | skipping to change at line 23 | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| * GNU General Public License for more details. | | * GNU General Public License for more details. | |
| * | | * | |
| * You should have received a copy of the GNU General Public License | | * You should have received a copy of the GNU General Public License | |
| * along with this program; if not, write to the Free Software | | * along with this program; if not, write to the Free Software | |
| * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A | | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A | |
| */ | | */ | |
| | | | |
| /* | | /* | |
| * $Author: llundin $ | | * $Author: llundin $ | |
|
| * $Date: 2008/05/27 09:37:52 $ | | * $Date: 2009/01/28 16:02:09 $ | |
| * $Revision: 1.10 $ | | * $Revision: 1.14 $ | |
| * $Name: cpl-4_2_0b3 $ | | * $Name: cpl-5_0_0 $ | |
| */ | | */ | |
| | | | |
| #ifndef CPL_DFS_H | | #ifndef CPL_DFS_H | |
| #define CPL_DFS_H | | #define CPL_DFS_H | |
| | | | |
| #include <cpl_imagelist.h> | | #include <cpl_imagelist.h> | |
| #include <cpl_table.h> | | #include <cpl_table.h> | |
| #include <cpl_frameset.h> | | #include <cpl_frameset.h> | |
| #include <cpl_propertylist.h> | | #include <cpl_propertylist.h> | |
| #include <cpl_parameterlist.h> | | #include <cpl_parameterlist.h> | |
| | | | |
| skipping to change at line 94 | | skipping to change at line 94 | |
| @note A pipeline product should contain a boolean property with this nam
e | | @note A pipeline product should contain a boolean property with this nam
e | |
| */ | | */ | |
| /*-------------------------------------------------------------------------
---*/ | | /*-------------------------------------------------------------------------
---*/ | |
| #define CPL_DFS_PRO_SCIENCE "ESO PRO SCIENCE" | | #define CPL_DFS_PRO_SCIENCE "ESO PRO SCIENCE" | |
| | | | |
| /*-------------------------------------------------------------------------
---- | | /*-------------------------------------------------------------------------
---- | |
| Function prototypes | | Function prototypes | |
| --------------------------------------------------------------------------
---*/ | | --------------------------------------------------------------------------
---*/ | |
| | | | |
| cpl_error_code cpl_dfs_save_image(cpl_frameset *, | | cpl_error_code cpl_dfs_save_image(cpl_frameset *, | |
|
| | | cpl_propertylist *, | |
| const cpl_parameterlist *, | | const cpl_parameterlist *, | |
| const cpl_frameset *, | | const cpl_frameset *, | |
|
| | | const cpl_frame *, | |
| const cpl_image *, | | const cpl_image *, | |
| cpl_type_bpp, | | cpl_type_bpp, | |
| const char *, | | const char *, | |
|
| const char *, | | | |
| const cpl_propertylist *, | | const cpl_propertylist *, | |
| const char *, | | const char *, | |
| const char *, | | const char *, | |
| const char *); | | const char *); | |
| | | | |
| cpl_error_code cpl_dfs_save_propertylist(cpl_frameset *, | | cpl_error_code cpl_dfs_save_propertylist(cpl_frameset *, | |
|
| | | cpl_propertylist *, | |
| const cpl_parameterlist *, | | const cpl_parameterlist *, | |
| const cpl_frameset *, | | const cpl_frameset *, | |
|
| const char *, | | const cpl_frame *, | |
| const char *, | | const char *, | |
| const cpl_propertylist *, | | const cpl_propertylist *, | |
| const char *, | | const char *, | |
| const char *, | | const char *, | |
| const char *); | | const char *); | |
| | | | |
| cpl_error_code cpl_dfs_save_imagelist(cpl_frameset *, | | cpl_error_code cpl_dfs_save_imagelist(cpl_frameset *, | |
|
| | | cpl_propertylist *, | |
| const cpl_parameterlist *, | | const cpl_parameterlist *, | |
| const cpl_frameset *, | | const cpl_frameset *, | |
|
| | | const cpl_frame *, | |
| const cpl_imagelist *, | | const cpl_imagelist *, | |
| cpl_type_bpp, | | cpl_type_bpp, | |
| const char *, | | const char *, | |
|
| const char *, | | | |
| const cpl_propertylist *, | | const cpl_propertylist *, | |
| const char *, | | const char *, | |
| const char *, | | const char *, | |
| const char *); | | const char *); | |
| | | | |
| cpl_error_code cpl_dfs_save_table(cpl_frameset *, | | cpl_error_code cpl_dfs_save_table(cpl_frameset *, | |
|
| | | cpl_propertylist *, | |
| const cpl_parameterlist *, | | const cpl_parameterlist *, | |
| const cpl_frameset *, | | const cpl_frameset *, | |
|
| | | const cpl_frame *, | |
| const cpl_table *, | | const cpl_table *, | |
| const cpl_propertylist *, | | const cpl_propertylist *, | |
| const char *, | | const char *, | |
|
| const char *, | | | |
| const cpl_propertylist *, | | const cpl_propertylist *, | |
| const char *, | | const char *, | |
| const char *, | | const char *, | |
| const char *); | | const char *); | |
| | | | |
| cpl_error_code cpl_dfs_save_paf(const char *, const char *, | | cpl_error_code cpl_dfs_save_paf(const char *, const char *, | |
| const cpl_propertylist *, const char *); | | const cpl_propertylist *, const char *); | |
| | | | |
| cpl_error_code cpl_dfs_setup_product_header(cpl_propertylist *, | | cpl_error_code cpl_dfs_setup_product_header(cpl_propertylist *, | |
| const cpl_frame *, | | const cpl_frame *, | |
| const cpl_frameset *, | | const cpl_frameset *, | |
| const cpl_parameterlist *, | | const cpl_parameterlist *, | |
| const char *, | | const char *, | |
| const char *, | | const char *, | |
|
| const char *); | | const char *, | |
| | | const cpl_frame *); | |
| | | | |
| cpl_error_code cpl_dfs_update_product_header(cpl_frameset *); | | cpl_error_code cpl_dfs_update_product_header(cpl_frameset *); | |
| | | | |
| CPL_END_DECLS | | CPL_END_DECLS | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 14 change blocks. |
| 9 lines changed or deleted | | 14 lines changed or added | |
|
| cpl_geom_img.h | | cpl_geom_img.h | |
|
| /* $Id: cpl_geom_img.h,v 1.2 2008/07/21 08:48:40 llundin Exp $ | | /* $Id: cpl_geom_img.h,v 1.3 2009/01/20 10:14:28 llundin Exp $ | |
| * | | * | |
| * This file is part of the ESO Common Pipeline Library | | * This file is part of the ESO Common Pipeline Library | |
| * Copyright (C) 2001-2008 European Southern Observatory | | * Copyright (C) 2001-2008 European Southern Observatory | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * 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 | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| | | | |
| skipping to change at line 23 | | skipping to change at line 23 | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| * GNU General Public License for more details. | | * GNU General Public License for more details. | |
| * | | * | |
| * You should have received a copy of the GNU General Public License | | * You should have received a copy of the GNU General Public License | |
| * along with this program; if not, write to the Free Software | | * along with this program; if not, write to the Free Software | |
| * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A | | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A | |
| */ | | */ | |
| | | | |
| /* | | /* | |
| * $Author: llundin $ | | * $Author: llundin $ | |
|
| * $Date: 2008/07/21 08:48:40 $ | | * $Date: 2009/01/20 10:14:28 $ | |
| * $Revision: 1.2 $ | | * $Revision: 1.3 $ | |
| * $Name: cpl-4_2_0b3 $ | | * $Name: cpl-5_0_0 $ | |
| */ | | */ | |
| | | | |
| #ifndef CPL_GEOM_IMG_H | | #ifndef CPL_GEOM_IMG_H | |
| #define CPL_GEOM_IMG_H | | #define CPL_GEOM_IMG_H | |
| | | | |
| /*-------------------------------------------------------------------------
---- | | /*-------------------------------------------------------------------------
---- | |
| Includes | | Includes | |
| --------------------------------------------------------------------------
---*/ | | --------------------------------------------------------------------------
---*/ | |
| | | | |
| #include <cpl_image.h> | | #include <cpl_image.h> | |
| | | | |
| skipping to change at line 66 | | skipping to change at line 66 | |
| CPL_GEOM_FIRST | | CPL_GEOM_FIRST | |
| | | | |
| } cpl_geom_combine; | | } cpl_geom_combine; | |
| | | | |
| /*-------------------------------------------------------------------------
---- | | /*-------------------------------------------------------------------------
---- | |
| Function prototypes | | Function prototypes | |
| --------------------------------------------------------------------------
---*/ | | --------------------------------------------------------------------------
---*/ | |
| | | | |
| /* Offsets detection and frames recombination */ | | /* Offsets detection and frames recombination */ | |
| cpl_bivector * cpl_geom_img_offset_fine(const cpl_imagelist *, | | cpl_bivector * cpl_geom_img_offset_fine(const cpl_imagelist *, | |
|
| const cpl_bivector *, const cpl_bivector *, int, int, int, int, | | const cpl_bivector *, | |
| cpl_vector *) ; | | const cpl_bivector *, | |
| | | int, int, int, int, | |
| | | cpl_vector *); | |
| | | | |
|
| cpl_image ** cpl_geom_img_offset_saa(const cpl_imagelist *, const cpl_bivec | | cpl_image ** cpl_geom_img_offset_saa(const cpl_imagelist *, | |
| tor *, | | const cpl_bivector *, | |
| cpl_kernel, int, int, cpl_geom_combine) ; | | cpl_kernel, int, int, cpl_geom_combine | |
| | | , | |
| | | double *, double *); | |
| | | | |
| cpl_image ** cpl_geom_img_offset_combine(cpl_imagelist *, const cpl_bivecto
r *, | | cpl_image ** cpl_geom_img_offset_combine(cpl_imagelist *, const cpl_bivecto
r *, | |
| int, const cpl_bivector *, | | int, const cpl_bivector *, | |
| const cpl_vector *, int *, int, in
t, | | const cpl_vector *, int *, int, in
t, | |
| int, int, int, int, cpl_geom_combi
ne); | | int, int, int, int, cpl_geom_combi
ne); | |
| | | | |
| CPL_END_DECLS | | CPL_END_DECLS | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 4 change blocks. |
| 9 lines changed or deleted | | 13 lines changed or added | |
|
| cpl_image_filter.h | | cpl_image_filter.h | |
|
| /* $Id: cpl_image_filter.h,v 1.19 2008/07/21 08:48:26 llundin Exp $ | | /* $Id: cpl_image_filter.h,v 1.23 2008/12/16 10:21:56 llundin Exp $ | |
| * | | * | |
| * This file is part of the ESO Common Pipeline Library | | * This file is part of the ESO Common Pipeline Library | |
| * Copyright (C) 2001-2008 European Southern Observatory | | * Copyright (C) 2001-2008 European Southern Observatory | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * 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 | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| | | | |
| skipping to change at line 23 | | skipping to change at line 23 | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| * GNU General Public License for more details. | | * GNU General Public License for more details. | |
| * | | * | |
| * You should have received a copy of the GNU General Public License | | * You should have received a copy of the GNU General Public License | |
| * along with this program; if not, write to the Free Software | | * along with this program; if not, write to the Free Software | |
| * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A | | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A | |
| */ | | */ | |
| | | | |
| /* | | /* | |
| * $Author: llundin $ | | * $Author: llundin $ | |
|
| * $Date: 2008/07/21 08:48:26 $ | | * $Date: 2008/12/16 10:21:56 $ | |
| * $Revision: 1.19 $ | | * $Revision: 1.23 $ | |
| * $Name: cpl-4_2_0b3 $ | | * $Name: cpl-5_0_0 $ | |
| */ | | */ | |
| | | | |
| #ifndef CPL_IMAGE_FILTER_H | | #ifndef CPL_IMAGE_FILTER_H | |
| #define CPL_IMAGE_FILTER_H | | #define CPL_IMAGE_FILTER_H | |
| | | | |
| /*-------------------------------------------------------------------------
---- | | /*-------------------------------------------------------------------------
---- | |
| Includes | | Includes | |
| --------------------------------------------------------------------------
---*/ | | --------------------------------------------------------------------------
---*/ | |
| | | | |
| #include "cpl_image.h" | | #include "cpl_image.h" | |
| #include "cpl_matrix.h" | | #include "cpl_matrix.h" | |
|
| | | #include "cpl_filter.h" | |
| | | | |
| CPL_BEGIN_DECLS | | CPL_BEGIN_DECLS | |
| | | | |
| /*-------------------------------------------------------------------------
---- | | /*-------------------------------------------------------------------------
---- | |
| Function prototypes | | Function prototypes | |
| --------------------------------------------------------------------------
---*/ | | --------------------------------------------------------------------------
---*/ | |
| | | | |
|
| cpl_image * cpl_image_filter_linear(const cpl_image *, const cpl_matrix *) | | cpl_error_code cpl_image_filter_mask(cpl_image *, const cpl_image *, | |
| ; | | const cpl_mask *, | |
| cpl_image * cpl_image_filter_morpho(const cpl_image *, const cpl_matrix *) | | cpl_filter_mode, cpl_border_mode); | |
| ; | | | |
| cpl_image * cpl_image_filter_median(const cpl_image *, const cpl_matrix *) | | cpl_error_code cpl_image_filter(cpl_image *, const cpl_image *, | |
| ; | | const cpl_matrix *, | |
| cpl_image * cpl_image_filter_stdev(const cpl_image *, const cpl_matrix *) ; | | cpl_filter_mode, cpl_border_mode); | |
| | | | |
| | | cpl_image * cpl_image_filter_linear(const cpl_image *, const cpl_matrix *) | |
| | | #ifdef __GNUC__ | |
| | | __attribute__((deprecated)) | |
| | | #endif | |
| | | ; | |
| | | cpl_image * cpl_image_filter_morpho(const cpl_image *, const cpl_matrix *) | |
| | | #ifdef __GNUC__ | |
| | | __attribute__((deprecated)) | |
| | | #endif | |
| | | ; | |
| | | cpl_image * cpl_image_filter_median(const cpl_image *, const cpl_matrix *) | |
| | | #ifdef __GNUC__ | |
| | | __attribute__((deprecated)) | |
| | | #endif | |
| | | ; | |
| | | cpl_image * cpl_image_filter_stdev(const cpl_image *, const cpl_matrix *) | |
| | | #ifdef __GNUC__ | |
| | | __attribute__((deprecated)) | |
| | | #endif | |
| | | ; | |
| | | | |
| CPL_END_DECLS | | CPL_END_DECLS | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 4 change blocks. |
| 11 lines changed or deleted | | 33 lines changed or added | |
|
| cpl_image_io.h | | cpl_image_io.h | |
|
| /* $Id: cpl_image_io.h,v 1.57 2008/07/21 08:48:40 llundin Exp $ | | /* $Id: cpl_image_io.h,v 1.63 2009/03/04 10:45:17 lbilbao Exp $ | |
| * | | * | |
| * This file is part of the ESO Common Pipeline Library | | * This file is part of the ESO Common Pipeline Library | |
| * Copyright (C) 2001-2008 European Southern Observatory | | * Copyright (C) 2001-2008 European Southern Observatory | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * 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 | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| * GNU General Public License for more details. | | * GNU General Public License for more details. | |
| * | | * | |
| * You should have received a copy of the GNU General Public License | | * You should have received a copy of the GNU General Public License | |
| * along with this program; if not, write to the Free Software | | * along with this program; if not, write to the Free Software | |
| * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A | | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A | |
| */ | | */ | |
| | | | |
| /* | | /* | |
|
| * $Author: llundin $ | | * $Author: lbilbao $ | |
| * $Date: 2008/07/21 08:48:40 $ | | * $Date: 2009/03/04 10:45:17 $ | |
| * $Revision: 1.57 $ | | * $Revision: 1.63 $ | |
| * $Name: cpl-4_2_0b3 $ | | * $Name: cpl-5_0_0 $ | |
| */ | | */ | |
| | | | |
| #ifndef CPL_IMAGE_IO_H | | #ifndef CPL_IMAGE_IO_H | |
| #define CPL_IMAGE_IO_H | | #define CPL_IMAGE_IO_H | |
| | | | |
| /*-------------------------------------------------------------------------
---- | | /*-------------------------------------------------------------------------
---- | |
| New types | | New types | |
| --------------------------------------------------------------------------
---*/ | | --------------------------------------------------------------------------
---*/ | |
| | | | |
| typedef struct _cpl_image_ cpl_image; | | typedef struct _cpl_image_ cpl_image; | |
| | | | |
| /*-------------------------------------------------------------------------
---- | | /*-------------------------------------------------------------------------
---- | |
| Includes | | Includes | |
| --------------------------------------------------------------------------
---*/ | | --------------------------------------------------------------------------
---*/ | |
| | | | |
| #include <limits.h> | | #include <limits.h> | |
| | | | |
|
| | | #include <complex.h> | |
| | | | |
| #include "cpl_io.h" | | #include "cpl_io.h" | |
| #include "cpl_propertylist.h" | | #include "cpl_propertylist.h" | |
| #include "cpl_mask.h" | | #include "cpl_mask.h" | |
| | | | |
| CPL_BEGIN_DECLS | | CPL_BEGIN_DECLS | |
| | | | |
| /*-------------------------------------------------------------------------
---- | | /*-------------------------------------------------------------------------
---- | |
| Function prototypes | | Function prototypes | |
| --------------------------------------------------------------------------
---*/ | | --------------------------------------------------------------------------
---*/ | |
| | | | |
| /* Image constructors */ | | /* Image constructors */ | |
| cpl_image * cpl_image_new(int, int, cpl_type); | | cpl_image * cpl_image_new(int, int, cpl_type); | |
| cpl_image * cpl_image_wrap_double(int, int, double *); | | cpl_image * cpl_image_wrap_double(int, int, double *); | |
| cpl_image * cpl_image_wrap_float(int, int, float *); | | cpl_image * cpl_image_wrap_float(int, int, float *); | |
| cpl_image * cpl_image_wrap_int(int, int, int *); | | cpl_image * cpl_image_wrap_int(int, int, int *); | |
|
| | | cpl_image * cpl_image_wrap_double_complex(int, int, double complex *); | |
| | | cpl_image * cpl_image_wrap_float_complex(int, int, float complex *); | |
| cpl_image * cpl_image_load(const char *, cpl_type, int, int) ; | | cpl_image * cpl_image_load(const char *, cpl_type, int, int) ; | |
| cpl_image * cpl_image_load_window(const char *, cpl_type, int, int, int, in
t, | | cpl_image * cpl_image_load_window(const char *, cpl_type, int, int, int, in
t, | |
| int, int) ; | | int, int) ; | |
| cpl_image * cpl_image_new_from_mask(const cpl_mask *) ; | | cpl_image * cpl_image_new_from_mask(const cpl_mask *) ; | |
| cpl_image * cpl_image_labelise_mask_create(const cpl_mask *, int *) ; | | cpl_image * cpl_image_labelise_mask_create(const cpl_mask *, int *) ; | |
| | | | |
| /* Get functions */ | | /* Get functions */ | |
| cpl_type cpl_image_get_type(const cpl_image *) ; | | cpl_type cpl_image_get_type(const cpl_image *) ; | |
| int cpl_image_get_size_x(const cpl_image *) ; | | int cpl_image_get_size_x(const cpl_image *) ; | |
| int cpl_image_get_size_y(const cpl_image *) ; | | int cpl_image_get_size_y(const cpl_image *) ; | |
| double cpl_image_get(const cpl_image *, int, int, int *) ; | | double cpl_image_get(const cpl_image *, int, int, int *) ; | |
| | | | |
|
| | | double complex cpl_image_get_complex(const cpl_image *, int, int, int *) ; | |
| | | cpl_error_code cpl_image_set_complex(cpl_image *, int, int, double complex) | |
| | | ; | |
| | | | |
| cpl_mask * cpl_image_get_bpm(cpl_image *) ; | | cpl_mask * cpl_image_get_bpm(cpl_image *) ; | |
| const cpl_mask * cpl_image_get_bpm_const(const cpl_image *) ; | | const cpl_mask * cpl_image_get_bpm_const(const cpl_image *) ; | |
| void * cpl_image_get_data(cpl_image *) ; | | void * cpl_image_get_data(cpl_image *) ; | |
| const void * cpl_image_get_data_const(const cpl_image *) ; | | const void * cpl_image_get_data_const(const cpl_image *) ; | |
| double * cpl_image_get_data_double(cpl_image *) ; | | double * cpl_image_get_data_double(cpl_image *) ; | |
| const double * cpl_image_get_data_double_const(const cpl_image *) ; | | const double * cpl_image_get_data_double_const(const cpl_image *) ; | |
| float * cpl_image_get_data_float(cpl_image *) ; | | float * cpl_image_get_data_float(cpl_image *) ; | |
| const float * cpl_image_get_data_float_const(const cpl_image *) ; | | const float * cpl_image_get_data_float_const(const cpl_image *) ; | |
| int * cpl_image_get_data_int(cpl_image *) ; | | int * cpl_image_get_data_int(cpl_image *) ; | |
| const int * cpl_image_get_data_int_const(const cpl_image *) ; | | const int * cpl_image_get_data_int_const(const cpl_image *) ; | |
|
| | | double complex * cpl_image_get_data_double_complex(cpl_image *) ; | |
| | | const double complex * cpl_image_get_data_double_complex_const(const cpl_im | |
| | | age *) ; | |
| | | float complex * cpl_image_get_data_float_complex(cpl_image *) ; | |
| | | const float complex * cpl_image_get_data_float_complex_const(const cpl_imag | |
| | | e *) ; | |
| | | | |
| /* Set functions */ | | /* Set functions */ | |
| cpl_error_code cpl_image_set(cpl_image *, int, int, double) ; | | cpl_error_code cpl_image_set(cpl_image *, int, int, double) ; | |
| cpl_error_code cpl_image_fill_rejected(cpl_image *, double) ; | | cpl_error_code cpl_image_fill_rejected(cpl_image *, double) ; | |
| | | | |
| /* Image destructor */ | | /* Image destructor */ | |
| void cpl_image_delete(cpl_image *) ; | | void cpl_image_delete(cpl_image *) ; | |
| void * cpl_image_unwrap(cpl_image *) ; | | void * cpl_image_unwrap(cpl_image *) ; | |
| | | | |
|
| | | /* Debugging functions */ | |
| | | cpl_error_code cpl_image_dump_structure(const cpl_image *, FILE *); | |
| | | cpl_error_code cpl_image_dump_window(const cpl_image *, int, int, int, int, | |
| | | FILE *); | |
| | | | |
| /* Others */ | | /* Others */ | |
| cpl_image * cpl_image_duplicate(const cpl_image *) ; | | cpl_image * cpl_image_duplicate(const cpl_image *) ; | |
| cpl_image * cpl_image_cast(const cpl_image *, cpl_type) ; | | cpl_image * cpl_image_cast(const cpl_image *, cpl_type) ; | |
| | | | |
| /* Saving function */ | | /* Saving function */ | |
| cpl_error_code cpl_image_save(const cpl_image *, const char *, cpl_type_bpp
, | | cpl_error_code cpl_image_save(const cpl_image *, const char *, cpl_type_bpp
, | |
| const cpl_propertylist *, unsigned); | | const cpl_propertylist *, unsigned); | |
| | | | |
| CPL_END_DECLS | | CPL_END_DECLS | |
| | | | |
| | | | |
End of changes. 7 change blocks. |
| 5 lines changed or deleted | | 24 lines changed or added | |
|
| cpl_image_resample.h | | cpl_image_resample.h | |
|
| /* $Id: cpl_image_resample.h,v 1.12 2008/07/21 08:48:40 llundin Exp $ | | /* $Id: cpl_image_resample.h,v 1.16 2008/12/19 13:48:36 cizzo Exp $ | |
| * | | * | |
| * This file is part of the ESO Common Pipeline Library | | * This file is part of the ESO Common Pipeline Library | |
| * Copyright (C) 2001-2008 European Southern Observatory | | * Copyright (C) 2001-2008 European Southern Observatory | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * 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 | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| * GNU General Public License for more details. | | * GNU General Public License for more details. | |
| * | | * | |
| * You should have received a copy of the GNU General Public License | | * You should have received a copy of the GNU General Public License | |
| * along with this program; if not, write to the Free Software | | * along with this program; if not, write to the Free Software | |
| * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A | | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A | |
| */ | | */ | |
| | | | |
| /* | | /* | |
|
| * $Author: llundin $ | | * $Author: cizzo $ | |
| * $Date: 2008/07/21 08:48:40 $ | | * $Date: 2008/12/19 13:48:36 $ | |
| * $Revision: 1.12 $ | | * $Revision: 1.16 $ | |
| * $Name: cpl-4_2_0b3 $ | | * $Name: cpl-5_0_0 $ | |
| */ | | */ | |
| | | | |
| #ifndef CPL_IMAGE_RESAMPLE_H | | #ifndef CPL_IMAGE_RESAMPLE_H | |
| #define CPL_IMAGE_RESAMPLE_H | | #define CPL_IMAGE_RESAMPLE_H | |
| | | | |
| /*-------------------------------------------------------------------------
---- | | /*-------------------------------------------------------------------------
---- | |
| Includes | | Includes | |
| --------------------------------------------------------------------------
---*/ | | --------------------------------------------------------------------------
---*/ | |
| | | | |
| #include <stdio.h> | | #include <stdio.h> | |
| | | | |
| skipping to change at line 50 | | skipping to change at line 50 | |
| #include <cpl_matrix.h> | | #include <cpl_matrix.h> | |
| #include <cpl_polynomial.h> | | #include <cpl_polynomial.h> | |
| #include <cpl_vector.h> | | #include <cpl_vector.h> | |
| | | | |
| /*-------------------------------------------------------------------------
---- | | /*-------------------------------------------------------------------------
---- | |
| Function prototypes | | Function prototypes | |
| --------------------------------------------------------------------------
---*/ | | --------------------------------------------------------------------------
---*/ | |
| | | | |
| CPL_BEGIN_DECLS | | CPL_BEGIN_DECLS | |
| | | | |
|
| /* Polynomial warping function */ | | | |
| cpl_error_code cpl_image_warp_polynomial(cpl_image *, const cpl_image *, | | cpl_error_code cpl_image_warp_polynomial(cpl_image *, const cpl_image *, | |
| const cpl_polynomial *, | | const cpl_polynomial *, | |
| const cpl_polynomial *, | | const cpl_polynomial *, | |
| const cpl_vector *, double, | | const cpl_vector *, double, | |
| const cpl_vector *, double); | | const cpl_vector *, double); | |
|
| | | | |
| cpl_error_code cpl_image_warp(cpl_image *, const cpl_image *, | | cpl_error_code cpl_image_warp(cpl_image *, const cpl_image *, | |
| const cpl_image *, | | const cpl_image *, | |
| const cpl_image *, | | const cpl_image *, | |
| const cpl_vector *, double, | | const cpl_vector *, double, | |
| const cpl_vector *, double); | | const cpl_vector *, double); | |
| | | | |
|
| /* Sub sampling function */ | | cpl_error_code cpl_image_fill_jacobian_polynomial(cpl_image *, | |
| cpl_image * cpl_image_extract_subsample(const cpl_image *, int, int); | | const cpl_polynomial *pol | |
| | | y_x, | |
| | | const cpl_polynomial *pol | |
| | | y_y); | |
| | | | |
| | | cpl_error_code cpl_image_fill_jacobian(cpl_image *, | |
| | | const cpl_image *deltax, | |
| | | const cpl_image *deltay); | |
| | | | |
| | | cpl_image *cpl_image_extract_subsample(const cpl_image*, int, int); | |
| | | | |
| | | cpl_image *cpl_image_rebin(const cpl_image *, int, int, int, int); | |
| | | | |
|
| /* Pixel interpolation function */ | | | |
| double cpl_image_get_interpolated(const cpl_image *, double, double, | | double cpl_image_get_interpolated(const cpl_image *, double, double, | |
| const cpl_vector *, double, | | const cpl_vector *, double, | |
| const cpl_vector *, double, double *); | | const cpl_vector *, double, double *); | |
| | | | |
| CPL_END_DECLS | | CPL_END_DECLS | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 6 change blocks. |
| 9 lines changed or deleted | | 19 lines changed or added | |
|
| cpl_image_stats.h | | cpl_image_stats.h | |
|
| /* $Id: cpl_image_stats.h,v 1.24 2008/07/21 08:48:39 llundin Exp $ | | /* $Id: cpl_image_stats.h,v 1.26 2008/10/17 14:24:01 llundin Exp $ | |
| * | | * | |
| * This file is part of the ESO Common Pipeline Library | | * This file is part of the ESO Common Pipeline Library | |
| * Copyright (C) 2001-2008 European Southern Observatory | | * Copyright (C) 2001-2008 European Southern Observatory | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * 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 | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| | | | |
| skipping to change at line 23 | | skipping to change at line 23 | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| * GNU General Public License for more details. | | * GNU General Public License for more details. | |
| * | | * | |
| * You should have received a copy of the GNU General Public License | | * You should have received a copy of the GNU General Public License | |
| * along with this program; if not, write to the Free Software | | * along with this program; if not, write to the Free Software | |
| * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A | | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A | |
| */ | | */ | |
| | | | |
| /* | | /* | |
| * $Author: llundin $ | | * $Author: llundin $ | |
|
| * $Date: 2008/07/21 08:48:39 $ | | * $Date: 2008/10/17 14:24:01 $ | |
| * $Revision: 1.24 $ | | * $Revision: 1.26 $ | |
| * $Name: cpl-4_2_0b3 $ | | * $Name: cpl-5_0_0 $ | |
| */ | | */ | |
| | | | |
| #ifndef CPL_IMAGE_STATS_H | | #ifndef CPL_IMAGE_STATS_H | |
| #define CPL_IMAGE_STATS_H | | #define CPL_IMAGE_STATS_H | |
| | | | |
| /*-------------------------------------------------------------------------
---- | | /*-------------------------------------------------------------------------
---- | |
| Includes | | Includes | |
| --------------------------------------------------------------------------
---*/ | | --------------------------------------------------------------------------
---*/ | |
| | | | |
| #include "cpl_image.h" | | #include "cpl_image.h" | |
| | | | |
| CPL_BEGIN_DECLS | | CPL_BEGIN_DECLS | |
| | | | |
| /*-------------------------------------------------------------------------
---- | | /*-------------------------------------------------------------------------
---- | |
| Function prototypes | | Function prototypes | |
| --------------------------------------------------------------------------
---*/ | | --------------------------------------------------------------------------
---*/ | |
| | | | |
|
| double cpl_image_get_min(const cpl_image *) ; | | double cpl_image_get_min(const cpl_image *); | |
| double cpl_image_get_min_window(const cpl_image *, int, int, | | double cpl_image_get_min_window(const cpl_image *, int, int, int, int); | |
| int, int) ; | | | |
| double cpl_image_get_max(const cpl_image *) ; | | | |
| double cpl_image_get_max_window(const cpl_image *, int, int, | | | |
| int, int) ; | | | |
| double cpl_image_get_mean(const cpl_image *) ; | | | |
| double cpl_image_get_mean_window(const cpl_image *, int, int, | | | |
| int, int) ; | | | |
| double cpl_image_get_median(const cpl_image *) ; | | | |
| double cpl_image_get_median_window(const cpl_image *, int, int, | | | |
| int, int) ; | | | |
| double cpl_image_get_stdev(const cpl_image *) ; | | | |
| double cpl_image_get_stdev_window(const cpl_image *, int, int, | | | |
| int, int) ; | | | |
| double cpl_image_get_flux(const cpl_image *) ; | | | |
| double cpl_image_get_flux_window(const cpl_image *, int, int, | | | |
| int, int) ; | | | |
| double cpl_image_get_absflux(const cpl_image *) ; | | | |
| double cpl_image_get_absflux_window(const cpl_image *, int, int, | | | |
| int, int) ; | | | |
| double cpl_image_get_sqflux(const cpl_image *) ; | | | |
| double cpl_image_get_sqflux_window(const cpl_image *, int, int, | | | |
| int, int) ; | | | |
| double cpl_image_get_centroid_x_window(const cpl_image *, int, int, | | | |
| int, int) ; | | | |
| double cpl_image_get_centroid_y_window(const cpl_image *, int, int, | | | |
| int, int) ; | | | |
| cpl_error_code cpl_image_get_minpos(const cpl_image *, int *, int *) ; | | | |
| cpl_error_code cpl_image_get_minpos_window(const cpl_image *, int, | | | |
| int, int, int, int *, int *) ; | | | |
| cpl_error_code cpl_image_get_maxpos(const cpl_image *, int *, int *) ; | | | |
| cpl_error_code cpl_image_get_maxpos_window(const cpl_image *, int, | | | |
| int, int, int, int *, int *) ; | | | |
| | | | |
|
| double cpl_image_get_median_dev(const cpl_image *, double *) ; | | double cpl_image_get_max(const cpl_image *); | |
| | | double cpl_image_get_max_window(const cpl_image *, int, int, int, int); | |
| | | | |
| | | double cpl_image_get_mean(const cpl_image *); | |
| | | double cpl_image_get_mean_window(const cpl_image *, int, int, int, int); | |
| | | | |
| | | double cpl_image_get_median(const cpl_image *); | |
| | | double cpl_image_get_median_window(const cpl_image *, int, int, int, int); | |
| | | | |
| | | double cpl_image_get_stdev(const cpl_image *); | |
| | | double cpl_image_get_stdev_window(const cpl_image *, int, int, int, int); | |
| | | | |
| | | double cpl_image_get_flux(const cpl_image *); | |
| | | double cpl_image_get_flux_window(const cpl_image *, int, int, int, int); | |
| | | | |
| | | double cpl_image_get_absflux(const cpl_image *); | |
| | | double cpl_image_get_absflux_window(const cpl_image *, int, int, int, int); | |
| | | | |
| | | double cpl_image_get_sqflux(const cpl_image *); | |
| | | double cpl_image_get_sqflux_window(const cpl_image *, int, int, int, int); | |
| | | | |
| | | double cpl_image_get_centroid_x(const cpl_image *); | |
| | | double cpl_image_get_centroid_x_window(const cpl_image *, int, int, int, in | |
| | | t); | |
| | | | |
| | | double cpl_image_get_centroid_y(const cpl_image *); | |
| | | double cpl_image_get_centroid_y_window(const cpl_image *, int, int, int, in | |
| | | t); | |
| | | | |
| | | cpl_error_code cpl_image_get_minpos(const cpl_image *, int *, int *); | |
| | | cpl_error_code cpl_image_get_minpos_window(const cpl_image *, int, int, | |
| | | int, int, int *, int *); | |
| | | cpl_error_code cpl_image_get_maxpos(const cpl_image *, int *, int *); | |
| | | cpl_error_code cpl_image_get_maxpos_window(const cpl_image *, int, int, | |
| | | int, int, int *, int *); | |
| | | | |
| | | double cpl_image_get_median_dev(const cpl_image *, double *); | |
| | | double cpl_image_get_median_dev_window(const cpl_image *, int, int, int, in | |
| | | t, | |
| | | double *); | |
| | | | |
| CPL_END_DECLS | | CPL_END_DECLS | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 4 change blocks. |
| 39 lines changed or deleted | | 46 lines changed or added | |
|
| cpl_imagelist_basic.h | | cpl_imagelist_basic.h | |
|
| /* $Id: cpl_imagelist_basic.h,v 1.17 2008/07/21 08:48:40 llundin Exp $ | | /* $Id: cpl_imagelist_basic.h,v 1.19 2009/02/03 14:18:11 lbilbao Exp $ | |
| * | | * | |
| * This file is part of the ESO Common Pipeline Library | | * This file is part of the ESO Common Pipeline Library | |
| * Copyright (C) 2001-2008 European Southern Observatory | | * Copyright (C) 2001-2008 European Southern Observatory | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * 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 | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| * GNU General Public License for more details. | | * GNU General Public License for more details. | |
| * | | * | |
| * You should have received a copy of the GNU General Public License | | * You should have received a copy of the GNU General Public License | |
| * along with this program; if not, write to the Free Software | | * along with this program; if not, write to the Free Software | |
| * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A | | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A | |
| */ | | */ | |
| | | | |
| /* | | /* | |
|
| * $Author: llundin $ | | * $Author: lbilbao $ | |
| * $Date: 2008/07/21 08:48:40 $ | | * $Date: 2009/02/03 14:18:11 $ | |
| * $Revision: 1.17 $ | | * $Revision: 1.19 $ | |
| * $Name: cpl-4_2_0b3 $ | | * $Name: cpl-5_0_0 $ | |
| */ | | */ | |
| | | | |
| #ifndef CPL_IMAGELIST_BASIC_H | | #ifndef CPL_IMAGELIST_BASIC_H | |
| #define CPL_IMAGELIST_BASIC_H | | #define CPL_IMAGELIST_BASIC_H | |
| | | | |
| /*-------------------------------------------------------------------------
---- | | /*-------------------------------------------------------------------------
---- | |
| Includes | | Includes | |
| --------------------------------------------------------------------------
---*/ | | --------------------------------------------------------------------------
---*/ | |
| | | | |
| #include "cpl_image.h" | | #include "cpl_image.h" | |
| | | | |
| skipping to change at line 71 | | skipping to change at line 71 | |
| cpl_error_code cpl_imagelist_add_image(cpl_imagelist *, const cpl_image *)
; | | cpl_error_code cpl_imagelist_add_image(cpl_imagelist *, const cpl_image *)
; | |
| cpl_error_code cpl_imagelist_subtract_image(cpl_imagelist *, const cpl_imag
e *); | | cpl_error_code cpl_imagelist_subtract_image(cpl_imagelist *, const cpl_imag
e *); | |
| cpl_error_code cpl_imagelist_multiply_image(cpl_imagelist *, const cpl_imag
e *); | | cpl_error_code cpl_imagelist_multiply_image(cpl_imagelist *, const cpl_imag
e *); | |
| cpl_error_code cpl_imagelist_divide_image(cpl_imagelist *, const cpl_image
*) ; | | cpl_error_code cpl_imagelist_divide_image(cpl_imagelist *, const cpl_image
*) ; | |
| | | | |
| cpl_error_code cpl_imagelist_add_scalar(cpl_imagelist *, double) ; | | cpl_error_code cpl_imagelist_add_scalar(cpl_imagelist *, double) ; | |
| cpl_error_code cpl_imagelist_subtract_scalar(cpl_imagelist *, double) ; | | cpl_error_code cpl_imagelist_subtract_scalar(cpl_imagelist *, double) ; | |
| cpl_error_code cpl_imagelist_multiply_scalar(cpl_imagelist *, double) ; | | cpl_error_code cpl_imagelist_multiply_scalar(cpl_imagelist *, double) ; | |
| cpl_error_code cpl_imagelist_divide_scalar(cpl_imagelist *, double) ; | | cpl_error_code cpl_imagelist_divide_scalar(cpl_imagelist *, double) ; | |
| cpl_error_code cpl_imagelist_exponential(cpl_imagelist *, double) ; | | cpl_error_code cpl_imagelist_exponential(cpl_imagelist *, double) ; | |
|
| | | cpl_error_code cpl_imagelist_power(cpl_imagelist *, double) ; | |
| cpl_error_code cpl_imagelist_logarithm(cpl_imagelist *, double) ; | | cpl_error_code cpl_imagelist_logarithm(cpl_imagelist *, double) ; | |
| | | | |
| cpl_error_code cpl_imagelist_normalise(cpl_imagelist *, cpl_norm) ; | | cpl_error_code cpl_imagelist_normalise(cpl_imagelist *, cpl_norm) ; | |
| cpl_error_code cpl_imagelist_threshold(cpl_imagelist *, double, double, dou
ble, | | cpl_error_code cpl_imagelist_threshold(cpl_imagelist *, double, double, dou
ble, | |
| double) ; | | double) ; | |
| cpl_imagelist * cpl_imagelist_swap_axis_create(const cpl_imagelist *, | | cpl_imagelist * cpl_imagelist_swap_axis_create(const cpl_imagelist *, | |
| cpl_swap_axis) ; | | cpl_swap_axis) ; | |
| | | | |
| /* Imagelist to image functions */ | | /* Imagelist to image functions */ | |
| cpl_image * cpl_image_new_from_accepted(const cpl_imagelist *) ; | | cpl_image * cpl_image_new_from_accepted(const cpl_imagelist *) ; | |
| cpl_image * cpl_imagelist_collapse_create(const cpl_imagelist *) ; | | cpl_image * cpl_imagelist_collapse_create(const cpl_imagelist *) ; | |
| cpl_image * cpl_imagelist_collapse_median_create(const cpl_imagelist *) ; | | cpl_image * cpl_imagelist_collapse_median_create(const cpl_imagelist *) ; | |
| cpl_image * cpl_imagelist_collapse_minmax_create(const cpl_imagelist *,int,
int); | | cpl_image * cpl_imagelist_collapse_minmax_create(const cpl_imagelist *,int,
int); | |
|
| cpl_image * cpl_imagelist_collapse_sigclip_create(const cpl_imagelist *,dou | | cpl_image * cpl_imagelist_collapse_sigclip_create(const cpl_imagelist *, | |
| ble); | | double, double, double, unsigned, cpl_image *); | |
| | | | |
| CPL_END_DECLS | | CPL_END_DECLS | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 4 change blocks. |
| 7 lines changed or deleted | | 8 lines changed or added | |
|
| cpl_imagelist_io.h | | cpl_imagelist_io.h | |
|
| /* $Id: cpl_imagelist_io.h,v 1.20 2008/07/21 08:48:40 llundin Exp $ | | /* $Id: cpl_imagelist_io.h,v 1.21 2008/11/07 10:39:18 lbilbao Exp $ | |
| * | | * | |
| * This file is part of the ESO Common Pipeline Library | | * This file is part of the ESO Common Pipeline Library | |
| * Copyright (C) 2001-2008 European Southern Observatory | | * Copyright (C) 2001-2008 European Southern Observatory | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * 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 | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| * GNU General Public License for more details. | | * GNU General Public License for more details. | |
| * | | * | |
| * You should have received a copy of the GNU General Public License | | * You should have received a copy of the GNU General Public License | |
| * along with this program; if not, write to the Free Software | | * along with this program; if not, write to the Free Software | |
| * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A | | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A | |
| */ | | */ | |
| | | | |
| /* | | /* | |
|
| * $Author: llundin $ | | * $Author: lbilbao $ | |
| * $Date: 2008/07/21 08:48:40 $ | | * $Date: 2008/11/07 10:39:18 $ | |
| * $Revision: 1.20 $ | | * $Revision: 1.21 $ | |
| * $Name: cpl-4_2_0b3 $ | | * $Name: cpl-5_0_0 $ | |
| */ | | */ | |
| | | | |
| #ifndef CPL_IMAGELIST_IO_H | | #ifndef CPL_IMAGELIST_IO_H | |
| #define CPL_IMAGELIST_IO_H | | #define CPL_IMAGELIST_IO_H | |
| | | | |
| /*-------------------------------------------------------------------------
---- | | /*-------------------------------------------------------------------------
---- | |
| Includes | | Includes | |
| --------------------------------------------------------------------------
---*/ | | --------------------------------------------------------------------------
---*/ | |
| | | | |
| #include "cpl_image.h" | | #include "cpl_image.h" | |
| | | | |
| skipping to change at line 66 | | skipping to change at line 66 | |
| cpl_image * cpl_imagelist_unset(cpl_imagelist *, int) ; | | cpl_image * cpl_imagelist_unset(cpl_imagelist *, int) ; | |
| | | | |
| /* Imagelist destructor */ | | /* Imagelist destructor */ | |
| void cpl_imagelist_delete(cpl_imagelist *) ; | | void cpl_imagelist_delete(cpl_imagelist *) ; | |
| | | | |
| /* Others */ | | /* Others */ | |
| cpl_imagelist * cpl_imagelist_duplicate(const cpl_imagelist *) ; | | cpl_imagelist * cpl_imagelist_duplicate(const cpl_imagelist *) ; | |
| cpl_error_code cpl_imagelist_erase(cpl_imagelist *, const cpl_vector *) ; | | cpl_error_code cpl_imagelist_erase(cpl_imagelist *, const cpl_vector *) ; | |
| int cpl_imagelist_is_uniform(const cpl_imagelist *) ; | | int cpl_imagelist_is_uniform(const cpl_imagelist *) ; | |
| | | | |
|
| | | cpl_error_code cpl_imagelist_dump_structure(const cpl_imagelist *, FILE *); | |
| | | cpl_error_code cpl_imagelist_dump_window(const cpl_imagelist *, | |
| | | int, int, int, int, FILE *); | |
| | | | |
| /* Saving function */ | | /* Saving function */ | |
| cpl_error_code cpl_imagelist_save(const cpl_imagelist *, const char *, | | cpl_error_code cpl_imagelist_save(const cpl_imagelist *, const char *, | |
| cpl_type_bpp, const cpl_propertylist *, | | cpl_type_bpp, const cpl_propertylist *, | |
| unsigned); | | unsigned); | |
| CPL_END_DECLS | | CPL_END_DECLS | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 3 change blocks. |
| 5 lines changed or deleted | | 9 lines changed or added | |
|
| cpl_polynomial.h | | cpl_polynomial.h | |
|
| /* $Id: cpl_polynomial.h,v 1.33 2008/07/21 08:48:40 llundin Exp $ | | /* $Id: cpl_polynomial.h,v 1.34 2009/01/21 14:07:37 llundin Exp $ | |
| * | | * | |
| * This file is part of the ESO Common Pipeline Library | | * This file is part of the ESO Common Pipeline Library | |
| * Copyright (C) 2001-2008 European Southern Observatory | | * Copyright (C) 2001-2008 European Southern Observatory | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * 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 | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| | | | |
| skipping to change at line 23 | | skipping to change at line 23 | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| * GNU General Public License for more details. | | * GNU General Public License for more details. | |
| * | | * | |
| * You should have received a copy of the GNU General Public License | | * You should have received a copy of the GNU General Public License | |
| * along with this program; if not, write to the Free Software | | * along with this program; if not, write to the Free Software | |
| * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A | | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A | |
| */ | | */ | |
| | | | |
| /* | | /* | |
| * $Author: llundin $ | | * $Author: llundin $ | |
|
| * $Date: 2008/07/21 08:48:40 $ | | * $Date: 2009/01/21 14:07:37 $ | |
| * $Revision: 1.33 $ | | * $Revision: 1.34 $ | |
| * $Name: cpl-4_2_0b3 $ | | * $Name: cpl-5_0_0 $ | |
| */ | | */ | |
| | | | |
| #ifndef CPL_POLYNOMIAL_H | | #ifndef CPL_POLYNOMIAL_H | |
| #define CPL_POLYNOMIAL_H | | #define CPL_POLYNOMIAL_H | |
| | | | |
| /*-------------------------------------------------------------------------
---- | | /*-------------------------------------------------------------------------
---- | |
| Includes | | Includes | |
| --------------------------------------------------------------------------
---*/ | | --------------------------------------------------------------------------
---*/ | |
| | | | |
| #include <stdio.h> | | #include <stdio.h> | |
| | | | |
| skipping to change at line 101 | | skipping to change at line 101 | |
| | | | |
| /* Basic operations on 1d-polynomials */ | | /* Basic operations on 1d-polynomials */ | |
| double cpl_polynomial_eval_1d(const cpl_polynomial *, double, double *); | | double cpl_polynomial_eval_1d(const cpl_polynomial *, double, double *); | |
| double cpl_polynomial_eval_1d_diff(const cpl_polynomial *, double, double, | | double cpl_polynomial_eval_1d_diff(const cpl_polynomial *, double, double, | |
| double *); | | double *); | |
| cpl_error_code cpl_vector_fill_polynomial(cpl_vector *, const cpl_polynomia
l *, | | cpl_error_code cpl_vector_fill_polynomial(cpl_vector *, const cpl_polynomia
l *, | |
| double, double); | | double, double); | |
| cpl_error_code cpl_polynomial_solve_1d(const cpl_polynomial *, double, doub
le *, | | cpl_error_code cpl_polynomial_solve_1d(const cpl_polynomial *, double, doub
le *, | |
| int); | | int); | |
| | | | |
|
| cpl_error_code cpl_polynomial_shift_1d(cpl_polynomial *, double); | | cpl_error_code cpl_polynomial_shift_1d(cpl_polynomial *, int, double); | |
| cpl_polynomial * cpl_polynomial_fit_1d_create(const cpl_vector *, | | cpl_polynomial * cpl_polynomial_fit_1d_create(const cpl_vector *, | |
| const cpl_vector *, | | const cpl_vector *, | |
| int, double *) | | int, double *) | |
| #ifdef __GNUC__ | | #ifdef __GNUC__ | |
| __attribute__((deprecated)) | | __attribute__((deprecated)) | |
| #endif | | #endif | |
| ; | | ; | |
| | | | |
| /* Basic operations on 2d-polynomials */ | | /* Basic operations on 2d-polynomials */ | |
| cpl_polynomial * cpl_polynomial_fit_2d_create(cpl_bivector *, cpl_vector *, | | cpl_polynomial * cpl_polynomial_fit_2d_create(cpl_bivector *, cpl_vector *, | |
| | | | |
End of changes. 3 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| cpl_recipedefine.h | | cpl_recipedefine.h | |
|
| /* $Id: cpl_recipedefine.h,v 1.2 2008/02/12 09:09:51 llundin Exp $ | | /* $Id: cpl_recipedefine.h,v 1.6 2008/11/10 14:01:36 llundin Exp $ | |
| * | | * | |
| * This file is part of the ESO Common Pipeline Library | | * This file is part of the ESO Common Pipeline Library | |
| * Copyright (C) 2001-2006 European Southern Observatory | | * Copyright (C) 2001-2006 European Southern Observatory | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * 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 | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| | | | |
| skipping to change at line 23 | | skipping to change at line 23 | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| * GNU General Public License for more details. | | * GNU General Public License for more details. | |
| * | | * | |
| * You should have received a copy of the GNU General Public License | | * You should have received a copy of the GNU General Public License | |
| * along with this program; if not, write to the Free Software | | * along with this program; if not, write to the Free Software | |
| * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 U
SA | | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 U
SA | |
| */ | | */ | |
| | | | |
| /* | | /* | |
| * $Author: llundin $ | | * $Author: llundin $ | |
|
| * $Date: 2008/02/12 09:09:51 $ | | * $Date: 2008/11/10 14:01:36 $ | |
| * $Revision: 1.2 $ | | * $Revision: 1.6 $ | |
| * $Name: cpl-4_2_0b3 $ | | * $Name: cpl-5_0_0 $ | |
| */ | | */ | |
| | | | |
|
| #ifndef CPL_PLUGINDEFINE_H | | #ifndef CPL_RECIPEDEFINE_H | |
| #define CPL_PLUGINDEFINE_H | | #define CPL_RECIPEDEFINE_H | |
| | | | |
| /*-------------------------------------------------------------------------
---- | | /*-------------------------------------------------------------------------
---- | |
| Includes | | Includes | |
| --------------------------------------------------------------------------
---*/ | | --------------------------------------------------------------------------
---*/ | |
| | | | |
| #include <cpl_recipe.h> | | #include <cpl_recipe.h> | |
| #include <cpl_plugininfo.h> | | #include <cpl_plugininfo.h> | |
| #include <cpl_version.h> | | #include <cpl_version.h> | |
|
| #include <cpl_memory.h> | | | |
| #include <cpl_errorstate.h> | | #include <cpl_errorstate.h> | |
| | | | |
|
| /* For CPL version number inconsistency */ | | | |
| #include <cpl_msg.h> | | | |
| | | | |
| /*-------------------------------------------------------------------------
---- | | /*-------------------------------------------------------------------------
---- | |
| Define | | Define | |
| --------------------------------------------------------------------------
---*/ | | --------------------------------------------------------------------------
---*/ | |
| | | | |
| #ifndef CPL_CONCAT | | #ifndef CPL_CONCAT | |
| /* Needed to concatenate two macro arguments */ | | /* Needed to concatenate two macro arguments */ | |
| #define CPL_CONCAT(a,b) a ## _ ## b | | #define CPL_CONCAT(a,b) a ## _ ## b | |
| #define CPL_CONCAT2X(a,b) CPL_CONCAT(a,b) | | #define CPL_CONCAT2X(a,b) CPL_CONCAT(a,b) | |
| #endif | | #endif | |
| | | | |
|
| /* A macro to generate the recipe copyright and license */ | | /*------------------------------------------------------------------------- | |
| | | ---*/ | |
| | | /** | |
| | | @ingroup cpl_recipedefine | |
| | | @brief generate the recipe copyright and license text | |
| | | @param PACKAGE_NAME The name as a string literal, e.g. from config.h | |
| | | @param YEAR The year(s) as a string literal | |
| | | @return The recipe copyright and license text as a string literal | |
| | | | |
| | | Example: | |
| | | @code | |
| | | const char * my_license = cpl_get_license(PACKAGE_NAME, "2005, 2008"); | |
| | | @endcode | |
| | | | |
| | | */ | |
| | | /*------------------------------------------------------------------------- | |
| | | ---*/ | |
| | | | |
| #define cpl_get_license(PACKAGE_NAME, YEAR)
\ | | #define cpl_get_license(PACKAGE_NAME, YEAR)
\ | |
| "This file is part of the " PACKAGE_NAME "\n"
\ | | "This file is part of the " PACKAGE_NAME "\n"
\ | |
| "Copyright (C) " YEAR " European Southern Observatory\n"
\ | | "Copyright (C) " YEAR " European Southern Observatory\n"
\ | |
| "\n"
\ | | "\n"
\ | |
| "This program is free software; you can redistribute it and/or modify\n
" \ | | "This program is free software; you can redistribute it and/or modify\n
" \ | |
| "it under the terms of the GNU General Public License as published by\n
" \ | | "it under the terms of the GNU General Public License as published by\n
" \ | |
| "the Free Software Foundation; either version 2 of the License, or\n"
\ | | "the Free Software Foundation; either version 2 of the License, or\n"
\ | |
| "(at your option) any later version.\n"
\ | | "(at your option) any later version.\n"
\ | |
| "\n"
\ | | "\n"
\ | |
| "This program is distributed in the hope that it will be useful,\n"
\ | | "This program is distributed in the hope that it will be useful,\n"
\ | |
| | | | |
| skipping to change at line 76 | | skipping to change at line 87 | |
| "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
\ | | "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
\ | |
| "GNU General Public License for more details.\n"
\ | | "GNU General Public License for more details.\n"
\ | |
| "\n"
\ | | "\n"
\ | |
| "You should have received a copy of the GNU General Public License\n"
\ | | "You should have received a copy of the GNU General Public License\n"
\ | |
| "along with this program; if not, write to the Free Software\n"
\ | | "along with this program; if not, write to the Free Software\n"
\ | |
| "Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, \n"
\ | | "Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, \n"
\ | |
| "MA 02111-1307 USA" | | "MA 02111-1307 USA" | |
| | | | |
| /*-------------------------------------------------------------------------
---*/ | | /*-------------------------------------------------------------------------
---*/ | |
| /** | | /** | |
|
| | | @ingroup cpl_recipedefine | |
| @brief Define a standard CPL recipe | | @brief Define a standard CPL recipe | |
|
| @param RECIPE_NAME The name as an identifier | | @param RECIPE_NAME The name as an identifier | |
| @param RECIPE_VERSION The binary version number | | @param RECIPE_VERSION The binary version number | |
| @param RECIPE_FILL_PARAMS A function call to fill the recipe parameter | | @param RECIPE_FILL_PARAMS A function call to fill the recipe paramete | |
| list. | | rlist | |
| Must evaluate to zero if and only if success | | Must evaluate to zero if and only if succes | |
| ful | | sful | |
| @param RECIPE_AUTHOR The author as a string literal | | @param RECIPE_AUTHOR The author as a string literal | |
| @param RECIPE_YEAR The copyright year as a string literal | | @param RECIPE_AUTHOR_EMAIL The author email as a string literal | |
| @param RECIPE_SYNOPSIS The synopsis as a string literal | | @param RECIPE_YEAR The copyright year as a string literal | |
| @param RECIPE_DESCRIPTION The man-page as a string literal | | @param RECIPE_SYNOPSIS The synopsis as a string literal | |
| | | @param RECIPE_DESCRIPTION The man-page as a string literal | |
| | | | |
| A CPL-based recipe may use this macro to define its four mandatory | | A CPL-based recipe may use this macro to define its four mandatory | |
|
| functions: cpl_plugin_get_info(), <recipe>_create(), <recipe>_exec() and | | functions: cpl_plugin_get_info(), \<recipe\>_create(), \<recipe\>_exec() | |
| <recipe>_destroy(), as well as declaring the actual data reduction | | and | |
| function, <recipe>() as | | \<recipe\>_destroy(), as well as declaring the actual data reduction | |
| | | function, \<recipe\>() as | |
| @code | | @code | |
| | | | |
| static int <recipe>(cpl_frameset *, const cpl_parameterlist *); | | static int <recipe>(cpl_frameset *, const cpl_parameterlist *); | |
| | | | |
| @endcode | | @endcode | |
| | | | |
| This may be done by defining a macro, e.g. in my_recipe.h: | | This may be done by defining a macro, e.g. in my_recipe.h: | |
| | | | |
| @code | | @code | |
| | | | |
|
| #define MY_RECIPE_DEFINE(NAME, FILL_PARAMS_FUNC, SYNOPSIS, DESCRIPTION) | | #define MY_RECIPE_DEFINE(NAME, FILL_PARAMS_FUNC, SYNOPSIS, DESCRIPTION) | |
| \ | | \ | |
| CPL_RECIPE_DEFINE(NAME, MY_BINARY_VERSION, | | CPL_RECIPE_DEFINE(NAME, MY_BINARY_VERSION, | |
| \ | | \ | |
| FILL_PARAMS_FUNC(recipe->parameters), | | FILL_PARAMS_FUNC(recipe->parameters), | |
| \ | | \ | |
| "Firstname Lastname", "2006, 2008", SYNOPSIS, DESCRIPTION) \ | | "Firstname Lastname", "2006, 2008", SYNOPSIS, DESCRIPTION) | |
| | | | |
| @endcode | | @endcode | |
| | | | |
| - and then by invoking this macro in each recipe: | | - and then by invoking this macro in each recipe: | |
| | | | |
| @code | | @code | |
| | | | |
| #include "my_recipe.h" | | #include "my_recipe.h" | |
| | | | |
| MY_RECIPE_DEFINE(instrume_img_dark, | | MY_RECIPE_DEFINE(instrume_img_dark, | |
| | | | |
| skipping to change at line 141 | | skipping to change at line 154 | |
| /* The prototypes of the recipe create, exec and destroy functions */
\ | | /* The prototypes of the recipe create, exec and destroy functions */
\ | |
| static int CPL_CONCAT2X(RECIPE_NAME,create) (cpl_plugin * plugin);
\ | | static int CPL_CONCAT2X(RECIPE_NAME,create) (cpl_plugin * plugin);
\ | |
| static int CPL_CONCAT2X(RECIPE_NAME,exec) (cpl_plugin * plugin);
\ | | static int CPL_CONCAT2X(RECIPE_NAME,exec) (cpl_plugin * plugin);
\ | |
| static int CPL_CONCAT2X(RECIPE_NAME,destroy)(cpl_plugin * plugin);
\ | | static int CPL_CONCAT2X(RECIPE_NAME,destroy)(cpl_plugin * plugin);
\ | |
|
\ | |
\ | |
| /* The prototype of the function called by the recipe exec function */
\ | | /* The prototype of the function called by the recipe exec function */
\ | |
| static int RECIPE_NAME(cpl_frameset *, const cpl_parameterlist *);
\ | | static int RECIPE_NAME(cpl_frameset *, const cpl_parameterlist *);
\ | |
|
\ | |
\ | |
| int cpl_plugin_get_info(cpl_pluginlist * list)
\ | | int cpl_plugin_get_info(cpl_pluginlist * list)
\ | |
| {
\ | | {
\ | |
|
| cpl_recipe * recipe; | | /* Propagate error, if any. Return 1 on failure */ | |
| \ | | \ | |
| cpl_plugin * plugin; | | return cpl_recipedefine_init(list, CPL_VERSION_CODE, | |
| \ | | \ | |
| /* Verify that the compile-time and run-time versions of CPL match */ | | RECIPE_VERSION, | |
| \ | | \ | |
| /* - this will work for run-time versions going back to CPL 3.0 */ | | #RECIPE_NAME, | |
| \ | | \ | |
| /* - earlier versions will cause an exit with an unresolved symbol */ | | RECIPE_SYNOPSIS, | |
| \ | | \ | |
| const unsigned vruntime = CPL_VERSION(cpl_version_get_major(), | | RECIPE_DESCRIPTION, | |
| \ | | \ | |
| cpl_version_get_minor(), | | RECIPE_AUTHOR, | |
| \ | | \ | |
| cpl_version_get_micro()); | | RECIPE_AUTHOR_EMAIL, | |
| \ | | \ | |
| /* The version number of the first major version */ | | cpl_get_license(PACKAGE_NAME, RECIPE_YEAR), | |
| \ | | \ | |
| const unsigned vmruntime = CPL_VERSION(cpl_version_get_major(), 0, 0); | | CPL_CONCAT2X(RECIPE_NAME,create), | |
| \ | | \ | |
| | | CPL_CONCAT2X(RECIPE_NAME,exec), | |
| \ | | \ | |
| | | CPL_CONCAT2X(RECIPE_NAME,destroy)) | |
| \ | | \ | |
| if (vruntime < CPL_VERSION_CODE) { | | ? ((void)cpl_error_set(cpl_func, cpl_error_get_code()), 1) : 0; | |
| \ | | \ | |
| cpl_msg_warning(cpl_func, "Run-time version %s of CPL is lower than | | | |
| " \ | | | |
| "the compile-time version (%X)", | | | |
| \ | | | |
| cpl_version_get_version(), CPL_VERSION_CODE); | | | |
| \ | | | |
| } else if (vmruntime > CPL_VERSION_CODE) { | | | |
| \ | | | |
| cpl_msg_warning(cpl_func, "Run-time version %s of CPL has a newer " | | | |
| \ | | | |
| "major version than the compile-time version (%X)", | | | |
| \ | | | |
| cpl_version_get_version(), CPL_VERSION_CODE); | | | |
| \ | | | |
| } else if (vruntime > CPL_VERSION_CODE) { | | | |
| \ | | | |
| cpl_msg_info(cpl_func, "Run-time version %s of CPL is higher than " | | | |
| \ | | | |
| "the compile-time version (%X)", | | | |
| \ | | | |
| cpl_version_get_version(), CPL_VERSION_CODE); | | | |
| \ | | | |
| } | | | |
| \ | | | |
| | | | |
| \ | | | |
| recipe = cpl_calloc(1, sizeof(*recipe)); | | | |
| \ | | | |
| if (recipe == NULL) { | | | |
| \ | | | |
| (void)cpl_error_set_message(cpl_func, CPL_ERROR_ILLEGAL_OUTPUT, | | | |
| \ | | | |
| "Recipe allocation failed"); | | | |
| \ | | | |
| return 1; | | | |
| \ | | | |
| } | | | |
| \ | | | |
| | | | |
| \ | | | |
| plugin = &recipe->interface; | | | |
| \ | | | |
| | | | |
| \ | | | |
| if (cpl_plugin_init(plugin, | | | |
| \ | | | |
| CPL_PLUGIN_API, | | | |
| \ | | | |
| RECIPE_VERSION, | | | |
| \ | | | |
| CPL_PLUGIN_TYPE_RECIPE, | | | |
| \ | | | |
| #RECIPE_NAME, | | | |
| \ | | | |
| RECIPE_SYNOPSIS, | | | |
| \ | | | |
| RECIPE_DESCRIPTION, | | | |
| \ | | | |
| RECIPE_AUTHOR, | | | |
| \ | | | |
| RECIPE_AUTHOR_EMAIL, | | | |
| \ | | | |
| cpl_get_license(PACKAGE_NAME, RECIPE_YEAR), | | | |
| \ | | | |
| CPL_CONCAT2X(RECIPE_NAME,create), | | | |
| \ | | | |
| CPL_CONCAT2X(RECIPE_NAME,exec), | | | |
| \ | | | |
| CPL_CONCAT2X(RECIPE_NAME,destroy))) { | | | |
| \ | | | |
| (void)cpl_error_set_message(cpl_func, cpl_error_get_code(), | | | |
| \ | | | |
| "Plugin initialization failed"); | | | |
| \ | | | |
| return 1; | | | |
| \ | | | |
| } | | | |
| \ | | | |
| | | | |
| \ | | | |
| if (cpl_pluginlist_append(list, plugin)) { | | | |
| \ | | | |
| (void)cpl_error_set_message(cpl_func, cpl_error_get_code(), | | | |
| \ | | | |
| "Error adding plugin to list"); | | | |
| \ | | | |
| return 1; | | | |
| \ | | | |
| } | | | |
| \ | | | |
| | | | |
| \ | | | |
| return 0; | | | |
| \ | | | |
| }
\ | | }
\ | |
|
\ | |
\ | |
| /* The definition of the recipe create function */
\ | | /* The definition of the recipe create function */
\ | |
| static int CPL_CONCAT2X(RECIPE_NAME,create)(cpl_plugin * plugin)
\ | | static int CPL_CONCAT2X(RECIPE_NAME,create)(cpl_plugin * plugin)
\ | |
| {
\ | | {
\ | |
|
| cpl_recipe * recipe; | | cpl_recipe * recipe = (cpl_recipe *)plugin; /* Needed for the fill | |
| \ | | */ \ | |
| | | cpl_errorstate prestate = cpl_errorstate_get(); /* To check the fill */ | |
| \ | | \ | |
| /* Do not create the recipe if an error code is already set */ | | | |
| \ | | | |
| if (cpl_error_get_code() != CPL_ERROR_NONE) { | | | |
| \ | | | |
| return (int)cpl_error_set_message(cpl_func, cpl_error_get_code(), | | | |
| \ | | | |
| "An error is already set"); | | | |
| \ | | | |
| } | | | |
| \ | | | |
| | | | |
| \ | | | |
| if (plugin == NULL) { | | | |
| \ | | | |
| return (int)cpl_error_set_message(cpl_func, CPL_ERROR_NULL_INPUT, | | | |
| \ | | | |
| "Null plugin"); | | | |
| \ | | | |
| } | | | |
| \ | | | |
| | | | |
| \ | | | |
| /* Verify plugin type */ | | | |
| \ | | | |
| if (cpl_plugin_get_type(plugin) != CPL_PLUGIN_TYPE_RECIPE) { | | | |
| \ | | | |
| return (int)cpl_error_set_message(cpl_func, CPL_ERROR_TYPE_MISMATCH | | | |
| , \ | | | |
| "Plugin is not a recipe"); | | | |
| \ | | | |
| } | | | |
| \ | | | |
| | | | |
| \ | | | |
| /* Get the recipe */ | | | |
| \ | | | |
| recipe = (cpl_recipe *)plugin; | | | |
| \ | | | |
| | | | |
| \ | | | |
| /* Create the parameters list in the cpl_recipe object */ | | | |
| \ | | | |
| recipe->parameters = cpl_parameterlist_new(); | | | |
| \ | | | |
| if (recipe->parameters == NULL) { | | | |
| \ | | | |
| return (int)cpl_error_set_message(cpl_func, CPL_ERROR_ILLEGAL_OUTPU | | | |
| T, \ | | | |
| "Parameter list allocation failed | | | |
| "); \ | | | |
| } | | | |
| \ | | | |
|
\ | |
\ | |
|
| /* Fill the parameters list */ | | /* Propagate error, if any */ | |
| \ | | \ | |
| return(RECIPE_FILL_PARAMS); | | /* - Need two function calls to ensure plugin validity before the fill | |
| \ | | */ \ | |
| | | return cpl_recipedefine_create(plugin) | |
| | | \ | |
| | | || cpl_recipedefine_create_is_ok(prestate, (RECIPE_FILL_PARAMS)) | |
| | | \ | |
| | | ? (int)cpl_error_set(cpl_func, cpl_error_get_code()) : 0; | |
| | | \ | |
| }
\ | | }
\ | |
|
\ | |
\ | |
| /* The definition of the recipe exec function */
\ | | /* The definition of the recipe exec function */
\ | |
| static int CPL_CONCAT2X(RECIPE_NAME,exec)(cpl_plugin * plugin)
\ | | static int CPL_CONCAT2X(RECIPE_NAME,exec)(cpl_plugin * plugin)
\ | |
| {
\ | | {
\ | |
|
| cpl_recipe * recipe; | | /* Propagate error, if any */ | |
| \ | | \ | |
| int recipe_status; | | return cpl_recipedefine_exec(plugin, RECIPE_NAME) | |
| \ | | \ | |
| cpl_errorstate initial_errorstate = cpl_errorstate_get(); | | ? (int)cpl_error_set(cpl_func, cpl_error_get_code()) : 0; | |
| \ | | \ | |
| | | | |
| \ | | | |
| /* Return immediately if an error code is already set */ | | | |
| \ | | | |
| if (cpl_error_get_code() != CPL_ERROR_NONE) { | | | |
| \ | | | |
| return (int)cpl_error_set_message(cpl_func, cpl_error_get_code(), | | | |
| \ | | | |
| "An error is already set"); | | | |
| \ | | | |
| } | | | |
| \ | | | |
| | | | |
| \ | | | |
| if (plugin == NULL) { | | | |
| \ | | | |
| return (int)cpl_error_set_message(cpl_func, CPL_ERROR_NULL_INPUT, | | | |
| \ | | | |
| "Null plugin"); | | | |
| \ | | | |
| } | | | |
| \ | | | |
| | | | |
| \ | | | |
| /* Verify plugin type */ | | | |
| \ | | | |
| if (cpl_plugin_get_type(plugin) != CPL_PLUGIN_TYPE_RECIPE) { | | | |
| \ | | | |
| return (int)cpl_error_set_message(cpl_func, CPL_ERROR_TYPE_MISMATCH | | | |
| , \ | | | |
| "Plugin is not a recipe"); | | | |
| \ | | | |
| } | | | |
| \ | | | |
| | | | |
| \ | | | |
| /* Get the recipe */ | | | |
| \ | | | |
| recipe = (cpl_recipe *)plugin; | | | |
| \ | | | |
| | | | |
| \ | | | |
| /* Verify parameter and frame lists */ | | | |
| \ | | | |
| if (recipe->parameters == NULL) { | | | |
| \ | | | |
| return (int)cpl_error_set_message(cpl_func, CPL_ERROR_NULL_INPUT, | | | |
| \ | | | |
| "Recipe invoked with NULL " | | | |
| \ | | | |
| "parameter list"); | | | |
| \ | | | |
| } | | | |
| \ | | | |
| if (recipe->frames == NULL) { | | | |
| \ | | | |
| return (int)cpl_error_set_message(cpl_func, CPL_ERROR_NULL_INPUT, | | | |
| \ | | | |
| "Recipe invoked with NULL " | | | |
| \ | | | |
| "frame set"); | | | |
| \ | | | |
| } | | | |
| \ | | | |
| | | | |
| \ | | | |
| /* Invoke the recipe */ | | | |
| \ | | | |
| recipe_status = RECIPE_NAME(recipe->frames, recipe->parameters); | | | |
| \ | | | |
| | | | |
| \ | | | |
| if (!cpl_errorstate_is_equal(initial_errorstate)) { | | | |
| \ | | | |
| /* Dump the error history since recipe execution start. | | | |
| \ | | | |
| At this point the recipe cannot recover from the error */ | | | |
| \ | | | |
| cpl_errorstate_dump(initial_errorstate, CPL_FALSE, NULL); | | | |
| \ | | | |
| } | | | |
| \ | | | |
| | | | |
| \ | | | |
| return recipe_status; | | | |
| \ | | | |
| }
\ | | }
\ | |
|
\ | |
\ | |
| /* The definition of the recipe destroy function */
\ | | /* The definition of the recipe destroy function */
\ | |
| static int CPL_CONCAT2X(RECIPE_NAME,destroy)(cpl_plugin * plugin)
\ | | static int CPL_CONCAT2X(RECIPE_NAME,destroy)(cpl_plugin * plugin)
\ | |
| {
\ | | {
\ | |
|
| cpl_recipe * recipe; | | /* Propagate error, if any */ | |
| \ | | \ | |
| | | return cpl_recipedefine_destroy(plugin) | |
| \ | | \ | |
| if (plugin == NULL) { | | ? (int)cpl_error_set(cpl_func, cpl_error_get_code()) : 0; | |
| \ | | \ | |
| return (int)cpl_error_set_message(cpl_func, CPL_ERROR_NULL_INPUT, | | | |
| \ | | | |
| "Null plugin"); | | | |
| \ | | | |
| } | | | |
| \ | | | |
| | | | |
| \ | | | |
| /* Verify plugin type */ | | | |
| \ | | | |
| if (cpl_plugin_get_type(plugin) != CPL_PLUGIN_TYPE_RECIPE) { | | | |
| \ | | | |
| return (int)cpl_error_set_message(cpl_func, CPL_ERROR_TYPE_MISMATCH | | | |
| , \ | | | |
| "Plugin is not a recipe"); | | | |
| \ | | | |
| } | | | |
| \ | | | |
| | | | |
| \ | | | |
| /* Get the recipe */ | | | |
| \ | | | |
| recipe = (cpl_recipe *)plugin; | | | |
| \ | | | |
| | | | |
| \ | | | |
| cpl_parameterlist_delete(recipe->parameters); /* May be NULL */ | | | |
| \ | | | |
| | | | |
| \ | | | |
| return 0; | | | |
| \ | | | |
| }
\ | | }
\ | |
|
\ | |
\ | |
| /* This dummy declaration requires the macro to be invoked as if it was
\ | | /* This dummy declaration requires the macro to be invoked as if it was
\ | |
|
| a kind of function definition, with a terminating ; */
\ | | a kind of function declaration, with a terminating ; */
\ | |
| extern int cpl_plugin_end | | extern int cpl_plugin_end | |
| | | | |
|
| | | /*------------------------------------------------------------------------- | |
| | | ---- | |
| | | Function prototypes | |
| | | -------------------------------------------------------------------------- | |
| | | ---*/ | |
| | | | |
| | | cpl_error_code cpl_recipedefine_init(cpl_pluginlist *, unsigned long, | |
| | | unsigned long, const char *, const cha | |
| | | r *, | |
| | | const char *, const char *, const char | |
| | | *, | |
| | | const char *, cpl_plugin_func, | |
| | | cpl_plugin_func, cpl_plugin_func); | |
| | | | |
| | | cpl_error_code cpl_recipedefine_create(cpl_plugin *); | |
| | | | |
| | | cpl_error_code cpl_recipedefine_create_is_ok(cpl_errorstate, int); | |
| | | | |
| | | cpl_error_code cpl_recipedefine_exec(cpl_plugin *, | |
| | | int (*)(cpl_frameset *, | |
| | | const cpl_parameterlist *)); | |
| | | | |
| | | cpl_error_code cpl_recipedefine_destroy(cpl_plugin *); | |
| | | | |
| #endif | | #endif | |
|
| | | /* end of cpl_recipedefine.h */ | |
| | | | |
End of changes. 18 change blocks. |
| 342 lines changed or deleted | | 124 lines changed or added | |
|
| cpl_stats.h | | cpl_stats.h | |
|
| /* $Id: cpl_stats.h,v 1.10 2008/07/21 08:48:40 llundin Exp $ | | /* $Id: cpl_stats.h,v 1.11 2008/10/17 14:24:01 llundin Exp $ | |
| * | | * | |
| * This file is part of the ESO Common Pipeline Library | | * This file is part of the ESO Common Pipeline Library | |
| * Copyright (C) 2001-2008 European Southern Observatory | | * Copyright (C) 2001-2008 European Southern Observatory | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * 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 | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| | | | |
| skipping to change at line 23 | | skipping to change at line 23 | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| * GNU General Public License for more details. | | * GNU General Public License for more details. | |
| * | | * | |
| * You should have received a copy of the GNU General Public License | | * You should have received a copy of the GNU General Public License | |
| * along with this program; if not, write to the Free Software | | * along with this program; if not, write to the Free Software | |
| * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A | | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A | |
| */ | | */ | |
| | | | |
| /* | | /* | |
| * $Author: llundin $ | | * $Author: llundin $ | |
|
| * $Date: 2008/07/21 08:48:40 $ | | * $Date: 2008/10/17 14:24:01 $ | |
| * $Revision: 1.10 $ | | * $Revision: 1.11 $ | |
| * $Name: cpl-4_2_0b3 $ | | * $Name: cpl-5_0_0 $ | |
| */ | | */ | |
| | | | |
| #ifndef CPL_STATS_H | | #ifndef CPL_STATS_H | |
| #define CPL_STATS_H | | #define CPL_STATS_H | |
| | | | |
| /*-------------------------------------------------------------------------
---- | | /*-------------------------------------------------------------------------
---- | |
| Includes | | Includes | |
| --------------------------------------------------------------------------
---*/ | | --------------------------------------------------------------------------
---*/ | |
| | | | |
| #include <stdio.h> | | #include <stdio.h> | |
| | | | |
| #include "cpl_image.h" | | #include "cpl_image.h" | |
| | | | |
| CPL_BEGIN_DECLS | | CPL_BEGIN_DECLS | |
| | | | |
| /*-------------------------------------------------------------------------
---- | | /*-------------------------------------------------------------------------
---- | |
| Defines | | Defines | |
| --------------------------------------------------------------------------
---*/ | | --------------------------------------------------------------------------
---*/ | |
| /* No mode has the value 1, which makes the (mis)use of logical or detectab
le */ | | /* No mode has the value 1, which makes the (mis)use of logical or detectab
le */ | |
|
| #define CPL_STATS_MIN ((unsigned) 1 << 1) | | #define CPL_STATS_MIN ((unsigned) 1 << 1) | |
| #define CPL_STATS_MAX ((unsigned) 1 << 2) | | #define CPL_STATS_MAX ((unsigned) 1 << 2) | |
| #define CPL_STATS_MEAN ((unsigned) 1 << 3) | | #define CPL_STATS_MEAN ((unsigned) 1 << 3) | |
| #define CPL_STATS_MEDIAN ((unsigned) 1 << 4) | | #define CPL_STATS_MEDIAN ((unsigned) 1 << 4) | |
| #define CPL_STATS_STDEV ((unsigned) 1 << 5) | | #define CPL_STATS_STDEV ((unsigned) 1 << 5) | |
| #define CPL_STATS_FLUX ((unsigned) 1 << 6) | | #define CPL_STATS_FLUX ((unsigned) 1 << 6) | |
| #define CPL_STATS_ABSFLUX ((unsigned) 1 << 7) | | #define CPL_STATS_ABSFLUX ((unsigned) 1 << 7) | |
| #define CPL_STATS_SQFLUX ((unsigned) 1 << 8) | | #define CPL_STATS_SQFLUX ((unsigned) 1 << 8) | |
| #define CPL_STATS_MINPOS ((unsigned) 1 << 9) | | #define CPL_STATS_MINPOS ((unsigned) 1 << 9) | |
| #define CPL_STATS_MAXPOS ((unsigned) 1 << 10) | | #define CPL_STATS_MAXPOS ((unsigned) 1 << 10) | |
| #define CPL_STATS_CENTROID ((unsigned) 1 << 11) | | #define CPL_STATS_CENTROID ((unsigned) 1 << 11) | |
| #define CPL_STATS_ALL ((unsigned)(1 << 12)-2) | | #define CPL_STATS_MEDIAN_DEV ((unsigned) 1 << 12) | |
| | | #define CPL_STATS_ALL ((unsigned)(1 << 13)-2) | |
| | | | |
| /*-------------------------------------------------------------------------
---- | | /*-------------------------------------------------------------------------
---- | |
| New types | | New types | |
| --------------------------------------------------------------------------
---*/ | | --------------------------------------------------------------------------
---*/ | |
| | | | |
|
| typedef struct _cpl_stats_ cpl_stats ; | | typedef struct _cpl_stats_ cpl_stats; | |
| | | | |
| /*-------------------------------------------------------------------------
---- | | /*-------------------------------------------------------------------------
---- | |
| Function prototypes | | Function prototypes | |
| --------------------------------------------------------------------------
---*/ | | --------------------------------------------------------------------------
---*/ | |
| | | | |
| /* Accessor functions */ | | /* Accessor functions */ | |
|
| double cpl_stats_get_min(const cpl_stats *) ; | | double cpl_stats_get_min(const cpl_stats *); | |
| double cpl_stats_get_max(const cpl_stats *) ; | | double cpl_stats_get_max(const cpl_stats *); | |
| double cpl_stats_get_mean(const cpl_stats *) ; | | double cpl_stats_get_mean(const cpl_stats *); | |
| double cpl_stats_get_median(const cpl_stats *) ; | | double cpl_stats_get_median(const cpl_stats *); | |
| double cpl_stats_get_stdev(const cpl_stats *) ; | | double cpl_stats_get_median_dev(const cpl_stats *); | |
| double cpl_stats_get_flux(const cpl_stats *) ; | | double cpl_stats_get_stdev(const cpl_stats *); | |
| double cpl_stats_get_absflux(const cpl_stats *) ; | | double cpl_stats_get_flux(const cpl_stats *); | |
| double cpl_stats_get_sqflux(const cpl_stats *) ; | | double cpl_stats_get_absflux(const cpl_stats *); | |
| double cpl_stats_get_centroid_x(const cpl_stats *) ; | | double cpl_stats_get_sqflux(const cpl_stats *); | |
| double cpl_stats_get_centroid_y(const cpl_stats *) ; | | double cpl_stats_get_centroid_x(const cpl_stats *); | |
| int cpl_stats_get_min_x(const cpl_stats *) ; | | double cpl_stats_get_centroid_y(const cpl_stats *); | |
| int cpl_stats_get_min_y(const cpl_stats *) ; | | int cpl_stats_get_min_x(const cpl_stats *); | |
| int cpl_stats_get_max_x(const cpl_stats *) ; | | int cpl_stats_get_min_y(const cpl_stats *); | |
| int cpl_stats_get_max_y(const cpl_stats *) ; | | int cpl_stats_get_max_x(const cpl_stats *); | |
| int cpl_stats_get_npix(const cpl_stats *) ; | | int cpl_stats_get_max_y(const cpl_stats *); | |
| | | int cpl_stats_get_npix(const cpl_stats *); | |
| | | | |
|
| void cpl_stats_delete(cpl_stats *) ; | | void cpl_stats_delete(cpl_stats *); | |
| | | | |
| /* Statistics computations */ | | /* Statistics computations */ | |
|
| cpl_stats * cpl_stats_new_from_image(const cpl_image *, unsigned) ; | | cpl_stats * cpl_stats_new_from_image(const cpl_image *, unsigned); | |
| cpl_stats * cpl_stats_new_from_image_window(const cpl_image *, unsigned, in
t, | | cpl_stats * cpl_stats_new_from_image_window(const cpl_image *, unsigned, in
t, | |
|
| int, int, int) ; | | int, int, int); | |
| cpl_error_code cpl_stats_dump(const cpl_stats *, unsigned, FILE *) ; | | cpl_error_code cpl_stats_dump(const cpl_stats *, unsigned, FILE *); | |
| | | | |
| CPL_END_DECLS | | CPL_END_DECLS | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 8 change blocks. |
| 36 lines changed or deleted | | 38 lines changed or added | |
|
| cpl_table.h | | cpl_table.h | |
|
| /* $Id: cpl_table.h,v 1.53 2008/07/21 08:48:39 llundin Exp $ | | /* $Id: cpl_table.h,v 1.57 2008/12/24 12:10:03 cizzo Exp $ | |
| * | | * | |
| * This file is part of the ESO Common Pipeline Library | | * This file is part of the ESO Common Pipeline Library | |
| * Copyright (C) 2001-2008 European Southern Observatory | | * Copyright (C) 2001-2008 European Southern Observatory | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * 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 | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| * GNU General Public License for more details. | | * GNU General Public License for more details. | |
| * | | * | |
| * You should have received a copy of the GNU General Public License | | * You should have received a copy of the GNU General Public License | |
| * along with this program; if not, write to the Free Software | | * along with this program; if not, write to the Free Software | |
| * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A | | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A | |
| */ | | */ | |
| | | | |
| /* | | /* | |
|
| * $Author: llundin $ | | * $Author: cizzo $ | |
| * $Date: 2008/07/21 08:48:39 $ | | * $Date: 2008/12/24 12:10:03 $ | |
| * $Revision: 1.53 $ | | * $Revision: 1.57 $ | |
| * $Name: cpl-4_2_0b3 $ | | * $Name: cpl-5_0_0 $ | |
| */ | | */ | |
| | | | |
| #ifndef CPL_TABLE_H | | #ifndef CPL_TABLE_H | |
| #define CPL_TABLE_H | | #define CPL_TABLE_H | |
| | | | |
| #include <stdio.h> | | #include <stdio.h> | |
| | | | |
| #include "cpl_io.h" | | #include "cpl_io.h" | |
| #include "cpl_type.h" | | #include "cpl_type.h" | |
| #include "cpl_propertylist.h" | | #include "cpl_propertylist.h" | |
| | | | |
| skipping to change at line 66 | | skipping to change at line 66 | |
| /* | | /* | |
| * Constructors and destructors: | | * Constructors and destructors: | |
| */ | | */ | |
| | | | |
| cpl_table *cpl_table_new(int); | | cpl_table *cpl_table_new(int); | |
| | | | |
| cpl_error_code cpl_table_new_column(cpl_table *, const char *, cpl_type); | | cpl_error_code cpl_table_new_column(cpl_table *, const char *, cpl_type); | |
| cpl_error_code cpl_table_new_column_array(cpl_table *, const char *, | | cpl_error_code cpl_table_new_column_array(cpl_table *, const char *, | |
| cpl_type, int); | | cpl_type, int); | |
| | | | |
|
| | | cpl_error_code cpl_table_set_column_savetype(cpl_table *, | |
| | | const char *name, cpl_type); | |
| | | | |
| cpl_error_code cpl_table_wrap_int(cpl_table *, int *, const char *); | | cpl_error_code cpl_table_wrap_int(cpl_table *, int *, const char *); | |
| cpl_error_code cpl_table_wrap_float(cpl_table *, float *, const char *); | | cpl_error_code cpl_table_wrap_float(cpl_table *, float *, const char *); | |
| cpl_error_code cpl_table_wrap_double(cpl_table *, double *, const char *); | | cpl_error_code cpl_table_wrap_double(cpl_table *, double *, const char *); | |
| cpl_error_code cpl_table_wrap_string(cpl_table *, char **, const char *); | | cpl_error_code cpl_table_wrap_string(cpl_table *, char **, const char *); | |
| | | | |
| void *cpl_table_unwrap(cpl_table *, const char *); | | void *cpl_table_unwrap(cpl_table *, const char *); | |
| | | | |
| cpl_error_code cpl_table_copy_structure(cpl_table *, const cpl_table *); | | cpl_error_code cpl_table_copy_structure(cpl_table *, const cpl_table *); | |
| | | | |
| void cpl_table_delete(cpl_table *); | | void cpl_table_delete(cpl_table *); | |
| | | | |
| skipping to change at line 190 | | skipping to change at line 193 | |
| | | | |
| const char *cpl_table_get_column_name(const cpl_table *); | | const char *cpl_table_get_column_name(const cpl_table *); | |
| cpl_array *cpl_table_get_column_names(const cpl_table *table); | | cpl_array *cpl_table_get_column_names(const cpl_table *table); | |
| | | | |
| cpl_error_code cpl_table_set_size(cpl_table *, int); | | cpl_error_code cpl_table_set_size(cpl_table *, int); | |
| | | | |
| cpl_table *cpl_table_duplicate(const cpl_table *); | | cpl_table *cpl_table_duplicate(const cpl_table *); | |
| | | | |
| cpl_table *cpl_table_extract(const cpl_table *, int, int); | | cpl_table *cpl_table_extract(const cpl_table *, int, int); | |
| cpl_table *cpl_table_extract_selected(const cpl_table *); | | cpl_table *cpl_table_extract_selected(const cpl_table *); | |
|
| | | cpl_array *cpl_table_where_selected(const cpl_table *); | |
| | | | |
| cpl_error_code cpl_table_erase_selected(cpl_table *); | | cpl_error_code cpl_table_erase_selected(cpl_table *); | |
| cpl_error_code cpl_table_erase_window(cpl_table *, int, int); | | cpl_error_code cpl_table_erase_window(cpl_table *, int, int); | |
| cpl_error_code cpl_table_insert_window(cpl_table *, int, int); | | cpl_error_code cpl_table_insert_window(cpl_table *, int, int); | |
| | | | |
| int cpl_table_compare_structure(const cpl_table *, const cpl_table *); | | int cpl_table_compare_structure(const cpl_table *, const cpl_table *); | |
| | | | |
| cpl_error_code cpl_table_insert(cpl_table *, const cpl_table *, int); | | cpl_error_code cpl_table_insert(cpl_table *, const cpl_table *, int); | |
| | | | |
| cpl_error_code cpl_table_cast_column(cpl_table *, | | cpl_error_code cpl_table_cast_column(cpl_table *, | |
| | | | |
End of changes. 4 change blocks. |
| 5 lines changed or deleted | | 9 lines changed or added | |
|
| cpl_test.h | | cpl_test.h | |
|
| /* $Id: cpl_test.h,v 1.21 2008/07/21 08:48:40 llundin Exp $ | | /* $Id: cpl_test.h,v 1.28 2009/01/09 10:36:03 llundin Exp $ | |
| * | | * | |
| * This file is part of the ESO Common Pipeline Library | | * This file is part of the ESO Common Pipeline Library | |
| * Copyright (C) 2001-2008 European Southern Observatory | | * Copyright (C) 2001-2008 European Southern Observatory | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * 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 | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| | | | |
| skipping to change at line 23 | | skipping to change at line 23 | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| * GNU General Public License for more details. | | * GNU General Public License for more details. | |
| * | | * | |
| * You should have received a copy of the GNU General Public License | | * You should have received a copy of the GNU General Public License | |
| * along with this program; if not, write to the Free Software | | * along with this program; if not, write to the Free Software | |
| * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A | | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A | |
| */ | | */ | |
| | | | |
| /* | | /* | |
| * $Author: llundin $ | | * $Author: llundin $ | |
|
| * $Date: 2008/07/21 08:48:40 $ | | * $Date: 2009/01/09 10:36:03 $ | |
| * $Revision: 1.21 $ | | * $Revision: 1.28 $ | |
| * $Name: cpl-4_2_0b3 $ | | * $Name: cpl-5_0_0 $ | |
| */ | | */ | |
| | | | |
| #ifndef CPL_TEST_H | | #ifndef CPL_TEST_H | |
| #define CPL_TEST_H | | #define CPL_TEST_H | |
| | | | |
| /*-------------------------------------------------------------------------
---- | | /*-------------------------------------------------------------------------
---- | |
| Includes | | Includes | |
| --------------------------------------------------------------------------
---*/ | | --------------------------------------------------------------------------
---*/ | |
| | | | |
| #ifdef HAVE_CONFIG_H | | #ifdef HAVE_CONFIG_H | |
| | | | |
| skipping to change at line 58 | | skipping to change at line 58 | |
| --------------------------------------------------------------------------
---*/ | | --------------------------------------------------------------------------
---*/ | |
| | | | |
| #undef CPL_HAVE_GNUC_NONNULL | | #undef CPL_HAVE_GNUC_NONNULL | |
| | | | |
| #if defined __GNUC__ | | #if defined __GNUC__ | |
| #if __GNUC__ > 3 || __GNUC__ == 3 && defined __GNUC_MINOR__ && __GNUC_MINOR
__ > 2 | | #if __GNUC__ > 3 || __GNUC__ == 3 && defined __GNUC_MINOR__ && __GNUC_MINOR
__ > 2 | |
| #define CPL_HAVE_GNUC_NONNULL | | #define CPL_HAVE_GNUC_NONNULL | |
| #endif | | #endif | |
| #endif | | #endif | |
| | | | |
|
| | | #ifndef CPL_TEST_FITS | |
| | | #define CPL_TEST_FITS "CPL_TEST_FITS" | |
| | | #endif | |
| | | | |
| CPL_BEGIN_DECLS | | CPL_BEGIN_DECLS | |
| | | | |
| /*-------------------------------------------------------------------------
---*/ | | /*-------------------------------------------------------------------------
---*/ | |
| /** | | /** | |
| @ingroup cpl_test | | @ingroup cpl_test | |
| @brief Initialize CPL + CPL messaging + unit test | | @brief Initialize CPL + CPL messaging + unit test | |
| @param REPORT The email address for the error message e.g. PACKAGE_BUGR
EPORT | | @param REPORT The email address for the error message e.g. PACKAGE_BUGR
EPORT | |
| @param LEVEL The default messaging level, e.g. CPL_MSG_WARNING | | @param LEVEL The default messaging level, e.g. CPL_MSG_WARNING | |
| @return void | | @return void | |
| @see cpl_init() | | @see cpl_init() | |
| | | | |
| skipping to change at line 230 | | skipping to change at line 234 | |
| | | | |
| Example of usage: | | Example of usage: | |
| @code | | @code | |
| | | | |
| cpl_test_noneq(computed, wrong); | | cpl_test_noneq(computed, wrong); | |
| | | | |
| @endcode | | @endcode | |
| | | | |
| */ | | */ | |
| /*-------------------------------------------------------------------------
---*/ | | /*-------------------------------------------------------------------------
---*/ | |
|
| #define cpl_test_noneq(first, second) | | #define cpl_test_noneq(first, second) \ | |
| \ | | cpl_test_noneq_macro(first, #first, second, #second, \ | |
| cpl_test_noneq_macro(first, #first, second, #second, | | cpl_func, __FILE__, __LINE__) | |
| \ | | | |
| cpl_func, __FILE__, __LINE__) | | | |
| | | | |
| /*-------------------------------------------------------------------------
---*/ | | /*-------------------------------------------------------------------------
---*/ | |
| /** | | /** | |
| @brief Test if two strings are equal | | @brief Test if two strings are equal | |
| @param first The first string or NULL of the comparison | | @param first The first string or NULL of the comparison | |
| @param second The second string or NULL of the comparison | | @param second The second string or NULL of the comparison | |
| @note One or two NULL pointer(s) is considered a failure. | | @note One or two NULL pointer(s) is considered a failure. | |
| | | | |
| Example of usage: | | Example of usage: | |
| @code | | @code | |
| | | | |
| cpl_test_eq_string(computed, expected); | | cpl_test_eq_string(computed, expected); | |
| | | | |
| @endcode | | @endcode | |
| | | | |
| */ | | */ | |
| /*-------------------------------------------------------------------------
---*/ | | /*-------------------------------------------------------------------------
---*/ | |
|
| #define cpl_test_eq_string(first, second) | | #define cpl_test_eq_string(first, second) \ | |
| \ | | cpl_test_eq_string_macro(first, #first, second, #second, \ | |
| cpl_test_eq_string_macro(first, #first, second, #second, | | cpl_func, __FILE__, __LINE__) | |
| \ | | | |
| cpl_func, __FILE__, __LINE__) | | /*------------------------------------------------------------------------- | |
| | | ---*/ | |
| | | /** | |
| | | @brief Test if a file is valid FITS using an external verification utili | |
| | | ty | |
| | | @param fitsfile The file to verify, NULL causes failure | |
| | | @note The external verification utility is specified with the environemt | |
| | | variable CPL_TEST_FITS, if is not set the test will pass on any | |
| | | non-NULL file. | |
| | | | |
| | | Example of usage: | |
| | | @code | |
| | | | |
| | | export CPL_TEST_FITS=/usr/local/bin/fitsverify | |
| | | | |
| | | @endcode | |
| | | | |
| | | @code | |
| | | | |
| | | cpl_test_fits(fitsfile); | |
| | | | |
| | | @endcode | |
| | | | |
| | | */ | |
| | | /*------------------------------------------------------------------------- | |
| | | ---*/ | |
| | | #define cpl_test_fits(fitsfile) \ | |
| | | cpl_test_fits_macro(fitsfile, #fitsfile, \ | |
| | | cpl_func, __FILE__, __LINE__) | |
| | | | |
| | | /*------------------------------------------------------------------------- | |
| | | ---*/ | |
| | | /** | |
| | | @brief Test if two CPL masks are equal | |
| | | @param first The first mask or NULL of the comparison | |
| | | @param second The second mask or NULL of the comparison | |
| | | @note One or two NULL pointer(s) is considered a failure. | |
| | | | |
| | | Example of usage: | |
| | | @code | |
| | | | |
| | | cpl_test_eq_mask(computed, expected); | |
| | | | |
| | | @endcode | |
| | | | |
| | | */ | |
| | | /*------------------------------------------------------------------------- | |
| | | ---*/ | |
| | | #define cpl_test_eq_mask(first, second) \ | |
| | | cpl_test_eq_mask_macro(first, #first, second, #second, \ | |
| | | cpl_func, __FILE__, __LINE__) | |
| | | | |
| /*-------------------------------------------------------------------------
---*/ | | /*-------------------------------------------------------------------------
---*/ | |
| /** | | /** | |
| @ingroup cpl_test | | @ingroup cpl_test | |
| @brief Evaluate A <= B and increment an internal counter if it is not t
rue | | @brief Evaluate A <= B and increment an internal counter if it is not t
rue | |
| @param value The number to test | | @param value The number to test | |
| @param tolerance The upper limit to compare against | | @param tolerance The upper limit to compare against | |
| @return void | | @return void | |
| @see cpl_test_init() | | @see cpl_test_init() | |
| @note This macro should be used for unit tests | | @note This macro should be used for unit tests | |
| | | | |
| Example of usage: | | Example of usage: | |
| @code | | @code | |
| | | | |
| cpl_test_leq(fabs(myfunc(&p)), DBL_EPSILON); | | cpl_test_leq(fabs(myfunc(&p)), DBL_EPSILON); | |
|
| cpl_test(p != NULL); | | cpl_test_nonnull(p); | |
| | | | |
| @endcode | | @endcode | |
| | | | |
| */ | | */ | |
| /*-------------------------------------------------------------------------
---*/ | | /*-------------------------------------------------------------------------
---*/ | |
| #define cpl_test_leq(value, tolerance)
\ | | #define cpl_test_leq(value, tolerance)
\ | |
| cpl_test_leq_macro(value, #value, tolerance, #tolerance, cpl_func,
\ | | cpl_test_leq_macro(value, #value, tolerance, #tolerance, cpl_func,
\ | |
| __FILE__, __LINE__) | | __FILE__, __LINE__) | |
| | | | |
| /*-------------------------------------------------------------------------
---*/ | | /*-------------------------------------------------------------------------
---*/ | |
| /** | | /** | |
|
| | | @ingroup cpl_test | |
| | | @brief Evaluate A < B and increment an internal counter if it is not tr | |
| | | ue | |
| | | @param value The number to test | |
| | | @param tolerance The upper limit to compare against | |
| | | @return void | |
| | | @see cpl_test_init() | |
| | | @note This macro should be used for unit tests | |
| | | | |
| | | Example of usage: | |
| | | @code | |
| | | | |
| | | cpl_test_lt(0.0, myfunc()); | |
| | | | |
| | | @endcode | |
| | | | |
| | | */ | |
| | | /*------------------------------------------------------------------------- | |
| | | ---*/ | |
| | | #define cpl_test_lt(value, tolerance) | |
| | | \ | |
| | | cpl_test_lt_macro(value, #value, tolerance, #tolerance, cpl_func, | |
| | | \ | |
| | | __FILE__, __LINE__) | |
| | | | |
| | | /*------------------------------------------------------------------------- | |
| | | ---*/ | |
| | | /** | |
| @brief Test if two numerical expressions are within a given absolute tol
erance | | @brief Test if two numerical expressions are within a given absolute tol
erance | |
| @param first The first value in the comparison, side-effects are al
lowed | | @param first The first value in the comparison, side-effects are al
lowed | |
| @param second The second value in the comparison, side-effects are a
llowed | | @param second The second value in the comparison, side-effects are a
llowed | |
| @param tolerance A non-negative tolerance | | @param tolerance A non-negative tolerance | |
| @note If the tolerance is negative, the test will always fail | | @note If the tolerance is negative, the test will always fail | |
| @see cpl_test() | | @see cpl_test() | |
| @return void | | @return void | |
| | | | |
| Example of usage: | | Example of usage: | |
| @code | | @code | |
| | | | |
| skipping to change at line 402 | | skipping to change at line 476 | |
| Example of usage: | | Example of usage: | |
| @code | | @code | |
| | | | |
| int main (void) | | int main (void) | |
| { | | { | |
| | | | |
| cpl_test_init(CPL_MSG_WARNING); | | cpl_test_init(CPL_MSG_WARNING); | |
| | | | |
| cpl_test(myfunc(&p)); | | cpl_test(myfunc(&p)); | |
| cpl_assert(p != NULL); | | cpl_assert(p != NULL); | |
|
| | | cpl_test(*p); | |
| | | | |
| return cpl_test_end(0); | | return cpl_test_end(0); | |
| } | | } | |
| | | | |
| @endcode | | @endcode | |
| */ | | */ | |
| /*-------------------------------------------------------------------------
---*/ | | /*-------------------------------------------------------------------------
---*/ | |
| #define cpl_assert(bool) do {
\ | | #define cpl_assert(bool) do {
\ | |
| /* Evaluate bool just once */
\ | | /* Evaluate bool just once */
\ | |
| const cpl_boolean cpl_assert_ok = (bool) ? CPL_TRUE : CPL_FALSE;
\ | | const cpl_boolean cpl_assert_ok = (bool) ? CPL_TRUE : CPL_FALSE;
\ | |
| | | | |
| skipping to change at line 480 | | skipping to change at line 555 | |
| ; | | ; | |
| | | | |
| void cpl_test_eq_string_macro(const char *, const char *, const char *, | | void cpl_test_eq_string_macro(const char *, const char *, const char *, | |
| const char *, const char *, const char *, | | const char *, const char *, const char *, | |
| unsigned) | | unsigned) | |
| #ifdef CPL_HAVE_GNUC_NONNULL | | #ifdef CPL_HAVE_GNUC_NONNULL | |
| __attribute__((nonnull(2, 4, 5, 6))) | | __attribute__((nonnull(2, 4, 5, 6))) | |
| #endif | | #endif | |
| ; | | ; | |
| | | | |
|
| | | void cpl_test_fits_macro(const char *, const char *, const char *, | |
| | | const char *, unsigned) | |
| | | #ifdef CPL_HAVE_GNUC_NONNULL | |
| | | __attribute__((nonnull(2, 3, 4))) | |
| | | #endif | |
| | | ; | |
| | | | |
| | | void cpl_test_eq_mask_macro(const cpl_mask *, const char *, const cpl_mask | |
| | | *, | |
| | | const char *, const char *, const char *, | |
| | | unsigned) | |
| | | #ifdef CPL_HAVE_GNUC_NONNULL | |
| | | __attribute__((nonnull(2, 4, 5, 6))) | |
| | | #endif | |
| | | ; | |
| | | | |
| void cpl_test_leq_macro(double, const char *, double, const char *, | | void cpl_test_leq_macro(double, const char *, double, const char *, | |
| const char *, const char *, unsigned) | | const char *, const char *, unsigned) | |
| #ifdef CPL_HAVE_GNUC_NONNULL | | #ifdef CPL_HAVE_GNUC_NONNULL | |
| __attribute__((nonnull)) | | __attribute__((nonnull)) | |
| #endif | | #endif | |
| ; | | ; | |
| | | | |
|
| | | void cpl_test_lt_macro(double, const char *, double, const char *, | |
| | | const char *, const char *, unsigned) | |
| | | #ifdef CPL_HAVE_GNUC_NONNULL | |
| | | __attribute__((nonnull)) | |
| | | #endif | |
| | | ; | |
| | | | |
| void cpl_test_abs_macro(double, const char *, double, const char *, double
, | | void cpl_test_abs_macro(double, const char *, double, const char *, double
, | |
| const char *, const char *, const char *, unsigned) | | const char *, const char *, const char *, unsigned) | |
| #ifdef CPL_HAVE_GNUC_NONNULL | | #ifdef CPL_HAVE_GNUC_NONNULL | |
| __attribute__((nonnull)) | | __attribute__((nonnull)) | |
| #endif | | #endif | |
| ; | | ; | |
| | | | |
| void cpl_test_rel_macro(double, const char *, double, const char *, double
, | | void cpl_test_rel_macro(double, const char *, double, const char *, double
, | |
| const char *, const char *, const char *, unsigned) | | const char *, const char *, const char *, unsigned) | |
| #ifdef CPL_HAVE_GNUC_NONNULL | | #ifdef CPL_HAVE_GNUC_NONNULL | |
| | | | |
End of changes. 10 change blocks. |
| 15 lines changed or deleted | | 119 lines changed or added | |
|
| cpl_vector.h | | cpl_vector.h | |
|
| /* $Id: cpl_vector.h,v 1.54 2008/07/21 08:48:40 llundin Exp $ | | /* $Id: cpl_vector.h,v 1.57 2008/11/13 12:17:22 llundin Exp $ | |
| * | | * | |
| * This file is part of the ESO Common Pipeline Library | | * This file is part of the ESO Common Pipeline Library | |
| * Copyright (C) 2001-2008 European Southern Observatory | | * Copyright (C) 2001-2008 European Southern Observatory | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * 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 | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| | | | |
| skipping to change at line 23 | | skipping to change at line 23 | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| * GNU General Public License for more details. | | * GNU General Public License for more details. | |
| * | | * | |
| * You should have received a copy of the GNU General Public License | | * You should have received a copy of the GNU General Public License | |
| * along with this program; if not, write to the Free Software | | * along with this program; if not, write to the Free Software | |
| * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A | | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A | |
| */ | | */ | |
| | | | |
| /* | | /* | |
| * $Author: llundin $ | | * $Author: llundin $ | |
|
| * $Date: 2008/07/21 08:48:40 $ | | * $Date: 2008/11/13 12:17:22 $ | |
| * $Revision: 1.54 $ | | * $Revision: 1.57 $ | |
| * $Name: cpl-4_2_0b3 $ | | * $Name: cpl-5_0_0 $ | |
| */ | | */ | |
| | | | |
| #ifndef CPL_VECTOR_H | | #ifndef CPL_VECTOR_H | |
| #define CPL_VECTOR_H | | #define CPL_VECTOR_H | |
| | | | |
| /*-------------------------------------------------------------------------
---- | | /*-------------------------------------------------------------------------
---- | |
| Includes | | Includes | |
| --------------------------------------------------------------------------
---*/ | | --------------------------------------------------------------------------
---*/ | |
| | | | |
| #include <stdio.h> | | #include <stdio.h> | |
| | | | |
| skipping to change at line 65 | | skipping to change at line 65 | |
| #endif | | #endif | |
| | | | |
| /* Suggested radius of pixel interpolation */ | | /* Suggested radius of pixel interpolation */ | |
| #ifndef CPL_KERNEL_DEF_WIDTH | | #ifndef CPL_KERNEL_DEF_WIDTH | |
| #define CPL_KERNEL_DEF_WIDTH 2.0 | | #define CPL_KERNEL_DEF_WIDTH 2.0 | |
| #endif | | #endif | |
| | | | |
| /* Suggested length of interpolation profile */ | | /* Suggested length of interpolation profile */ | |
| #define CPL_KERNEL_DEF_SAMPLES (1+(int)(CPL_KERNEL_TABSPERPIX * CPL_KERNEL_
DEF_WIDTH)) | | #define CPL_KERNEL_DEF_SAMPLES (1+(int)(CPL_KERNEL_TABSPERPIX * CPL_KERNEL_
DEF_WIDTH)) | |
| | | | |
|
| | | /* FIXME: Will disappear. Do not use in new code! */ | |
| | | #define cpl_wlcalib_xc_convolve_create_kernel \ | |
| | | cpl_vector_new_lss_kernel | |
| | | #define cpl_wlcalib_xc_convolve \ | |
| | | cpl_vector_convolve_symmetric | |
| | | | |
| /*-------------------------------------------------------------------------
---- | | /*-------------------------------------------------------------------------
---- | |
| New types | | New types | |
| --------------------------------------------------------------------------
---*/ | | --------------------------------------------------------------------------
---*/ | |
| | | | |
| typedef enum { | | typedef enum { | |
| CPL_LOWPASS_LINEAR, | | CPL_LOWPASS_LINEAR, | |
| CPL_LOWPASS_GAUSSIAN | | CPL_LOWPASS_GAUSSIAN | |
| } cpl_lowpass; | | } cpl_lowpass; | |
| | | | |
| typedef enum { | | typedef enum { | |
| | | | |
| skipping to change at line 94 | | skipping to change at line 100 | |
| CPL_FIT_CENTROID = 1 << 1, | | CPL_FIT_CENTROID = 1 << 1, | |
| CPL_FIT_STDEV = 1 << 2, | | CPL_FIT_STDEV = 1 << 2, | |
| CPL_FIT_AREA = 1 << 3, | | CPL_FIT_AREA = 1 << 3, | |
| CPL_FIT_OFFSET = 1 << 4, | | CPL_FIT_OFFSET = 1 << 4, | |
| CPL_FIT_ALL = (1 << 1) | | | CPL_FIT_ALL = (1 << 1) | | |
| (1 << 2) | | | (1 << 2) | | |
| (1 << 3) | | | (1 << 3) | | |
| (1 << 4) | | (1 << 4) | |
| } cpl_fit_mode; | | } cpl_fit_mode; | |
| | | | |
|
| typedef struct _cpl_vector_ cpl_vector ; | | typedef struct _cpl_vector_ cpl_vector; | |
| | | | |
| /*-------------------------------------------------------------------------
---- | | /*-------------------------------------------------------------------------
---- | |
| Function prototypes | | Function prototypes | |
| --------------------------------------------------------------------------
---*/ | | --------------------------------------------------------------------------
---*/ | |
| | | | |
| /* Constructors and destructors */ | | /* Constructors and destructors */ | |
|
| cpl_vector * cpl_vector_new(int) ; | | cpl_vector * cpl_vector_new(int); | |
| cpl_vector * cpl_vector_wrap(int, double *) ; | | cpl_vector * cpl_vector_wrap(int, double *); | |
| void cpl_vector_delete(cpl_vector *) ; | | void cpl_vector_delete(cpl_vector *); | |
| void * cpl_vector_unwrap(cpl_vector *) ; | | void * cpl_vector_unwrap(cpl_vector *); | |
| cpl_vector * cpl_vector_read(const char *) ; | | cpl_vector * cpl_vector_read(const char *); | |
| void cpl_vector_dump(const cpl_vector *, FILE *) ; | | void cpl_vector_dump(const cpl_vector *, FILE *); | |
| cpl_vector * cpl_vector_load(const char *, int) ; | | cpl_vector * cpl_vector_load(const char *, int); | |
| cpl_error_code cpl_vector_save(const cpl_vector *, const char *, cpl_type_b
pp, | | cpl_error_code cpl_vector_save(const cpl_vector *, const char *, cpl_type_b
pp, | |
|
| const cpl_propertylist *, unsigned) ; | | const cpl_propertylist *, unsigned); | |
| cpl_vector * cpl_vector_duplicate(const cpl_vector *) ; | | cpl_vector * cpl_vector_duplicate(const cpl_vector *); | |
| cpl_error_code cpl_vector_copy(cpl_vector *, const cpl_vector *) ; | | cpl_error_code cpl_vector_copy(cpl_vector *, const cpl_vector *); | |
| | | | |
| /* Accessor functions */ | | /* Accessor functions */ | |
|
| int cpl_vector_get_size(const cpl_vector *) ; | | int cpl_vector_get_size(const cpl_vector *); | |
| double * cpl_vector_get_data(cpl_vector *) ; | | double * cpl_vector_get_data(cpl_vector *); | |
| const double * cpl_vector_get_data_const(const cpl_vector *) ; | | const double * cpl_vector_get_data_const(const cpl_vector *); | |
| double cpl_vector_get(const cpl_vector *, int) ; | | double cpl_vector_get(const cpl_vector *, int); | |
| cpl_error_code cpl_vector_set_size(cpl_vector *, int) ; | | cpl_error_code cpl_vector_set_size(cpl_vector *, int); | |
| cpl_error_code cpl_vector_set(cpl_vector *, int, double) ; | | cpl_error_code cpl_vector_set(cpl_vector *, int, double); | |
| | | | |
| /* Basic operations */ | | /* Basic operations */ | |
|
| cpl_error_code cpl_vector_add(cpl_vector *, const cpl_vector *) ; | | cpl_error_code cpl_vector_add(cpl_vector *, const cpl_vector *); | |
| cpl_error_code cpl_vector_subtract(cpl_vector *, const cpl_vector *) ; | | cpl_error_code cpl_vector_subtract(cpl_vector *, const cpl_vector *); | |
| cpl_error_code cpl_vector_multiply(cpl_vector *, const cpl_vector *) ; | | cpl_error_code cpl_vector_multiply(cpl_vector *, const cpl_vector *); | |
| cpl_error_code cpl_vector_divide(cpl_vector *, const cpl_vector *) ; | | cpl_error_code cpl_vector_divide(cpl_vector *, const cpl_vector *); | |
| double cpl_vector_product(const cpl_vector *, const cpl_vector *); | | double cpl_vector_product(const cpl_vector *, const cpl_vector *); | |
|
| cpl_error_code cpl_vector_sort(cpl_vector *, int) ; | | cpl_error_code cpl_vector_sort(cpl_vector *, int); | |
| cpl_error_code cpl_vector_add_scalar(cpl_vector *, double) ; | | cpl_error_code cpl_vector_add_scalar(cpl_vector *, double); | |
| cpl_error_code cpl_vector_subtract_scalar(cpl_vector *, double) ; | | cpl_error_code cpl_vector_subtract_scalar(cpl_vector *, double); | |
| cpl_error_code cpl_vector_multiply_scalar(cpl_vector *, double) ; | | cpl_error_code cpl_vector_multiply_scalar(cpl_vector *, double); | |
| cpl_error_code cpl_vector_divide_scalar(cpl_vector *, double) ; | | cpl_error_code cpl_vector_divide_scalar(cpl_vector *, double); | |
| cpl_error_code cpl_vector_logarithm(cpl_vector *, double) ; | | cpl_error_code cpl_vector_logarithm(cpl_vector *, double); | |
| cpl_error_code cpl_vector_exponential(cpl_vector *, double) ; | | cpl_error_code cpl_vector_exponential(cpl_vector *, double); | |
| cpl_error_code cpl_vector_power(cpl_vector *, double) ; | | cpl_error_code cpl_vector_power(cpl_vector *, double); | |
| | | | |
|
| cpl_error_code cpl_vector_fill(cpl_vector *, double) ; | | cpl_error_code cpl_vector_fill(cpl_vector *, double); | |
| cpl_error_code cpl_vector_sqrt(cpl_vector *) ; | | cpl_error_code cpl_vector_sqrt(cpl_vector *); | |
| int cpl_vector_find(const cpl_vector *, double) ; | | int cpl_vector_find(const cpl_vector *, double); | |
| cpl_vector * cpl_vector_extract(const cpl_vector *, int, int, int); | | cpl_vector * cpl_vector_extract(const cpl_vector *, int, int, int); | |
| | | | |
| /* Statistics on cpl_vector */ | | /* Statistics on cpl_vector */ | |
|
| double cpl_vector_get_min(const cpl_vector *) ; | | double cpl_vector_get_min(const cpl_vector *); | |
| double cpl_vector_get_max(const cpl_vector *) ; | | double cpl_vector_get_max(const cpl_vector *); | |
| double cpl_vector_get_mean(const cpl_vector *) ; | | double cpl_vector_get_mean(const cpl_vector *); | |
| double cpl_vector_get_median(cpl_vector *) ; | | double cpl_vector_get_median(cpl_vector *); | |
| double cpl_vector_get_median_const(const cpl_vector *) ; | | double cpl_vector_get_median_const(const cpl_vector *); | |
| double cpl_vector_get_stdev(const cpl_vector *) ; | | double cpl_vector_get_stdev(const cpl_vector *); | |
| int cpl_vector_correlate(cpl_vector *, const cpl_vector *, const cpl_vector
*); | | int cpl_vector_correlate(cpl_vector *, const cpl_vector *, const cpl_vector
*); | |
| | | | |
| /* Filtering */ | | /* Filtering */ | |
| cpl_vector * cpl_vector_filter_lowpass_create(const cpl_vector *, cpl_lowpa
ss, | | cpl_vector * cpl_vector_filter_lowpass_create(const cpl_vector *, cpl_lowpa
ss, | |
| int); | | int); | |
|
| cpl_vector * cpl_vector_filter_median_create(const cpl_vector *, int) ; | | cpl_vector * cpl_vector_filter_median_create(const cpl_vector *, int); | |
| | | | |
| cpl_error_code cpl_vector_fill_kernel_profile(cpl_vector *, cpl_kernel, dou
ble); | | cpl_error_code cpl_vector_fill_kernel_profile(cpl_vector *, cpl_kernel, dou
ble); | |
| | | | |
| /* Fitting */ | | /* Fitting */ | |
| cpl_error_code cpl_vector_fit_gaussian(const cpl_vector *, const cpl_vector
*, | | cpl_error_code cpl_vector_fit_gaussian(const cpl_vector *, const cpl_vector
*, | |
| const cpl_vector *, const cpl_vector
*, | | const cpl_vector *, const cpl_vector
*, | |
| cpl_fit_mode, | | cpl_fit_mode, | |
| double *, double *, | | double *, double *, | |
| double *, double *, | | double *, double *, | |
| double *, double *, | | double *, double *, | |
| cpl_matrix **); | | cpl_matrix **); | |
| | | | |
|
| | | /* FIXME: Will disappear. Do not use in new code! */ | |
| | | cpl_vector * cpl_vector_new_lss_kernel(double, double) | |
| | | #ifdef __GNUC__ | |
| | | __attribute__((deprecated)) | |
| | | #endif | |
| | | ; | |
| | | cpl_error_code cpl_vector_convolve_symmetric(cpl_vector *, const cpl_vector | |
| | | *) | |
| | | #ifdef __GNUC__ | |
| | | __attribute__((deprecated)) | |
| | | #endif | |
| | | ; | |
| | | | |
| CPL_END_DECLS | | CPL_END_DECLS | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 13 change blocks. |
| 43 lines changed or deleted | | 62 lines changed or added | |
|