const char *filename |
A const char pointer to FITS file to open. The first
constructor is generally used to reading FITS data, while the second constructor is used
to write a FITS file. |
int mode |
[optional] Determines how the FITS file will be
created/opened. Can be read-only ( CFitsFile::READMODE ) or read-write
( CFitsFile::READWRITEMODE ). Default: CFitsFile::READMODE |
int rows |
The image row size ( in pixels ). For a data cube this
is the row size of the largest stored single image. |
int cols |
The image column size ( in pixels ). For a data cube
this is the column size of the largest stored single image. |
int bitsPerPixel |
[optional] The bits-per-pixel of the stored image data.
Can be 16-bit ( CFitsFile::BPP16 ) or 32-bit ( CFitsFile::BPP32 ). Default:
CFitsFile::BPP16 |
bool is3D |
[optional] Set to 'true' to create a FITS data cube;
set to 'false' otherwise. Default: false |
// This code demonstrates how to create a 16-bit FITS file
// and write a previously taken 512x600 pixel image that
// currently resides in the kernel image buffer
// (CController::mapFd).
#include <iostream>
#include "CController.h"
#include "CFitsFile.h"
using namespace std;
using namespace arc;
CController cController;
try {
// .... previously exposed quad readout
// .... image resides in kernel buffer
// .... at CController.mapFd
CFitsFile cFits( "Image.fit", 512, 600 );
cFits.Write( ( unsigned short * )cController.mapFd );
}
catch ( std::exception &e )
{
cerr << "Exception Occurred: " << e.what() << endl;
}
© Astronomical Research Cameras, Inc.