/*---------------------------------------------------------------------------*/
// Image Compression Toolbox v1.2
// written by
// Satish Kumar S
// satishkumr@lycos.com
//
// Copyright 1999 Satish Kumar S
//
// Permission is granted to use this software for research purposes as
// long as this notice stays attached to this software.
/*---------------------------------------------------------------------------*/
#ifndef _IMAGE_H
#define _IMAGE_H
class Image
{
public:
double *data; // the image data.
int width, height; // statistics of the image.
Image()
{
data = NULL;
width = height = 0;
}
~Image()
{
if (data) delete[] data;
data = NULL;
width = height = 0;
}
int LoadRawFile(char *fname, int width, int height);
int SaveRawFile(char *fname, int mustscale = 0);
int GetData(int x, int y, int xspan, int yspan, double *tdata);
int SetData(int x, int y, int xspan, int yspan, double *tdata);
int SetZeroBelow(double threshold);
void InitEmptyImage(int w, int h);
};
#endif