long* naxes |
MUST be a pointer to: long naxes[ 3 ]. Index 0 will have
column size, 1 will have row size, and 2 will have number of frames if file is a data cube.
Or use NAXES_COL, NAXES_ROW, NAXES_NOF. |
int* naxis |
[optional] Pointer to int for NAXIS keyword value. Default:
NULL |
int* bitsPerPixel |
[optional] Pointer to int for BITPIX keyword value. Default:
NULL |
// This code demonstrates how to read the image dimensions
// ( naxes ) from the header of a FITS file.
#include <iostream>
#include "CFitsFile.h"
using namespace std;
using namespace arc;
int main()
{
long naxes[ CFitsFile::NAXES_SIZE ];
try {
CFitsFile cFits( "Image.fit" );
cFits.GetParameters( naxes );
cout << "# of rows: " << naxes[ CFitsFile::NAXES_ROW ]
<< "# of cols: " << naxes[ CFitsFile::NAXES_COL ]
<< endl;
}
catch ( std::exception &e )
{
cerr << "Exception Occurred: " << e.what() << endl;
}
}
© Astronomical Research Cameras, Inc.