iffreader.h
#ifndef _iffreader_h
#define _iffreader_h
#include <math.h>
#include <maya/ilib.h>
typedef unsigned char byte;
class MStatus;
class MString;
class IFFimageReader
{
public:
IFFimageReader ();
~IFFimageReader ();
MStatus open (MString filename);
MStatus close ();
MStatus readImage ();
MStatus getSize (int &x, int &y);
MString errorString ();
int getBytesPerChannel ();
bool isRGB ();
bool isGrayscale ();
bool hasDepthMap ();
bool hasAlpha ();
MStatus getPixel (int x, int y, int *r, int *g, int *b, int *a = NULL);
MStatus getDepth (int x, int y, float *d);
const byte *getPixelMap () const;
const float *getDepthMap () const;
protected:
ILimage *fImage;
byte *fBuffer;
float *fZBuffer;
};
#endif