File indexing completed on 2024-12-22 04:17:13

0001 /***************************************************************************
0002  *                                                                         *
0003  *   copyright : (C) 2015 C. Barth Netterfield                             *
0004  *                   netterfield@astro.utoronto.ca                         *
0005  *                                                                         *
0006  *   This program is free software; you can redistribute it and/or modify  *
0007  *   it under the terms of the GNU General Public License as published by  *
0008  *   the Free Software Foundation; either version 2 of the License, or     *
0009  *   (at your option) any later version.                                   *
0010  *                                                                         *
0011  ***************************************************************************/
0012 
0013 #ifndef BIS_H
0014 #define BIS_H
0015 
0016 #ifdef __cplusplus
0017     extern "C" {
0018 #endif
0019 
0020 #define BIS_OK 0
0021 #define BIS_NOOPEN 1
0022 #define BIS_UNKNOWN 2
0023 
0024 extern char *BIS_ERRORSTR[];
0025 
0026 typedef struct {
0027   int fp;
0028   char *fileName;
0029   int status;
0030   int frameSize;
0031   int formatType;
0032   int imagesPerFrame;
0033 } BISfile;
0034 
0035 
0036 typedef struct {
0037   unsigned short w;
0038   unsigned short h;
0039   unsigned short x;
0040   unsigned short y;
0041   int allocated;
0042   unsigned char *img;
0043 } BISimage;
0044 
0045 BISfile *BISopen(char *filename);
0046 void BISclose(BISfile *bis);
0047 
0048 int isBISfile(char *filename);
0049 
0050 int BISnframes(BISfile *bis);
0051 
0052 int BISreadimage(BISfile *bis, int frame, int i_img, BISimage *I);
0053 
0054 void BISInitImage(BISimage *image);
0055 void BISFreeImage(BISimage *image);
0056 
0057 
0058 #ifdef __cplusplus
0059 }
0060 #endif
0061 
0062 #endif