/******************************************************************************
 * Copyright 1990-2014 MBARI
 * MBARI Proprietary Information. All rights reserved.
 ******************************************************************************
 * Summary  : Example: implements interface to ACM 2-D Current Meter
 * Filename : 
 * Author   : 
 * Project  : Example: Benthic Rover
 * Version  : 
 * Created  : Example: Nov 08
 * Modified : 
 *****************************************************************************/
const unsigned int HDRSIZE = 122;
const unsigned int IMGSIZE = 5018400;
const unsigned int SLDSIZE = 2643983;
   
 class ImageFile
 {
   public:

   // Ctor
   ImageFile(const char* img_filename, bool debug);
   // Dtor
   ~ImageFile();
   

   // Member functions or methods
   unsigned int load();
   unsigned int dump(const char* filename);
   float calc_coverage(ImageFile *reference, ImageFile *mask);
   float calc_coverage(ImageFile *reference, ImageFile *mask, unsigned int threshold);
   float calc_intensity(ImageFile *reference, ImageFile *mask);
   unsigned int extract_timestamp();

   
   // Member variables or class attributes
   bool  _debug;
   char* _filename;
   unsigned short int _header[HDRSIZE];
   unsigned short int _data[IMGSIZE];
   float _coverage;
   float _intensity;

   // File timestamp
   unsigned int _year;
   unsigned int _month;
   unsigned int _day;
   unsigned int _hour;
   unsigned int _min;
   unsigned int _sec;

   
   unsigned int _cols, _rows;

 };
