home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Graphics / Graphics.zip / xfitsvew.zip / XFITSview / xfitsview.h < prev    next >
C/C++ Source or Header  |  1998-04-03  |  4KB  |  84 lines

  1. /* XFITSview header file */
  2. /*-----------------------------------------------------------------------
  3. *  Copyright (C) 1996
  4. *  Associated Universities, Inc. Washington DC, USA.
  5. *  This program is free software; you can redistribute it and/or
  6. *  modify it under the terms of the GNU General Public License as
  7. *  published by the Free Software Foundation; either version 2 of
  8. *  the License, or (at your option) any later version.
  9. *
  10. *  This program is distributed in the hope that it will be useful,
  11. *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. *  GNU General Public License for more details.
  14. *-----------------------------------------------------------------------*/
  15. #include <Xm/Xm.h> 
  16. #include <Xm/DrawingA.h> 
  17. #include <Xm/MainW.h> 
  18. #include <stdlib.h>
  19. #include <stdio.h>
  20. #include "imag.h"
  21. #ifndef XFITSVIEW
  22. #define XFITSVIEW
  23. #define MAXCOLOR MAXHIST /* defined in matx.h */
  24.  
  25.  
  26. typedef struct {
  27. /* FITS stuff */
  28.     Logical valid;     /* If true then a FITS file is connected */
  29.     Image  *Image;     /* Image */
  30.     XImage *pixarray;  /* image pixel array, 1 byte per pixel */
  31.                        /* ordered by rows then column */
  32.     FStrng *FileName;  /* FITS file name */
  33.     FStrng *object;    /* object name  */
  34.     FStrng *units;     /* Image units */
  35.     Integer ndim;      /* number of dimensions */
  36.     Integer dim[7];    /* axis dimensionality array  */
  37.     FStrng *cname[7];  /* Axis labels  */
  38.     double crval[7];   /* axis coordinate reference values */
  39.     float crpix[7];    /* axis reference pixels  */
  40.     float crinc[7];    /* axis increments  */
  41.     float crot[7];     /* axis rotation  */
  42.     float data_max;    /* maximum pixel value */
  43.     float data_min;    /* minimum pixel value */
  44.     float epoch;       /* Epoch of coordinate system */
  45.     FStrng *obsdate;   /* observing date */
  46.     int iImageNx;    /* Image width (in pixel array) */
  47.     int iImageNy;    /* Image height (in pixel array) */
  48.     int iNumPlanes;  /* Number of planes in the image */
  49.     int iXPixel;     /* Cursor X pixel (in image) */
  50.     int iYPixel;     /* Cursor Y pixel (in image) */
  51.     int iFitted;     /* 1 if position fitted else 0 */
  52.     float fXpixel;   /*  fitted X pixel number */
  53.     float fYpixel;   /*  fitted Y pixel number */
  54.     float fBpixel;   /*  fitted peak brightness */
  55.     float PixRange[2];  /* range of pixel values to display */
  56.   int   iNonlinear; /* mapping: 0=> linear, 1=> sqrt, 2=>histo. Eq. */
  57.     int PlaneNo;      /* image plane number to display 0 rel */
  58. } ImageData;
  59.  
  60. /* global data structures */
  61. #ifdef XFITSVIEWMAIN
  62. ImageData image[2];  /* images */
  63. short  CurImag;      /* which image is current 0 or 1 */
  64. FStrng *FITS_dir;    /* FITSfile directory */
  65. FStrng *mark_dir;    /* Mark position directory */
  66. FStrng *log_dir;     /* logging directory */
  67. int    doLog;        /* it true position logging turned on */
  68. float  usr_equinox;  /* Equinox desired by user */
  69. Widget Display_shell;/* highest level widget */
  70. #endif             /* end of declarations for main */
  71.  
  72. #ifndef XFITSVIEWMAIN
  73. extern ImageData image[2];  /* images */
  74. extern short  CurImag;      /* which image is current 0 or 1 */
  75. extern FStrng *FITS_dir;    /* FITSfile directory */
  76. extern FStrng *mark_dir;    /* Mark position directory */
  77. extern FStrng *log_dir;     /* logging directory */
  78. extern int    doLog;        /* it true position logging turned on */
  79. extern float  usr_equinox;  /* Equinox desired by user */
  80. extern Widget Display_shell;/* highest level widget */
  81. #endif /* end of declarations for other files */
  82.  
  83. #endif /* XFITSVIEW */ 
  84.