#include <iostream>
#include "CFitsFile.h"
using namespace std;
using namespace arc;
int main()
{
try {
CFitsFile cFits( "Image.fit" );
unsigned short *pBuf = ( unsigned short * )cFits.Read();
if ( pBuf == NULL )
{
cerr << "Error: NULL image buffer!" << endl;
exit( 1 );
}
cout << "pBuf[ 0 ] = " << pBuf[ 0 ] << endl;
cFits.ReOpen();
cout << "pBuf[ 0 ] = " << pBuf[ 0 ] << endl;
}
catch ( std::exception &e )
{
cerr << "Exception Occurred: " << e.what() << endl;
}
}
© Astronomical Research Cameras, Inc.