long lRows |
The image row dimension ( pixels ). |
long lCols |
The image column dimension ( pixels ). |
long lNumOfFrames |
The number of frames to read. |
float fExpTime |
The exposure time ( in seconds ). |
bool *pbAbort |
[optional] Pointer to a bool variable that can be used to
abort/stop an exposure/readout. Default: NULL |
CExpIFace* pExpIFace |
[optional] Pointer to a CExpIFace class that is called each time a
new frame is read into the image buffer. The user must override the FrameCallback() method ( see
CExpIFace.h for details ). Default: NULL |
bool bOpenShutter |
[optional] Function pointer to a callback function that is
called each time the current pixel count is read. The function takes a long parameter that is
the current pixel count. Default: true |
// This code demonstrates how to start and readout
// 2000 0.1 second images using continuous readout.
#include <iostream.h>
#include "CController.h"
#include "CDeinterlace.h"
using namespace std;
using namespace arc;
class IFExpose : public CExpIFace
{
public:
void ExposeCallback( float fElapsedTime ) { // Not Used }
void ReadCallback( int dPixelCount ) { // Not Used }
void FrameCallback( int dFPBCount,
int dPCIFrameCount,
int dRows,
int dCols,
void* pBuffer )
{
cout << "Read Frame: " << dFPBCount << " / " << lPCIFrameCount << endl;
//
// Deinterlace the image data
//
CDeinterlace cDeint;
cDeint.RunAlg( pBuf, lRows, lCols, CDeinterlace::DEINTERLACE_SERIAL );
// ... Could also add the data to a FITS data cube or
// whatever else we may want to do with it ( before
// it gets overwritten ) ...
}
};
int main()
{
CController cController;
IFExpose cIFExp;
bool bAbort = false;
// .... open driver, initialize, etc ....
try {
cController.Continuous( lRows, lCols, 2000, 0.1, &bAbort, cIFExp );
}
catch ( std::exception &e )
{
cerr << "Exception Occurred: " << e.what() << endl;
}
return 0;
}
© Astronomical Research Cameras, Inc.