My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
region.h
1 /***************************************************************/
2 /* REGION STUFF */
3 /***************************************************************/
4 
5 #define myPI 3.1415926535897932385
6 
7 typedef struct {
8  int exists;
9  double xrefval, yrefval;
10  double xrefpix, yrefpix;
11  double xinc, yinc;
12  double rot;
13  char type[6];
14 } WCSdata;
15 
16 typedef enum {
17  point_rgn,
18  line_rgn,
19  circle_rgn,
20  annulus_rgn,
21  ellipse_rgn,
22  elliptannulus_rgn,
23  box_rgn,
24  rectangle_rgn,
25  diamond_rgn,
26  sector_rgn,
27  poly_rgn
28 } shapeType;
29 
30 typedef enum { pixel_fmt, degree_fmt, hhmmss_fmt } coordFmt;
31 
32 typedef struct {
33  char sign; /* Include or exclude? */
34  shapeType shape; /* Shape of this region */
35 
36  union { /* Parameters - In pixels */
37 
38  /**** Generic Shape Data ****/
39 
40  struct {
41  double p[8]; /* Region parameters */
42  double sinT, cosT; /* For rotated shapes */
43  double a, b; /* Extra scratch area */
44  } gen;
45 
46  /**** Polygon Data ****/
47 
48  struct {
49  int nPts; /* Number of Polygon pts */
50  double *Pts; /* Polygon points */
51  double xmin,xmax; /* Polygon bounding box */
52  double ymin,ymax;
53  } poly;
54 
55  } param;
56 
57 } RgnShape;
58 
59 typedef struct {
60  int nShapes;
61  RgnShape *Shapes;
62  WCSdata wcs;
63 } SAORegion;
64 
65 #ifdef __cplusplus
66 extern "C" {
67 #endif
68 
69 int ffrrgn( const char *filename, WCSdata *wcs, SAORegion **Rgn, int *status );
70 int fftrgn( double X, double Y, SAORegion *Rgn );
71 void fffrgn( SAORegion *Rgn );
72 
73 #ifdef __cplusplus
74  }
75 #endif
76 
77 #define fits_read_rgnfile ffrrgn
78 #define fits_in_region fftrgn
79 #define fits_free_region fffrgn
80 
Definition: region.h:59
Definition: region.h:32
Definition: region.h:7