00001 /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 00002 /* vim:set sw=2 sts=2 et cin: */ 00003 /* 00004 * This file is part of the MUSE Instrument Pipeline 00005 * Copyright (C) 2005-2014 European Southern Observatory 00006 * 00007 * This program is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 2 of the License, or 00010 * (at your option) any later version. 00011 * 00012 * This program is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, write to the Free Software 00019 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00020 */ 00021 00022 #ifndef MUSE_IMAGE_H 00023 #define MUSE_IMAGE_H 00024 00025 /*----------------------------------------------------------------------------* 00026 * Special variable types * 00027 *----------------------------------------------------------------------------*/ 00028 00032 /*----------------------------------------------------------------------------*/ 00039 /*----------------------------------------------------------------------------*/ 00040 typedef struct { 00046 cpl_image *data; 00047 00056 cpl_image *dq; 00057 00064 cpl_image *stat; 00065 00072 cpl_propertylist *header; 00073 } muse_image; 00074 00077 /*----------------------------------------------------------------------------* 00078 * Defines * 00079 *----------------------------------------------------------------------------*/ 00080 /* extension names for the three images */ 00081 #define EXTNAME_DATA "DATA" 00082 #define EXTNAME_DQ "DQ" 00083 #define EXTNAME_STAT "STAT" 00084 #define EXTNAME_DATA_COMMENT "This extension contains data values" 00085 #define EXTNAME_DQ_COMMENT "This extension contains bad pixel status values" 00086 #define EXTNAME_STAT_COMMENT "This extension contains data variance" 00087 00088 /*----------------------------------------------------------------------------* 00089 * Function prototypes * 00090 *----------------------------------------------------------------------------*/ 00091 muse_image *muse_image_new(void); 00092 void muse_image_delete(muse_image *); 00093 muse_image *muse_image_load(const char *); 00094 muse_image *muse_image_load_from_extensions(const char *, unsigned char); 00095 muse_image *muse_image_load_from_raw(const char *, int); 00096 cpl_error_code muse_image_save(muse_image *, const char *); 00097 muse_image *muse_image_duplicate(const muse_image *); 00098 int muse_image_subtract(muse_image *, muse_image *); 00099 int muse_image_divide(muse_image *, muse_image *); 00100 int muse_image_scale(muse_image *, double); 00101 00102 int muse_image_variance_create(muse_image *, muse_image *); 00103 cpl_error_code muse_image_adu_to_count(muse_image *); 00104 00105 cpl_error_code muse_image_reject_from_dq(muse_image *); 00106 cpl_error_code muse_image_dq_to_nan(muse_image *); 00107 00108 #endif /* MUSE_IMAGE_H */
1.6.1