C Standard Library Extensions
6.2.0
Main Page
Modules
Classes
Files
File List
src
qfits_image.h
1
/* $Id: qfits_image.h,v 1.1.1.1 2008-11-03 13:40:49 agabasch Exp $
2
*
3
* This file is part of the ESO QFITS Library
4
* Copyright (C) 2001-2004 European Southern Observatory
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
*/
20
21
/*
22
* $Author: agabasch $
23
* $Date: 2008-11-03 13:40:49 $
24
* $Revision: 1.1.1.1 $
25
* $Name: not supported by cvs2svn $
26
*/
27
28
#ifndef QFITS_IMAGE_H
29
#define QFITS_IMAGE_H
30
31
/*-----------------------------------------------------------------------------
32
Includes
33
-----------------------------------------------------------------------------*/
34
35
#include <stdio.h>
36
#include <stdlib.h>
37
#include <string.h>
38
#include <unistd.h>
39
40
/*-----------------------------------------------------------------------------
41
Defines
42
-----------------------------------------------------------------------------*/
43
45
#define PTYPE_FLOAT 0
46
47
#define PTYPE_INT 1
48
49
#define PTYPE_DOUBLE 2
50
51
/* FITS pixel depths */
52
/* FITS BITPIX=8 */
53
#define BPP_8_UNSIGNED (8)
54
/* FITS BITPIX=16 */
55
#define BPP_16_SIGNED (16)
56
/* FITS BITPIX=32 */
57
#define BPP_32_SIGNED (32)
58
/* FITS BITPIX=-32 */
59
#define BPP_IEEE_FLOAT (-32)
60
/* FITS BITPIX=-64 */
61
#define BPP_IEEE_DOUBLE (-64)
62
/* Default BITPIX for output */
63
#define BPP_DEFAULT BPP_IEEE_FLOAT
64
65
/*-----------------------------------------------------------------------------
66
New types
67
-----------------------------------------------------------------------------*/
68
69
/*----------------------------------------------------------------------------*/
76
/*----------------------------------------------------------------------------*/
77
typedef
unsigned
char
byte ;
78
79
/*----------------------------------------------------------------------------*/
149
/*----------------------------------------------------------------------------*/
150
typedef
struct
qfitsloader
{
151
153
int
_init
;
154
156
char
*
filename
;
158
int
xtnum
;
160
int
pnum
;
162
int
ptype
;
164
int
map
;
165
167
int
exts
;
169
int
lx
;
171
int
ly
;
173
int
np
;
175
int
bitpix
;
177
int
seg_start
;
179
int
seg_size
;
181
double
bscale
;
183
double
bzero
;
184
186
int
*
ibuf
;
188
float
*
fbuf
;
190
double
*
dbuf
;
191
192
}
qfitsloader
;
193
194
195
/*----------------------------------------------------------------------------*/
238
/*----------------------------------------------------------------------------*/
239
typedef
struct
qfitsdumper
{
240
242
char
*
filename
;
244
int
npix
;
246
int
ptype
;
247
249
int
*
ibuf
;
251
float
*
fbuf
;
253
double
*
dbuf
;
254
256
int
out_ptype
;
257
}
qfitsdumper
;
258
259
/*-----------------------------------------------------------------------------
260
Function prototypes
261
-----------------------------------------------------------------------------*/
262
263
int
qfitsloader_init
(
qfitsloader
*) ;
264
int
qfits_loadpix
(
qfitsloader
*) ;
265
int
qfits_loadpix_window
(
qfitsloader
*,
int
,
int
,
int
,
int
) ;
266
int
qfits_pixdump
(
qfitsdumper
*) ;
267
268
#endif
Generated by
1.8.1.1