00001 /* $Id: qfits_image.h,v 1.1.1.1 2008/11/03 13:40:49 agabasch Exp $ 00002 * 00003 * This file is part of the ESO QFITS Library 00004 * Copyright (C) 2001-2004 European Southern Observatory 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 */ 00020 00021 /* 00022 * $Author: agabasch $ 00023 * $Date: 2008/11/03 13:40:49 $ 00024 * $Revision: 1.1.1.1 $ 00025 * $Name: midi-2_7_0 $ 00026 */ 00027 00028 #ifndef QFITS_IMAGE_H 00029 #define QFITS_IMAGE_H 00030 00031 /*----------------------------------------------------------------------------- 00032 Includes 00033 -----------------------------------------------------------------------------*/ 00034 00035 #include <stdio.h> 00036 #include <stdlib.h> 00037 #include <string.h> 00038 #include <unistd.h> 00039 00040 /*----------------------------------------------------------------------------- 00041 Defines 00042 -----------------------------------------------------------------------------*/ 00043 00045 #define PTYPE_FLOAT 0 00046 00047 #define PTYPE_INT 1 00048 00049 #define PTYPE_DOUBLE 2 00050 00051 /* FITS pixel depths */ 00052 /* FITS BITPIX=8 */ 00053 #define BPP_8_UNSIGNED (8) 00054 /* FITS BITPIX=16 */ 00055 #define BPP_16_SIGNED (16) 00056 /* FITS BITPIX=32 */ 00057 #define BPP_32_SIGNED (32) 00058 /* FITS BITPIX=-32 */ 00059 #define BPP_IEEE_FLOAT (-32) 00060 /* FITS BITPIX=-64 */ 00061 #define BPP_IEEE_DOUBLE (-64) 00062 /* Default BITPIX for output */ 00063 #define BPP_DEFAULT BPP_IEEE_FLOAT 00064 00065 /*----------------------------------------------------------------------------- 00066 New types 00067 -----------------------------------------------------------------------------*/ 00068 00069 /*----------------------------------------------------------------------------*/ 00076 /*----------------------------------------------------------------------------*/ 00077 typedef unsigned char byte ; 00078 00079 /*----------------------------------------------------------------------------*/ 00149 /*----------------------------------------------------------------------------*/ 00150 typedef struct qfitsloader { 00151 00153 int _init ; 00154 00156 char * filename ; 00158 int xtnum ; 00160 int pnum ; 00162 int ptype ; 00164 int map ; 00165 00167 int exts ; 00169 int lx ; 00171 int ly ; 00173 int np ; 00175 int bitpix ; 00177 int seg_start ; 00179 int seg_size ; 00181 double bscale ; 00183 double bzero ; 00184 00186 int * ibuf ; 00188 float * fbuf ; 00190 double * dbuf ; 00191 00192 } qfitsloader ; 00193 00194 00195 /*----------------------------------------------------------------------------*/ 00238 /*----------------------------------------------------------------------------*/ 00239 typedef struct qfitsdumper { 00240 00242 char * filename ; 00244 int npix ; 00246 int ptype ; 00247 00249 int * ibuf ; 00251 float * fbuf ; 00253 double * dbuf ; 00254 00256 int out_ptype ; 00257 } qfitsdumper ; 00258 00259 /*----------------------------------------------------------------------------- 00260 Function prototypes 00261 -----------------------------------------------------------------------------*/ 00262 00263 int qfitsloader_init(qfitsloader *) ; 00264 int qfits_loadpix(qfitsloader *) ; 00265 int qfits_loadpix_window(qfitsloader *, int, int, int, int) ; 00266 int qfits_pixdump(qfitsdumper *) ; 00267 00268 #endif