26 #ifndef GRALE_FITSIMAGE_H
28 #define GRALE_FITSIMAGE_H
30 #include "graleconfig.h"
31 #include "coordinateinterface.h"
37 class GRALE_IMPORTEXPORT FITSImage :
public errut::ErrorBase
42 bool initNoCoordinates(
int w,
int h);
43 bool loadWCSCoordinates(
const std::string &fname);
44 bool loadRectCoordinates(
const std::string &fname);
45 bool loadNoCoordinates(
const std::string &fname);
46 bool save(
const std::string &fname)
const;
47 const double *getPixels()
const {
return m_pPixels; }
48 double getPixel(
int x,
int y)
const {
return m_pPixels[x + y*m_width]; }
49 void setPixel(
int x,
int y,
double value) { m_pPixels[x + y*m_width] = value; }
50 const CoordinateInterface *getCoordinateInterface()
const {
return m_pCoordinates; }
51 int getWidth()
const {
return m_width; }
52 int getHeight()
const {
return m_height; }
54 FITSImage *createCopy()
const;
56 CoordinateInterface *m_pCoordinates;
58 int m_width, m_height;
64 #endif // GRALE_FITSIMAGE_H