31 #ifndef AXSUNOCTCAPTURE_H 32 #define AXSUNOCTCAPTURE_H 49 struct AxCaptureSession;
184 #include "WinSock2.h" 186 #pragma pack(1) // forces packing of data in AxPacket structure: sizeof(AxPacket) must be 34 bytes on Windows OS 190 uint16_t ascanLength;
191 uint16_t dataTypeCode;
192 uint16_t statusFlags;
195 uint32_t packetNumber;
196 uint16_t framesPacketNumber;
199 uint16_t syncOffsetInFrame;
200 uint16_t syncOffsetInAscan;
203 struct timeval packetTimeStamp;
205 } __attribute__((packed, aligned(1)))
AxPacket;
281 AxErr axGetStatus(
AOChandle session, uint32_t * imaging, uint32_t * last_packet_in, uint32_t * last_frame_in, uint32_t *last_image_in, uint32_t * droppedPackets_, uint32_t *frames_since_sync);
304 AxErr axGetImageInfo(
AOChandle session, int64_t requested_image_number, uint32_t * returned_image_number, uint32_t * required_buffer_size);
322 AxErr axGetImageInfoAdv(
AOChandle session, int64_t requested_image_number, uint32_t * returned_image_number, int32_t * height, int32_t * width,
AxDataType *data_type_out, uint32_t * required_buffer_size, uint8_t * force_trig, uint8_t * trig_too_fast);
338 AxErr axRequestImage(
AOChandle session, int64_t requested_image_number, uint32_t * returned_image_number, int32_t * height, int32_t * width,
AxDataType *data_type_out, uint8_t * image_data_out, uint32_t output_buf_len);
359 AxErr axRequestImageAdv(
AOChandle session, int64_t requested_image_number, uint8_t * image_data_out,
AxPacket * metadata_out, int32_t * height, int32_t * width,
AxDataType *data_type_out, uint32_t output_buf_len, uint8_t average_number,
AxRequestMode req_mode, uint8_t * force_trig, uint8_t * trig_too_fast);
391 AxErr axGetFrameInfoAdv(
AOChandle session, int64_t requested_frame_number, uint32_t * returned_frame_number, int32_t * height, int32_t * width,
AxDataType *data_type_out, uint32_t * required_buffer_size);
459 AxErr axSetupDisplay(
AOChandle session, uint8_t window_style, int32_t w_left, int32_t w_top, int32_t w_width, int32_t w_height, uintptr_t parent_window_handle);
495 AxErr axDisplayImage(
AOChandle session, int64_t requested_image_number, uint32_t * returned_image_number, int32_t * height, int32_t * width);
536 AxErr axScanConvert(
AOChandle session, uint8_t convert, uint8_t interpolation,
float inner_radius,
float outer_radius,
float crop_inner,
float crop_outer);
875 void axGetLibVersion(int32_t * major, int32_t * minor, int32_t * patch, int32_t * build,
char* version_str);
881 #endif // AXSUNOCTCAPTURE_H include guard AxFileType
Available file types to export using axExportImages().
Definition: AxsunOCTCapture.h:77
Structure for packet metadata. (Undocumented members are for internal use only.)
Definition: AxsunOCTCapture.h:189
double Y_range
Definition: AxsunOCTCapture.h:155
AxErr axHideWindow(AOChandle session, uint32_t hidden)
Hide or unhide the OpenGL image display window.
uint32_t ext_X_increments
Definition: AxsunOCTCapture.h:171
double * raster_pattern
Definition: AxsunOCTCapture.h:177
AxErr axImageRequestSize(AOChandle session, uint32_t start_Ascan, uint32_t total_Ascans)
Configure the cropped subset of A-scans to retrieve or display in subsequent calls to axRequestImage ...
Definition: AxsunOCTCapture.h:91
AxErr axCropRect(AOChandle session, float crop_left, float crop_top, float crop_bottom, float crop_right)
Change the rectangular cropping behavior of images displayed in an OpenGL window.
double X_shift
Definition: AxsunOCTCapture.h:157
void(__cdecl * AxConnectScannerCallbackFunction_t)(void *)
A user-provided function to be called upon connection or disconnection of a scanner (DAQmx) device.
Definition: AxsunOCTCapture.h:181
AxErr axGetImageInfo(AOChandle session, int64_t requested_image_number, uint32_t *returned_image_number, uint32_t *required_buffer_size)
Get basic information on an image in the Main Image Buffer.
AxErr axRequestFrameAdv(AOChandle session, int64_t requested_frame_number, uint8_t *frame_data_out, AxPacket *metadata_out, int32_t *height, int32_t *width, AxDataType *data_type_out, uint32_t output_buf_len)
Retrieve a frame from the Main Image Buffer (A frame is 256 A-scans, unsynchronized with Image_sync s...
Definition: AxsunOCTCapture.h:129
AxErr axSelectInterface(AOChandle session, AxInterface which_interface)
Select the data interface (Ethernet, PCIe, or none) for the capture session.
uint32_t X_increments
Definition: AxsunOCTCapture.h:149
Definition: AxsunOCTCapture.h:131
double X_phase
Definition: AxsunOCTCapture.h:163
Definition: AxsunOCTCapture.h:85
AxErr axScanCmd(AxScannerCommand scan_command, double misc_scalar, scan_params_t *scan_parameters, ext_pattern_t *external_scan_pattern, void *RFU)
Control analog output waveform generation for 2 channel (X-Y) scanners.
Definition: AxsunOCTCapture.h:127
AxErr axSelectColormap(AOChandle session, AxColormap colors)
Select the color scheme of images displayed in an OpenGL window.
AxErr axStartSession(AOChandle *session, float capacity_MB)
Start an Axsun Ethernet DAQ imaging session by allocating memory for the Main Image Buffer.
AxErr axRequestImage(AOChandle session, int64_t requested_image_number, uint32_t *returned_image_number, int32_t *height, int32_t *width, AxDataType *data_type_out, uint8_t *image_data_out, uint32_t output_buf_len)
Retrieve an image from the Main Image Buffer into a user buffer.
AxErr axSetTrigTimeout(AOChandle session, uint32_t framesUntilForceTrig_)
Control the behavior of Force Trigger mode.
Definition: AxsunOCTCapture.h:119
AxErr axGetMessage(AOChandle session, char *message_out)
Get a description of the capture session's interface status.
Definition: AxsunOCTCapture.h:117
AxErr axDownsampling(AOChandle session, uint8_t downsampling_state)
Enable or disable 2x downsampling during JPEG decompression.
uint32_t ext_Y_increments
Definition: AxsunOCTCapture.h:173
Definition: AxsunOCTCapture.h:115
AxErr axGetCompressedJPEGInfo(AOChandle session, int64_t requested_frame_number, uint32_t *returned_frame_number, uint32_t *required_buffer_size)
Get un-decompressed size information on a compressed JPEG frame in the Main Image Buffer (A frame is ...
AxErr axPipelineMode(AOChandle session, AxPipelineMode mode)
Configures FPGA registers to output the desired data type & location from the processing pipeline via...
void axGetLibVersion(int32_t *major, int32_t *minor, int32_t *patch, int32_t *build, char *version_str)
Get the library version.
double * linear_pattern
Definition: AxsunOCTCapture.h:175
AxInterface
Available capture interfaces to be selected by axSelectInterface().
Definition: AxsunOCTCapture.h:101
AxErr axRequestCompressedJPEG(AOChandle session, int64_t requested_frame_number, uint8_t *JPEG_data_out, AxPacket *metadata_out, uint32_t output_buf_len)
Retrieve an un-decompressed JPEG frame from the Main Image Buffer (A frame is 256 A-scans,...
Definition: AxsunOCTCapture.h:123
AxErr axReadFPGAreg(AOChandle session, uint16_t regnum, uint16_t *regval)
Read a FPGA register on the Axsun DAQ via the PCIe interface.
AxErr axExportImages(AOChandle session, const char *path_directory, int32_t *images_exported, AxFileType file_type)
Export images from the Main Image Buffer into individual binary files.
void axGetErrorString(AxErr errorcode, char *message_out)
Get a description of a specific AxErr error code.
uint32_t imageNumber
Definition: AxsunOCTCapture.h:198
AxErr
Error codes returned from AxsunOCTCapture or AxsunOCTControl_LW functions. Use axGetErrorString() for...
Definition: AxsunCommonEnums.h:23
int32_t axGetLibBuildDateTime(char *datetime_str)
Get a string describing the time and date that the library was built.
uint32_t frameNumber
Definition: AxsunOCTCapture.h:194
int32_t axGetLibBuildCfg(void)
Get the build configuration of the library.
Definition: AxsunOCTCapture.h:97
Definition: AxsunOCTCapture.h:81
double Y_idle
Definition: AxsunOCTCapture.h:161
Definition: AxsunOCTCapture.h:83
Definition: AxsunOCTCapture.h:121
Definition: AxsunOCTCapture.h:135
AxErr axGetImageInfoAdv(AOChandle session, int64_t requested_image_number, uint32_t *returned_image_number, int32_t *height, int32_t *width, AxDataType *data_type_out, uint32_t *required_buffer_size, uint8_t *force_trig, uint8_t *trig_too_fast)
Advanced function for getting information on an image in the Main Image Buffer.
Definition: AxsunOCTCapture.h:79
Definition: AxsunOCTCapture.h:141
Definition: AxsunOCTCapture.h:61
Definition: AxsunOCTCapture.h:95
AxDataType
Integer data types which may be generated by the Axsun DAQ depending on selected pipeline bypass mode...
Definition: AxsunOCTCapture.h:55
Definition: AxsunOCTCapture.h:109
Definition: AxsunOCTCapture.h:133
AxErr axSetupDisplay(AOChandle session, uint8_t window_style, int32_t w_left, int32_t w_top, int32_t w_width, int32_t w_height, uintptr_t parent_window_handle)
Setup an OpenGL display window for direct rendering of image data.
AxErr axUpdateWindowStyle(AOChandle session, uint8_t window_style)
Change the OpenGL display window style.
Definition: AxsunOCTCapture.h:63
AxErr axRequestImageAdv(AOChandle session, int64_t requested_image_number, uint8_t *image_data_out, AxPacket *metadata_out, int32_t *height, int32_t *width, AxDataType *data_type_out, uint32_t output_buf_len, uint8_t average_number, AxRequestMode req_mode, uint8_t *force_trig, uint8_t *trig_too_fast)
Advanced function for retrieving and/or displaying an image from the Main Image Buffer.
AxErr axSelectInterpolation(AOChandle session, uint8_t interpolation)
Change the OpenGL display interpolation mode.
AxErr axGetStatus(AOChandle session, uint32_t *imaging, uint32_t *last_packet_in, uint32_t *last_frame_in, uint32_t *last_image_in, uint32_t *droppedPackets_, uint32_t *frames_since_sync)
Get imaging mode status and Main Image Buffer statistics.
Structure for passing a user-generated scan pattern to axScanCmd(LOAD_EXT_PATTERN,...
Definition: AxsunOCTCapture.h:169
This header file contains enums and other definitions for integrating AxsunOCTCapture....
AxErr axUpdateView(AOChandle session, int32_t w_left, int32_t w_top, int32_t w_width, int32_t w_height)
Change the OpenGL window size and position.
Definition: AxsunOCTCapture.h:57
AxErr axWriteFPGAregBIT(AOChandle session, uint16_t regnum, uint8_t bitnum, uint8_t bitval)
Write a single bit in an FPGA register on the Axsun DAQ via the PCIe interface.
Definition: AxsunOCTCapture.h:125
AxErr axAdjustBrightnessContrast(AOChandle session, float brightness, float contrast)
Change the brightness and contrast of images displayed in an OpenGL window.
AxErr axResizeBuffer(AOChandle session, float capacity_MB)
Resets the Main Image Buffer with a new size.
Structure for passing rectangular raster scan pattern parameters to axScanCmd(SET_RECT_PATTERN,...
Definition: AxsunOCTCapture.h:147
AxErr axGetDataRate(AOChandle session, double *datarate_Mbps)
Get data transfer rate on the active interface.
uint32_t Y_increments
Definition: AxsunOCTCapture.h:151
double X_range
Definition: AxsunOCTCapture.h:153
AxErr axDisplayImage(AOChandle session, int64_t requested_image_number, uint32_t *returned_image_number, int32_t *height, int32_t *width)
Display an image from the Main Image Buffer directly to an OpenGL window (8-bit image data only).
double rotate
Definition: AxsunOCTCapture.h:165
Definition: AxsunOCTCapture.h:143
Definition: AxsunOCTCapture.h:137
AxErr axScanConvert(AOChandle session, uint8_t convert, uint8_t interpolation, float inner_radius, float outer_radius, float crop_inner, float crop_outer)
Change the polar -> rectangular scan conversion behavior of images displayed in an OpenGL window.
AxErr axLoadUserColormap(AOChandle session, uint8_t *user_colormap_in)
Load a user-defined AxColormap for images displayed in an OpenGL window.
Definition: AxsunOCTCapture.h:59
AxErr axStopSession(AOChandle session)
Stop a capture session and deallocate all resources, including Main Image Buffer and interfaces.
AxErr axGetFrameInfoAdv(AOChandle session, int64_t requested_frame_number, uint32_t *returned_frame_number, int32_t *height, int32_t *width, AxDataType *data_type_out, uint32_t *required_buffer_size)
Get information on a frame in the Main Image Buffer (A frame is 256 A-scans, unsynchronized with Imag...
AxErr axRegisterScannerConnectCallback(AxConnectScannerCallbackFunction_t callback_function, void *userData)
Registers a callback function to be executed following a scanner (DAQmx) device connection or disconn...
AxErr axClearBuffer(AOChandle session)
Clear Main Image Buffer by resetting all data to zero, leaving the buffer size the same.
Definition: AxsunOCTCapture.h:139
AxErr axWriteFPGAreg(AOChandle session, uint16_t regnum, uint16_t regval)
Write a FPGA register on the Axsun DAQ via the PCIe interface.
AxColormap
Available colormaps to select using axSelectColormap().
Definition: AxsunOCTCapture.h:69
double Y_shift
Definition: AxsunOCTCapture.h:159
Definition: AxsunOCTCapture.h:93
AxPipelineMode
DAQ pipeline modes.
Definition: AxsunCommonEnums.h:166
Definition: AxsunOCTCapture.h:103
Definition: AxsunOCTCapture.h:65
struct AxCaptureSession * AOChandle
Axsun OCT Capture handle - a pointer to the opaque structure used to manage created capture sessions.
Definition: AxsunOCTCapture.h:52
AxRequestMode
Available request modes to define behavior of axRequestImageAdv().
Definition: AxsunOCTCapture.h:89
Definition: AxsunOCTCapture.h:107
Definition: AxsunOCTCapture.h:105
AxScannerCommand
Available scanner command types to be executed by axScanCmd().
Definition: AxsunOCTCapture.h:113
AxErr axImagingCntrlPCIe(AOChandle session, int16_t number_of_images)
Control the image streaming behavior of the Axsun PCIe DAQ between Live Imaging, Burst Recording,...
AxErr axLoadFile(AOChandle session, const char *path_file, int32_t *packets_read)
Load contents from file on disk into Main Image Buffer.
AxErr axSaveFile(AOChandle session, const char *path_file, uint8_t full_buffer, int32_t *packets_written)
Save contents of Main Image Buffer to disk.