AxsunOCTCapture  3.6.0.0
Captures and buffers streamed imaged data from the Axsun Ethernet/PCIe DAQ and displays or retrieves images to a client application on request.
Data Structures | Macros | Typedefs | Enumerations | Functions
AxsunOCTCapture.h File Reference

This header file contains all exported function prototypes, structures, and enums necessary for integrating AxsunOCTCapture.dll into a client application. More...

#include "AxsunCommonEnums.h"

Go to the source code of this file.

Data Structures

struct  scan_params_t
 Structure for passing raster scan pattern parameters to axScanCmd(SET_RECT_PATTERN, ...). More...
 
struct  ext_pattern_t
 Structure for passing a user-generated scan pattern to axScanCmd(LOAD_EXT_PATTERN, ...). More...
 
struct  request_prefs_t
 Structure for image request preferences. More...
 
struct  export_prefs_t
 Structure for image export preferences (movie functionality requires installation of OpenCV). More...
 
struct  axpacket_t
 Structure for packet metadata (for internal use.) More...
 
struct  image_info_t
 Structure for conveying metadata information about an image. More...
 
struct  new_image_callback_data_t
 Structure for data made available to user in a new image callback event via registered AxNewImageCallbackFunction_t. More...
 

Macros

#define MOST_RECENT_IMAGE   0
 

Typedefs

typedef struct CaptureSession * AOChandle
 Axsun OCT Capture handle - a pointer to the opaque structure used to manage created capture sessions.
 
typedef enum AxDimension AxDimension
 Dimension for sectioning data cube with axRequestCutPlane().
 
typedef enum AxColormap AxColormap
 Available colormaps to select using axSelectColormap().
 
typedef enum AxFileType AxFileType
 Available file types to export using axExportImages() and axExportImagesAdv().
 
typedef enum AxRequestMode AxRequestMode
 Available request modes to define behavior of axRequestImageAdv().
 
typedef enum AxDAQEvent AxDAQEvent
 Types of transitions in DAQ's operational mode, conveyed via user callback function. See axRegisterDAQCallback() for usage.
 
typedef enum AxInterface AxInterface
 Available capture interfaces to be selected by axSelectInterface().
 
typedef enum AxScannerCommand AxScannerCommand
 Available scanner command types to be executed by axScanCmd().
 
typedef struct scan_params_t scan_params_t
 Structure for passing raster scan pattern parameters to axScanCmd(SET_RECT_PATTERN, ...).
 
typedef struct ext_pattern_t ext_pattern_t
 Structure for passing a user-generated scan pattern to axScanCmd(LOAD_EXT_PATTERN, ...).
 
typedef struct request_prefs_t request_prefs_t
 Structure for image request preferences.
 
typedef struct export_prefs_t export_prefs_t
 Structure for image export preferences (movie functionality requires installation of OpenCV).
 
typedef struct axpacket_t axpacket_t
 Structure for packet metadata (for internal use.)
 
typedef struct image_info_t image_info_t
 Structure for conveying metadata information about an image.
 
typedef struct new_image_callback_data_t new_image_callback_data_t
 Structure for data made available to user in a new image callback event via registered AxNewImageCallbackFunction_t.
 
typedef void(__cdecl * AxNewImageCallbackFunction_t) (new_image_callback_data_t, void *)
 A user-provided function to be called when a new image is enqueued in the Main Image Buffer. See axRegisterNewImageCallback() for usage.
 
typedef void(__cdecl * AxConnectScannerCallbackFunction_t) (void *)
 A user-provided function to be called upon connection or disconnection of a NI-DAQmx device. See axRegisterScannerConnectCallback() for usage.
 
typedef void(__cdecl * AxCallbackFunction_t) (uint32_t, void *)
 A generic user-provided callback function with an unsigned int and void* argument. See axRegisterExportCallback(), or axRegisterDAQCallback() for usage.
 

Enumerations

enum  AxDimension { XY, XZ, YZ }
 Dimension for sectioning data cube with axRequestCutPlane(). More...
 
enum  AxColormap { SEPIA, GREYSCALE, INV_GREYSCALE, USER_COLORMAP }
 Available colormaps to select using axSelectColormap().
 
enum  AxFileType {
  BINARY, JPEG, BMP, PNG,
  RAW3D, FILETYPE_RFU
}
 Available file types to export using axExportImages() and axExportImagesAdv(). More...
 
enum  AxRequestMode { RETRIEVE_TO_CALLER, DISPLAY_ONLY, RETRIEVE_AND_DISPLAY, REQUESTMODE_RFU }
 Available request modes to define behavior of axRequestImageAdv(). More...
 
enum  AxDAQEvent {
  IMAGING_STOP = 0, IMAGING_START = 1, RECORD_DONE = 2, RECORD_START = 3,
  CALIBRATION_DONE = 4, CALIBRATION_START = 5, LOAD_DONE = 6, LOAD_START = 7
}
 Types of transitions in DAQ's operational mode, conveyed via user callback function. See axRegisterDAQCallback() for usage. More...
 
enum  AxInterface { GIGABIT_ETHERNET, PCI_EXPRESS, NO_INTERFACE, INTERFACE_RFU }
 Available capture interfaces to be selected by axSelectInterface(). More...
 
enum  AxScannerCommand {
  INIT_SCAN, DESTROY_SCAN, SET_RECT_PATTERN, LOAD_EXT_PATTERN,
  CONTINUOUS_LINE_SCAN, CONTINUOUS_RASTER_SCAN, STOP_AT_POSITION, SETUP_BURST_RASTER,
  START_BURST_RASTER, WAIT_BURST, SET_SAMPLE_CLOCK, GET_DEVICE_SERIALNO,
  SELECT_DEVICE, COUNT_DEVICES, SET_MAX_VOLTAGE, SET_DIGITAL_OUTPUT,
  SET_SQUAREWAVE_OUTPUT, SET_XSINE_YRAMP_PATTERN, SET_AUX_DC_ANALOG_OUTPUT, SET_AUX_DC_ANALOG_MAX,
  SET_AUX_DC_ANALOG_MIN, GET_DEVICE_MODEL_NUMBER, SET_XSINE_YSINE_PATTERN
}
 Available scanner command types to be executed by axScanCmd(). More...
 

Functions

AxErr axStartSession (AOChandle *session, float capacity_MB)
 Start an Axsun DAQ imaging session by allocating memory for the Main Image Buffer. More...
 
AxErr axSelectInterface (AOChandle session, AxInterface which_interface)
 Select the data interface (Ethernet, PCIe, or none) for the capture session. More...
 
AxErr axStopSession (AOChandle session)
 Stop a capture session and deallocate all resources, including Main Image Buffer and interfaces. More...
 
void axGetErrorString (AxErr errorcode, char *message_out)
 Get a description of a specific AxErr error code. More...
 
AxErr axGetMessage (AOChandle session, char *message_out)
 Get a description of the capture session's interface status. More...
 
AxErr axGetStatus (AOChandle session, uint32_t *imaging, uint32_t *last_packet_in, uint32_t *last_frame_in, uint32_t *last_image_in, uint32_t *dropped_packets, uint32_t *frames_since_sync)
 Get imaging mode status and Main Image Buffer statistics. More...
 
AxErr axGetDataRate (AOChandle session, double *datarate_Mbps)
 Get data transfer rate on the active interface. More...
 
AxErr axGetImageRate (AOChandle session, int32_t *images_per_second)
 Get the rate of new images being enqueued in the main image buffer. More...
 
AxErr axGetImageInfo (AOChandle session, uint32_t requested_image, image_info_t *image_info)
 Get information on an image in the Main Image Buffer. More...
 
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)
 (DEPRECATED in v3.4.0) Advanced function for getting information on an image in the Main Image Buffer. More...
 
AxErr axRequestImage (AOChandle session, uint32_t requested_image, request_prefs_t prefs, uint32_t output_buf_len, uint8_t *image_data_out, image_info_t *image_info)
 Retrieve and/or display an image from the Main Image Buffer. More...
 
AxErr axRequestImageAdv (AOChandle session, int64_t requested_image_number, uint8_t *image_data_out, axpacket_t *metadata_out, int32_t *height, int32_t *width, AxDataType *data_type_out, uint32_t output_buf_len, request_prefs_t prefs, uint8_t *force_trig, uint8_t *trig_too_fast)
 (DEPRECATED in v3.4.0) Advanced function for retrieving and/or displaying an image from the Main Image Buffer. More...
 
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 Image_sync signal). More...
 
AxErr axRequestFrameAdv (AOChandle session, int64_t requested_frame_number, uint8_t *frame_data_out, axpacket_t *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 signal). More...
 
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 256 A-scans, unsynchronized with Image_sync signal). More...
 
AxErr axRequestCompressedJPEG (AOChandle session, int64_t requested_frame_number, uint8_t *JPEG_data_out, axpacket_t *metadata_out, uint32_t output_buf_len)
 Retrieve an un-decompressed JPEG frame from the Main Image Buffer (A frame is 256 A-scans, unsynchronized with Image_sync signal). More...
 
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. (WINDOWS ONLY) More...
 
AxErr axCountWindows (AOChandle session, int32_t *num_of_windows)
 Count the number of OpenGL display windows currently created. (WINDOWS ONLY) More...
 
AxErr axUpdateWindowStyle (AOChandle session, int32_t which_window, uint8_t window_style)
 Change the OpenGL display window style. (WINDOWS ONLY) More...
 
AxErr axSelectInterpolation (AOChandle session, int32_t which_window, uint8_t interpolation)
 Change the OpenGL display interpolation mode. (WINDOWS ONLY) More...
 
AxErr axDisplayImage (AOChandle session, int64_t requested_image_number, uint32_t *returned_image_number, int32_t *height, int32_t *width)
 (DEPRECATED in v3.4.0) Display an image from the Main Image Buffer directly to an OpenGL window (8-bit image data only). (WINDOWS ONLY) More...
 
AxErr axSelectColormap (AOChandle session, int32_t which_window, AxColormap colors)
 Select the color scheme of images displayed in an OpenGL window. (WINDOWS ONLY) More...
 
AxErr axLoadUserColormap (AOChandle session, int32_t which_window, uint8_t *user_colormap_in)
 Load a user-defined AxColormap for images displayed in an OpenGL window. (WINDOWS ONLY) More...
 
AxErr axScanConvert (AOChandle session, int32_t which_window, uint8_t convert, 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. (WINDOWS ONLY) More...
 
AxErr axUpdateView (AOChandle session, int32_t which_window, int32_t w_left, int32_t w_top, int32_t w_width, int32_t w_height)
 Change the OpenGL window size and position. (WINDOWS ONLY) More...
 
AxErr axCropRect (AOChandle session, int32_t which_window, float crop_left, float crop_top, float crop_bottom, float crop_right)
 Change the rectangular cropping behavior of images displayed in an OpenGL window. (WINDOWS ONLY) More...
 
AxErr axAdjustBrightnessContrast (AOChandle session, int32_t which_window, float brightness, float contrast)
 Change the brightness and contrast of images displayed in an OpenGL window. (WINDOWS ONLY) More...
 
AxErr axHideWindow (AOChandle session, int32_t which_window, uint32_t hidden)
 Hide or unhide the OpenGL image display window. (WINDOWS ONLY) More...
 
AxErr axSetTrigTimeout (AOChandle session, uint32_t framesUntilForceTrig)
 Control the behavior of Force Trigger mode. More...
 
AxErr axSaveFile (AOChandle session, const char *path_file, uint8_t full_buffer, int32_t *packets_written)
 Save contents of Main Image Buffer to disk. More...
 
AxErr axLoadFile (AOChandle session, const char *path_file, int32_t *packets_read)
 Load contents from file on disk into Main Image Buffer. More...
 
AxErr axResizeBuffer (AOChandle session, float capacity_MB)
 Clears and resets the Main Image Buffer, optionally with a new buffer size. More...
 
AxErr axImagingCntrlPCIe (AOChandle session, int16_t number_of_images)
 Control the image streaming behavior of the Axsun PCIe DAQ between Live Imaging, Burst Recording, and Imaging Off states. (WINDOWS ONLY) More...
 
AxErr axWriteFPGAreg (AOChandle session, uint16_t regnum, uint16_t regval)
 Write a FPGA register on the Axsun DAQ via the PCIe interface. (WINDOWS ONLY) More...
 
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. (WINDOWS ONLY) More...
 
AxErr axPipelineMode (AOChandle session, AxPipelineMode mode, AxChannelMode channels)
 Configures FPGA registers to output the desired data type & location from the processing pipeline via the PCIe interface. (WINDOWS ONLY) More...
 
AxErr axReadFPGAreg (AOChandle session, uint16_t regnum, uint16_t *regval)
 Read a FPGA register on the Axsun DAQ via the PCIe interface. (WINDOWS ONLY) More...
 
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 or graphics files. More...
 
AxErr axExportImagesAdv (AOChandle session, const char *path_directory, int32_t *images_exported, AxFileType file_type, uint32_t start_image, uint32_t end_image, request_prefs_t request_prefs, export_prefs_t export_prefs)
 Export images from the Main Image Buffer into individual graphics and movie files, with dimensional (cropping and scaling), intensity (brightness and contrast), and colormap adjustments. More...
 
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. (WINDOWS ONLY) More...
 
AxErr axRegisterScannerConnectCallback (AxConnectScannerCallbackFunction_t callback_function, void *userData)
 Registers a callback function to be executed following a scanner (DAQmx) device connection or disconnection event. (WINDOWS ONLY) More...
 
AxErr axRegisterDAQCallback (AOChandle session, AxCallbackFunction_t callback_function, void *user_data)
 Registers a callback function to be executed upon a change in the DAQ imaging state (e.g. transition to live, record, idle). More...
 
AxErr axReportImagingState (AOChandle session)
 Programmatically executes the pre-registered callback function to indicate the current DAQ imaging state. More...
 
AxErr axRegisterExportCallback (AOChandle session, AxCallbackFunction_t callback_function, void *user_data)
 Registers a callback function to be executed each time an image is exported using axExportImages() or axExportImagesAdv(). More...
 
AxErr axRegisterNewImageCallback (AOChandle session, AxNewImageCallbackFunction_t callback_function, void *user_data)
 Registers a callback function to be executed each time a new image is enqueued in the Main Image Buffer, whether captured from DAQ hardware or loaded from disk. More...
 
int32_t axGetLibBuildCfg (void)
 Get the build configuration of the library. More...
 
int32_t axGetLibBuildDateTime (char *datetime_str)
 Get a string describing the time and date that the library was built. More...
 
void axGetLibVersion (int32_t *major, int32_t *minor, int32_t *patch, int32_t *build, char *version_str)
 Get the library version. More...
 

Detailed Description

This header file contains all exported function prototypes, structures, and enums necessary for integrating AxsunOCTCapture.dll into a client application.

Please note that SIGNIFICANT API CHANGES have been made in this version 3.x relative to previous 2.x versions of the library:

General Functionality:

DAQmx Scanner Control Functionality:

OpenGL Display Functionality:

DETAILED RELEASE NOTES

Version 3.0.0.0

Version 3.1.0.0

Version 3.2.0.0

Version 3.3.0.0

Version 3.3.1.0

Version 3.4.0.0

Version 3.4.1.0

Version 3.4.2.0

Version 3.4.3.0

Version 3.4.4.0

Version 3.4.5.0

Version 3.5.0.0

Version 3.5.1.0

Version 3.5.2.0

Version 3.5.3.0

Version 3.5.4.0

Version 3.6.0.0

Enumeration Type Documentation

◆ AxDAQEvent

enum AxDAQEvent

Types of transitions in DAQ's operational mode, conveyed via user callback function. See axRegisterDAQCallback() for usage.

Enumerator
IMAGING_STOP 

Image data stopped being enqueued into the main image buffer.

IMAGING_START 

Image data started being enqueued into the main image buffer (via DAQ Live, DAQ Record, or via loading from disk).

RECORD_DONE 

Image data stopped being enqueued into the main image buffer following Burst Record mode.

RECORD_START 

Image data started to be enqueued via Burst Record mode.

CALIBRATION_DONE 

DAQ completed calibration routine.

CALIBRATION_START 

DAQ started calibration routine.

LOAD_DONE 

Image data stopped being enqueued into the main image buffer following loading from disk.

LOAD_START 

Image data started to be enqueued via loading from disk.

◆ AxDimension

Dimension for sectioning data cube with axRequestCutPlane().

Enumerator
XY 

Enface.

XZ 

Primary (fast) B-scan dimension.

YZ 

Secondary (slow) B-scan dimension.

◆ AxFileType

enum AxFileType

Available file types to export using axExportImages() and axExportImagesAdv().

Enumerator
BINARY 

Individual raw binary files.

JPEG 

Individual JPEG files.

BMP 

Individual Windows Bitmap (.bmp) files.

PNG 

Individual PNG files (requires OpenCV).

RAW3D 

3D raw binary file (raw 3D file can be imported into '3DView' available from http://www.rmrsystems.co.uk/volume_rendering.htm if all three dimensions are less than or equal to 512).

FILETYPE_RFU 

(reserved for future use).

◆ AxInterface

Available capture interfaces to be selected by axSelectInterface().

Enumerator
GIGABIT_ETHERNET 

Gigabit Ethernet interface.

PCI_EXPRESS 

PCI Express x8 interface. (WINDOWS ONLY)

NO_INTERFACE 

No interface selected.

INTERFACE_RFU 

(reserved for future use).

◆ AxRequestMode

Available request modes to define behavior of axRequestImageAdv().

Enumerator
RETRIEVE_TO_CALLER 

Copy image into the user-provided preallocated buffer.

DISPLAY_ONLY 

Display the image in an OpenGL window.

RETRIEVE_AND_DISPLAY 

Copy image into the user-provided preallocated buffer and display the image in an OpenGL window.

REQUESTMODE_RFU 

(reserved for future use).

◆ AxScannerCommand

Available scanner command types to be executed by axScanCmd().

Enumerator
INIT_SCAN 

Initialize & allocate scanner control resources (DEPRECATED).

DESTROY_SCAN 

Destroy & deallocate scanner control resources.

SET_RECT_PATTERN 

Configure a raster scan pattern with linear ramp waveforms on both X and Y dimensions.

LOAD_EXT_PATTERN 

Load an externally generated scan pattern.

CONTINUOUS_LINE_SCAN 

Start continuous line scanning based on configured scan pattern.

CONTINUOUS_RASTER_SCAN 

Start continuous raster scanning based on configured scan pattern.

STOP_AT_POSITION 

Move to a configured position and stop scanning.

SETUP_BURST_RASTER 

Prepare burst raster scan by pre-loading buffers and waiting at start position.

START_BURST_RASTER 

Start burst raster scan with minimum latency.

WAIT_BURST 

Wait for burst raster to complete.

SET_SAMPLE_CLOCK 

Change between external and internal sample clock.

GET_DEVICE_SERIALNO 

Get the device serial number.

SELECT_DEVICE 

Select a device to be the active device.

COUNT_DEVICES 

Count number of connected devices.

SET_MAX_VOLTAGE 

Set maximum allowable voltage for X scan and Y scan waveform outputs.

SET_DIGITAL_OUTPUT 

Control general purpose digital output.

SET_SQUAREWAVE_OUTPUT 

Control general purpose square wave synthesizer.

SET_XSINE_YRAMP_PATTERN 

Configure a raster scan pattern with sinusoidal waveform on the X dimension and linear ramp waveform on the Y dimension.

SET_AUX_DC_ANALOG_OUTPUT 

Control general purpose DC analog output voltage.

SET_AUX_DC_ANALOG_MAX 

Set general purpose DC analog output voltage maximum limit.

SET_AUX_DC_ANALOG_MIN 

Set general purpose DC analog output voltage minimum limit.

GET_DEVICE_MODEL_NUMBER 

Get the device model number. i.e. NI USB-xxxx

SET_XSINE_YSINE_PATTERN 

Configure a raster scan pattern with sinusoidal waveform on the X and Y dimensions.

Function Documentation

◆ axAdjustBrightnessContrast()

AxErr axAdjustBrightnessContrast ( AOChandle  session,
int32_t  which_window,
float  brightness,
float  contrast 
)

Change the brightness and contrast of images displayed in an OpenGL window. (WINDOWS ONLY)

Parameters
sessionThe opaque handle to the session created with axStartSession().
which_windowSelects which OpenGL window is targeted for this behavior change.
brightnessThe desired brightness. Typical values are in the range [-0.5, 0.5].
contrastThe desired contrast. Typical values are in the range [0.5, 1.5].
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. Note that if the color scheme is set to INVERTED GREYSCALE (see axLoadColormap), the behavior of the brightness parameter is inverted (i.e. higher values of the brightness parameter result in a darker image). Setting contrast = 0 auto-scales the Brightness and Contrast values once based on the next rendered image. Setting contrast = -1 auto-scales continuously for all subsequent rendered images.
Examples
AxsunOCTCapture_C_example.c, AxsunOCTCapture_Cpp_example.cpp, and AxsunOCTCapture_Cpp_example_NewImageCallback.cpp.

◆ axCountWindows()

AxErr axCountWindows ( AOChandle  session,
int32_t *  num_of_windows 
)

Count the number of OpenGL display windows currently created. (WINDOWS ONLY)

Parameters
sessionThe opaque handle to the session created with axStartSession().
num_of_windowsWill be populated with the number of OpenGL display windows currently created. This will correspond to the number of times axSetupDisplay() has been successfully called since session creation.
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code.

◆ axCropRect()

AxErr axCropRect ( AOChandle  session,
int32_t  which_window,
float  crop_left,
float  crop_top,
float  crop_bottom,
float  crop_right 
)

Change the rectangular cropping behavior of images displayed in an OpenGL window. (WINDOWS ONLY)

Parameters
sessionThe opaque handle to the session created with axStartSession().
which_windowSelects which OpenGL window is targeted for this behavior change.
crop_leftFraction of total image width cropped from left (0 = no cropping, 0.5 = half of image cropped, etc.).
crop_topFraction of total image height cropped from top.
crop_bottomFraction of total image height cropped from bottom.
crop_rightFraction of total image width cropped from right.
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. Cropping parameters less than zero are ignored.

◆ axDisplayImage()

AxErr axDisplayImage ( AOChandle  session,
int64_t  requested_image_number,
uint32_t *  returned_image_number,
int32_t *  height,
int32_t *  width 
)

(DEPRECATED in v3.4.0) Display an image from the Main Image Buffer directly to an OpenGL window (8-bit image data only). (WINDOWS ONLY)

Parameters
sessionThe opaque handle to the session created with axStartSession().
requested_image_numberThe image number requested for display. This can be a unique image number or it can be set < 1 to request the most recently enqueued image in the buffer.
returned_image_numberWill be populated with the unique image number displayed. This will be equal to the "requested_image_number" parameter unless that parameter is set < 1 to request the most recent image.
heightWill be populated with the height of the requested image (in pixels).
widthWill be populated with the width of the requested image (in pixels).
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. axDisplayImage requests the display (directly rendered into an OpenGL window) of an image from the Main Image Buffer. This function is DEPRECATED and may be removed in future versions. Instead use axRequestImage() with the prefs.request_mode member set to DISPLAY_ONLY.

◆ axExportImages()

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 or graphics files.

Parameters
sessionThe opaque handle to the session created with axStartSession().
path_directoryNul-terminated path to directory in which to export files (must be less than 200 characters).
images_exportedWill be populated with the number of images successfully exported.
file_typeThe desired file type (.bin, .jpg, .bmp, .png)
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. Note that any preexisting files in the directory indicated for exporting could be overwritten without warning. Do not call this function concurrently with new data being captured into the buffer (i.e. when the DAQ is in imaging mode) as buffer contents may change in an undesired fashion during export. Descriptors such as image dimensions (height & width) or data type are not exported in the raw .bin file; the user must associate these descriptors manually if needed. 2 or 4-byte data types are exported in big-endian format.

◆ axExportImagesAdv()

AxErr axExportImagesAdv ( AOChandle  session,
const char *  path_directory,
int32_t *  images_exported,
AxFileType  file_type,
uint32_t  start_image,
uint32_t  end_image,
request_prefs_t  request_prefs,
export_prefs_t  export_prefs 
)

Export images from the Main Image Buffer into individual graphics and movie files, with dimensional (cropping and scaling), intensity (brightness and contrast), and colormap adjustments.

Parameters
sessionThe opaque handle to the session created with axStartSession().
path_directoryNul-terminated path to directory in which to export binary files (must be less than 200 characters).
images_exportedWill be populated with the number of images successfully exported.
file_typeThe desired file type. Raw Binary files can be exported for any data type. PNG files can be exported for U8 and U16 data types. JPEG and BMP files can be exported only for U8 data type.
start_imageThe unique image number of the image at which to start exporting. If = 0, all images will be exported.
end_imageThe unique image number of the image at which to stop exporting. If = 0, all images will be exported.
request_prefsPreferences related to image averaging, cropping, and other behaviors (same scheme used in axRequestImage()).
export_prefsControls properties such as size, colormap, contrast, and brightness of the exported images.
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. Note that any preexisting files in the directory indicated for exporting could be overwritten without warning. Do not call this function concurrently with new data being captured into the buffer (i.e. when the DAQ is in imaging mode) as buffer contents may change in an undesired fashion during export. Descriptors such as image dimensions (height & width) or data type are not exported in the raw .bin file; the user must associate these descriptors manually if needed. 2 or 4-byte data types are exported in big-endian format.
Examples
AxsunOCTCapture_Cpp_linux_example.cpp.

◆ axGetCompressedJPEGInfo()

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 256 A-scans, unsynchronized with Image_sync signal).

Parameters
sessionThe opaque handle to the session created with axStartSession().
requested_frame_numberThe frame number for which information is desired. This can be a unique frame number or it can be set to -1 to get info on the most recently enqueued frame in the buffer.
returned_frame_numberWill be populated with the unique frame number. This will be equal to the "requested_frame_number" parameter unless that parameter is set to -1 to get info on the most recent frame.
required_buffer_sizeWill be populated with the required size (in bytes) of a user buffer that must be allocated before JPEG retrieval using axRequestCompressedJPEG.
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. axGetCompressedJPEGInfo() gets information on a JPEG compressed frame in the Main Image Buffer before a request is made to retrieve the JPEG data into a user buffer. A call to axGetCompressedJPEGInfo() is intended to precede a call to axRequestCompressedJPEG() and provides several arguments to axRequestCompressedJPEG() (e.g. output_buf_len, requested_frame_number) and identifies "stale" images (for avoiding redundant memory copies if calling axRequestCompressedJPEG using the same requested frame number on consecutive calls).

◆ axGetDataRate()

AxErr axGetDataRate ( AOChandle  session,
double *  datarate_Mbps 
)

Get data transfer rate on the active interface.

Parameters
sessionThe opaque handle to the session created with axStartSession().
datarate_MbpsThe estimated data transfer rate for the most recently enqueued image data in in megabits/second.
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code.

◆ axGetErrorString()

void axGetErrorString ( AxErr  errorcode,
char *  message_out 
)

Get a description of a specific AxErr error code.

Parameters
errorcodeAn AxErr error code returned from another function in the AxsunOCTCapture API.
message_outA pointer to a pre-allocated output buffer of characters with size at least 512 bytes into which a nul-terminated description for errorcode will be copied. axGetErrorString() can be called at any time; creation of a valid capture session is not required. It is unsafe to pass a message_out output buffer allocated with fewer than 512 bytes.
Examples
axScanCmd_Test.cpp, AxsunOCTCapture_C_example.c, AxsunOCTCapture_Cpp_example.cpp, AxsunOCTCapture_Cpp_example_NewImageCallback.cpp, and AxsunOCTCapture_Cpp_linux_example.cpp.

◆ axGetFrameInfoAdv()

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 Image_sync signal).

Parameters
sessionThe opaque handle to the session created with axStartSession().
requested_frame_numberThe frame number for which information is desired. This can be a unique frame number or it can be set to -1 to get info on the most recently enqueued frame in the buffer.
returned_frame_numberWill be populated with the unique frame number. This will be equal to the "requested_frame_number" parameter unless that parameter is set to -1 to get info on the most recent frame.
heightWill be populated with the height of the requested frame (in pixels).
widthWill be populated with the width of the requested frame (in pixels).
data_type_outWill be populated with the data type of the requested frame (see AxDataType enum definition)
required_buffer_sizeWill be populated with the required size (in bytes) of a user buffer that must be allocated before frame retrieval using axRequestFrameAdv.
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. axGetFrameInfoAdv() gets information on a frame in the Main Image Buffer before a more computationally expensive request is made to retrieve the frame data. A call to axGetFrameInfoAdv() is intended to precede a call to axRequestFrameAdv() and provides several arguments to axRequestFrameAdv() (e.g. output_buf_len, requested_frame_number) and identifies "stale" images (for avoiding the wasted computation resources incurred by calling axRequestFrameAdv using the same requested frame number on consecutive calls).

◆ axGetImageInfo()

AxErr axGetImageInfo ( AOChandle  session,
uint32_t  requested_image,
image_info_t image_info 
)

Get information on an image in the Main Image Buffer.

Parameters
sessionThe opaque handle to the session created with axStartSession().
requested_imageThe image number for which information is desired. This can be a unique image number > 1, or it can be 0 to get info on the most recently enqueued image in the buffer.
image_infoA image_info_t struct which will be populated with information about the requested image.
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. axGetImageInfo() gets information on an image in the Main Image Buffer before a more computationally expensive request is made to retrieve or display the image. A call to axGetImageInfo() is intended to precede a call to axRequestImage() and the returned image_info provides several arguments to that subsequent function call (e.g. output_buf_len, requested_image) and identifies "stale" images (for avoiding the wasted computation resources incurred by calling axRequestImage() using the same requested image number on consecutive calls). /*!
Examples
AxsunOCTCapture_C_example.c, AxsunOCTCapture_Cpp_example.cpp, and AxsunOCTCapture_Cpp_linux_example.cpp.

◆ axGetImageInfoAdv()

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 
)

(DEPRECATED in v3.4.0) Advanced function for getting information on an image in the Main Image Buffer.

Parameters
sessionThe opaque handle to the session created with axStartSession().
requested_image_numberThe image number for which information is desired. This can be a unique image number > 1, or it can be set < 1 to get info on the most recently enqueued image in the buffer.
returned_image_numberWill be populated with the unique image number. This will be equal to the "requested_image_number" parameter unless that parameter is set < 1 to get info on the most recent image.
heightWill be populated with the height of the requested image (in pixels).
widthWill be populated with the width of the requested image (in pixels).
data_type_outWill be populated with the data type of the requested image (see AxDataType enum definition)
required_buffer_sizeWill be populated with the required size (in bytes) of a user buffer that must be allocated before image retrieval using axRequestImageAdv or axRequestImage.
force_trigWill be populated with 1 if requested image was acquired in Force Trigger mode, or 0 otherwise. See description associated with axSetTrigTimeout function.
trig_too_fastWill be populated with 1 if Image_sync trigger period is too short, or 0 otherwise.
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. axGetImageInfoAdv() gets information on an image in the Main Image Buffer before a more computationally expensive request is made to retrieve or display the image. A call to axGetImageInfoAdv() is intended to precede a call to axRequestImageAdv() and provides several arguments to axRequestImageAdv() (e.g. output_buf_len, requested_image_number) and identifies "stale" images (for avoiding the wasted computation resources incurred by calling axRequestImageAdv() using the same requested image number on consecutive calls). This function is DEPRECATED and may be removed in future versions. Use axGetImageInfo() instead.

◆ axGetImageRate()

AxErr axGetImageRate ( AOChandle  session,
int32_t *  images_per_second 
)

Get the rate of new images being enqueued in the main image buffer.

Parameters
sessionThe opaque handle to the session created with axStartSession().
images_per_secondThe estimated rate for the most recently enqueued image data in images/second.
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code.

◆ axGetLibBuildCfg()

int32_t axGetLibBuildCfg ( void  )

Get the build configuration of the library.

Returns
= a bitfield with information about the build configuration options used to compile the loaded library. \ Bit 0: = 0 for 'debug' configuration or = 1 for 'release' configuration \ Bit 1: (for internal use only) \ Bit 2: = 0 for non-verbose mode or = 1 for verbose logging mode

◆ axGetLibBuildDateTime()

int32_t axGetLibBuildDateTime ( char *  datetime_str)

Get a string describing the time and date that the library was built.

Parameters
datetime_strA pointer to a pre-allocated output buffer of characters with size at least 100 bytes into which a nul-terminated date & time string will be copied.
Returns
The number of characters (bytes) written into the datetime_str buffer. It is unsafe to pass a datetime_str output buffer allocated with fewer than 100 bytes.

◆ axGetLibVersion()

void axGetLibVersion ( int32_t *  major,
int32_t *  minor,
int32_t *  patch,
int32_t *  build,
char *  version_str 
)

Get the library version.

Parameters
majorVersion number major element.
minorVersion number minor element.
patchVersion number patch element.
buildVersion number build element.
version_strA pointer to a pre-allocated output buffer of characters with size at least 16 bytes into which a nul-terminated version string will be copied. It is unsafe to pass a version_str output buffer allocated with fewer than 16 bytes.

◆ axGetMessage()

AxErr axGetMessage ( AOChandle  session,
char *  message_out 
)

Get a description of the capture session's interface status.

Parameters
sessionThe opaque handle to the session created with axStartSession().
message_outA pointer to a pre-allocated buffer of characters with size at least 256 bytes into which a nul-terminated message string will be copied.
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. axGetMessage() can be called any time after creation of a valid capture session and will describe the status of the capture interface. A capture session without a valid capture interface will support only review of previously saved and re-loaded data using axSaveFile() and axLoadFile(). It is unsafe to pass an output buffer allocated with fewer than 256 bytes.
Examples
AxsunOCTCapture_C_example.c, AxsunOCTCapture_Cpp_example.cpp, AxsunOCTCapture_Cpp_example_NewImageCallback.cpp, and AxsunOCTCapture_Cpp_linux_example.cpp.

◆ axGetStatus()

AxErr axGetStatus ( AOChandle  session,
uint32_t *  imaging,
uint32_t *  last_packet_in,
uint32_t *  last_frame_in,
uint32_t *  last_image_in,
uint32_t *  dropped_packets,
uint32_t *  frames_since_sync 
)

Get imaging mode status and Main Image Buffer statistics.

Parameters
sessionThe opaque handle to the session created with axStartSession().
imagingInterpreted as a bit-field: bit 0 set indicates imaging is active, bit 1 set indicates burst recording is active, bit 2 set indicates loading from disk is active.
last_packet_inWill be populated with the unique packet number most recently enqueued into the Main Image Buffer.
last_frame_inWill be populated with the unique frame number most recently enqueued into the Main Image Buffer.
last_image_inWill be populated with the unique image number most recently enqueued into the Main Image Buffer.
droppedPacketsWill be populated with the number of packets dropped since the last imaging mode reset.
frames_since_syncWill be populated with the number of frames enqueued since the last Image_sync pulse was received. When this number reaches the configured trigger timeout, the driver will transition to Force Trigger mode.
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code.
Examples
AxsunOCTCapture_C_example.c, AxsunOCTCapture_Cpp_example.cpp, AxsunOCTCapture_Cpp_example_NewImageCallback.cpp, and AxsunOCTCapture_Cpp_linux_example.cpp.

◆ axHideWindow()

AxErr axHideWindow ( AOChandle  session,
int32_t  which_window,
uint32_t  hidden 
)

Hide or unhide the OpenGL image display window. (WINDOWS ONLY)

Parameters
sessionThe opaque handle to the session created with axStartSession().
which_windowSelects which OpenGL window is targeted for this state change.
hiddenThe desired window visibility state (visible = 0, hidden = 1).
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code.

◆ axImagingCntrlPCIe()

AxErr axImagingCntrlPCIe ( AOChandle  session,
int16_t  number_of_images 
)

Control the image streaming behavior of the Axsun PCIe DAQ between Live Imaging, Burst Recording, and Imaging Off states. (WINDOWS ONLY)

Parameters
sessionThe opaque handle to the session created with axStartSession().
number_of_imagesSet this argument to zero (0) for Imaging Off; set it to (-1) for Live Imaging (no record), or set it to any positive value between 1 and 32767 to request the desired number of images in a Burst Record operation.
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. axImagingCntrlPCIe() controls the DMA-based transfer of images from the Axsun DAQ via the PCIe interface. Note that this function does NOT control the laser and therefore the laser emission (along with its sweep trigger and k-clocks) must be enabled separately. This function takes a single parameter to select between three states: Live Imaging, Burst Record, or Imaging Off. In Live Imaging mode, the DAQ will acquire and transmit images indefinitely. In Burst Record mode (a sub-mode of Live Imaging mode), the DAQ will acquire and transmit the finite number of images requested and then automatically transition itself to the Imaging Off state.
Examples
AxsunOCTCapture_C_example.c, AxsunOCTCapture_Cpp_example.cpp, and AxsunOCTCapture_Cpp_example_NewImageCallback.cpp.

◆ axLoadFile()

AxErr axLoadFile ( AOChandle  session,
const char *  path_file,
int32_t *  packets_read 
)

Load contents from file on disk into Main Image Buffer.

Parameters
sessionThe opaque handle to the session created with axStartSession().
path_fileFull directory and filename from which to load data.
packets_readWill be populated with the number of packets successfully loaded from disk.
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. Note that a subsequent call to axGetStatus is useful for determining the number of frames and images loaded into the Main Image Buffer by this function. A call to axResizeBuffer() can be used to clear the Main Image Buffer prior to loading. This function should be called only when images are NOT currently being enqueued into the buffer by a connected DAQ board.
Examples
AxsunOCTCapture_Cpp_linux_example.cpp.

◆ axLoadUserColormap()

AxErr axLoadUserColormap ( AOChandle  session,
int32_t  which_window,
uint8_t *  user_colormap_in 
)

Load a user-defined AxColormap for images displayed in an OpenGL window. (WINDOWS ONLY)

Parameters
sessionThe opaque handle to the session created with axStartSession().
user_colormap_inThe colormap array to be loaded.
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. To display a user-defined color map loaded using this function, the "user" AxColormap must be selected with axSelectColormap(). The colormap format is a 768-byte array composed of 256 R,G,B triads: (R0, G0, B0), (R1, G1, B1), (R2, G2, B2), ..., (R255, G255, B255).

◆ axPipelineMode()

AxErr axPipelineMode ( AOChandle  session,
AxPipelineMode  mode,
AxChannelMode  channels 
)

Configures FPGA registers to output the desired data type & location from the processing pipeline via the PCIe interface. (WINDOWS ONLY)

Parameters
sessionThe opaque handle to the session created with axStartSession().
modeThe desired pipeline mode according to the numbered pipeline diagram shown as in the Operator's Manual.
channelsThe desired channel selection mode (see AxChannelMode enum)
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. Note that this function does not subsequently query the DAQ hardware to confirm the write was actually successful. A return value of NO_AxERROR only indicates the software's request was made successfully. Call axReadFPGAreg() to confirm hardware register value if desired.
Examples
AxsunOCTCapture_C_example.c, AxsunOCTCapture_Cpp_example.cpp, and AxsunOCTCapture_Cpp_example_NewImageCallback.cpp.

◆ axReadFPGAreg()

AxErr axReadFPGAreg ( AOChandle  session,
uint16_t  regnum,
uint16_t *  regval 
)

Read a FPGA register on the Axsun DAQ via the PCIe interface. (WINDOWS ONLY)

Parameters
sessionThe opaque handle to the session created with axStartSession().
regnumThe unique register number to which the read operation is directed.
regvalWill be populated with the register value fetched from the FPGA.
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. axReadFPGAreg is functionally equivalent to the AxsunOCTControl.dll library function "GetFPGARegister" used when connected to the DAQ via Ethernet or USB.

◆ axRegisterDAQCallback()

AxErr axRegisterDAQCallback ( AOChandle  session,
AxCallbackFunction_t  callback_function,
void *  user_data 
)

Registers a callback function to be executed upon a change in the DAQ imaging state (e.g. transition to live, record, idle).

Parameters
sessionThe opaque handle to the session created with axStartSession().
callback_functionA user-supplied function to be called. Pass NULL to un-register a callback function.
user_dataAn arbitrary structure to be made available inside the callback function (or NULL if unused).
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. The supplied callback function will be executed when the DAQ image state changes, or when axReportImagingState() is called. The int32_t argument available in the registered AxCallbackFunction_t will convey the DAQ imaging state per the AxDAQEvent enum.
Examples
AxsunOCTCapture_Cpp_example_NewImageCallback.cpp, and AxsunOCTCapture_Cpp_linux_example.cpp.

◆ axRegisterExportCallback()

AxErr axRegisterExportCallback ( AOChandle  session,
AxCallbackFunction_t  callback_function,
void *  user_data 
)

Registers a callback function to be executed each time an image is exported using axExportImages() or axExportImagesAdv().

Parameters
sessionThe opaque handle to the session created with axStartSession().
callback_functionA user-supplied function to be called. Pass NULL to un-register a callback function.
user_dataAn arbitrary structure to be made available inside the callback function (or NULL if unused).
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. The supplied callback function will be executed when an image is exported. This provides client software with the ability to monitor the export status, update a progress bar, etc. The callback function is executed in the main exporting thread and thus delays in the user callback will delay return of the associated axExportImages() or axExportImagesAdv() call. The int32_t argument available in the registered AxCallbackFunction_t will convey the image number of the exported image.
Examples
AxsunOCTCapture_Cpp_linux_example.cpp.

◆ axRegisterNewImageCallback()

AxErr axRegisterNewImageCallback ( AOChandle  session,
AxNewImageCallbackFunction_t  callback_function,
void *  user_data 
)

Registers a callback function to be executed each time a new image is enqueued in the Main Image Buffer, whether captured from DAQ hardware or loaded from disk.

Parameters
sessionThe opaque handle to the session created with axStartSession().
callback_functionA user-supplied function to be called. Pass NULL to un-register a callback function.
user_dataAn arbitrary structure to be made available inside the callback function (or NULL if unused).
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. This function enables event-driven program flow in the client application, as an alternative to polling the Main Image Buffer for new images using axGetImageInfo(). The data argument available in the registered AxNewImageCallbackFunction_t will convey the unique image number of the newly enqueued image.
Examples
AxsunOCTCapture_Cpp_example_NewImageCallback.cpp.

◆ axRegisterScannerConnectCallback()

AxErr axRegisterScannerConnectCallback ( AxConnectScannerCallbackFunction_t  callback_function,
void *  userData 
)

Registers a callback function to be executed following a scanner (DAQmx) device connection or disconnection event. (WINDOWS ONLY)

Parameters
callback_functionA user-supplied function to be called. Pass NULL to un-register a callback function.
userDataAn arbitrary structure to be made available inside the callback function (or NULL if unused).
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. The supplied callback function will be executed by a background thread when a new DAQmx device is detected or when an existing device is disconnected. Within the callback function, access is provided to arbitrary user data passed as a void* parameter to this function.
Examples
axScanCmd_Test.cpp.

◆ axReportImagingState()

AxErr axReportImagingState ( AOChandle  session)

Programmatically executes the pre-registered callback function to indicate the current DAQ imaging state.

Parameters
sessionThe opaque handle to the session created with axStartSession().
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. Before calling this function, register your custom callback function using axRegisterDAQCallback(). This function aids event-driven program flow in the client application, as an alternative to polling the 'imaging' parameter in axGetStatus().

◆ axRequestCompressedJPEG()

AxErr axRequestCompressedJPEG ( AOChandle  session,
int64_t  requested_frame_number,
uint8_t *  JPEG_data_out,
axpacket_t metadata_out,
uint32_t  output_buf_len 
)

Retrieve an un-decompressed JPEG frame from the Main Image Buffer (A frame is 256 A-scans, unsynchronized with Image_sync signal).

Parameters
sessionThe opaque handle to the session created with axStartSession().
requested_frame_numberThe frame number requested for retrieval. This can be a unique image number or it can be set to -1 to request the most recently enqueued frame in the buffer.
JPEG_data_outA pre-allocated buffer into which the retrieved JPEG frame is copied for subsequent user interaction. Buffer size must be at least as large as indicated by a preceding call to axGetCompressedJPEGInfo ("required_buffer_size").
metadata_outA pre-allocated buffer of sizeof(axpacket_t) bytes into which frame metadata is copied.
output_buf_lenThe pre-allocated length in bytes of the JPEG_data_out buffer.
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. axRequestCompressedJPEG() requests the retrieval (into a pre-allocated buffer defined by the user) of un-decompressed JPEG information. This JPEG can subsequently be saved as a file and/or decompressed by the user's preferred JPEG decompression library or utility. A call to axRequestCompressedJPEG() is intended to follow a call to axGetCompressedJPEGInfo(), which provides several arguments to axRequestCompressedJPEG() (e.g. output_buf_len, requested_frame_number) and identifies "stale" images (for avoiding redundant memory copies if calling axRequestCompressedJPEG using the same requested frame number on consecutive calls).

◆ axRequestFrameAdv()

AxErr axRequestFrameAdv ( AOChandle  session,
int64_t  requested_frame_number,
uint8_t *  frame_data_out,
axpacket_t 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 signal).

Parameters
sessionThe opaque handle to the session created with axStartSession().
requested_frame_numberThe frame number requested for retrieval. This can be a unique image number or it can be set to -1 to request the most recently enqueued frame in the buffer.
frame_data_outA pre-allocated buffer into which the retrieved frame is copied for subsequent user interaction. Buffer size must be at least as large as indicated by a preceding call to axGetFrameInfoAdv ("required_buffer_size").
metadata_outA pre-allocated buffer of sizeof(axpacket_t) bytes into which metadata is copied.
heightWill be populated with the height of the requested frame (in pixels).
widthWill be populated with the width of the requested frame (in pixels).
data_type_outWill be populated with the data type of the requested frame (see AxDataType enum definition)
output_buf_lenThe pre-allocated length in bytes of the frame_data_out buffer.
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. axRequestFrameAdv() requests the retrieval (into a pre-allocated buffer defined by the user) of a frame from the Main Image Buffer. A call to axRequestFrameAdv() is intended to follow a call to axGetFrameInfoAdv(), which provides several arguments to axRequestFrameAdv() (e.g. output_buf_len, requested_frame_number) and identifies "stale" images (for avoiding the wasted computation resources incurred by calling axRequestFrameAdv using the same requested frame number on consecutive calls). OpenGL display of frames is currently unsupported.

◆ axRequestImage()

AxErr axRequestImage ( AOChandle  session,
uint32_t  requested_image,
request_prefs_t  prefs,
uint32_t  output_buf_len,
uint8_t *  image_data_out,
image_info_t image_info 
)

Retrieve and/or display an image from the Main Image Buffer.

Parameters
sessionThe opaque handle to the session created with axStartSession().
requested_imageThe image number requested for retrieval or display. This must be a unique image number returned from a prior call to axGetImageInfo(). For the most recently enqueued image in the buffer, use a value < 1 as the requested_image argument in axGetImageInfo().
prefsA structure containing preferences related to image averaging, request mode, image cropping, and other behaviors.
output_buf_lenThe size in bytes of the pre-allocated image_data_out buffer. Don't lie, or crashes could ensue.
image_data_outA pre-allocated buffer into which the retrieved image is copied for subsequent user interaction. Buffer size must be at least as large as indicated by a preceding call to axGetImageInfo() or axGetImageInfoAdv() (i.e. the required_buffer_size) unless accomodations are made manually for image cropping or downsampling in the request prefs.
image_infoAn image_info_t struct which will be populated with information about the retreived and/or displayed image. NOTE: height, width, and size_bytes values may be different from prior call to axGetImageInfo() if the request prefs include cropping or downsampling.
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. axRequestImage() requests the retrieval (into a pre-allocated buffer defined by the user) or direct display (via OpenGL rendering) of an image from the Main Image Buffer. /*!
Examples
AxsunOCTCapture_C_example.c, AxsunOCTCapture_Cpp_example.cpp, AxsunOCTCapture_Cpp_example_NewImageCallback.cpp, and AxsunOCTCapture_Cpp_linux_example.cpp.

◆ axRequestImageAdv()

AxErr axRequestImageAdv ( AOChandle  session,
int64_t  requested_image_number,
uint8_t *  image_data_out,
axpacket_t metadata_out,
int32_t *  height,
int32_t *  width,
AxDataType data_type_out,
uint32_t  output_buf_len,
request_prefs_t  prefs,
uint8_t *  force_trig,
uint8_t *  trig_too_fast 
)

(DEPRECATED in v3.4.0) Advanced function for retrieving and/or displaying an image from the Main Image Buffer.

Parameters
sessionThe opaque handle to the session created with axStartSession().
requested_image_numberThe image number requested for retrieval and/or display. This can be a unique image number > 1 or it can be set to -1 to request the most recently enqueued image in the buffer.
image_data_outA pre-allocated buffer into which the retrieved image is copied for subsequent user interaction. Buffer size must be at least as large as indicated by a preceding call to axGetImageInfo or axGetImageInfoAdv ("required_buffer_size"). Can be NULL if req_mode parameter is set to DISPLAY_ONLY.
metadata_outA pre-allocated buffer of sizeof(axpacket_t) bytes into which pertinent image metadata is copied.
heightWill be populated with the height of the requested image (in pixels).
widthWill be populated with the width of the requested image (in pixels).
data_type_outWill be populated with the data type of the requested image (see AxDataType enum definition)
output_buf_lenThe pre-allocated length in bytes of the image_data_out buffer. Can be 0 if req_mode parameter is set to DISPLAY_ONLY.
prefsA structure containing preferences related to image averaging, request mode, image cropping, and other behaviors.
force_trigWill be populated with 1 if requested image was acquired in Force Trigger mode, or 0 otherwise. See description associated with axSetTrigTimeout function.
trig_too_fastWill be populated with 1 if Image_sync trigger period is too short, or 0 otherwise.
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. axRequestImageAdv() requests the retrieval (into a pre-allocated buffer defined by the user) and/or display (directly rendered into OpenGL window) of an image from the Main Image Buffer. A call to axRequestImageAdv() is intended to follow a call to axGetImageInfo(), which provides several arguments to axRequestImageAdv() (output_buf_len, requested_image_number) and identifies "stale" images (for avoiding the wasted computation resources incurred by calling axRequestImageAdv() using the same requested image number on consecutive calls). This function is DEPRECATED and may be removed in future versions. Use axRequestImage() or axDisplayImage() instead.

◆ axResizeBuffer()

AxErr axResizeBuffer ( AOChandle  session,
float  capacity_MB 
)

Clears and resets the Main Image Buffer, optionally with a new buffer size.

Parameters
sessionThe opaque handle to the session created with axStartSession().
capacity_MBThe desired size of the new buffer in MB. A value of 0 resets (clears) the buffer using the previously configured size.
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. This function is useful for preventing retrieval of images from prior imaging sequences which have not yet been overwritten by the most recent sequence. Careful management of buffer status (i.e. number of images enqueued) returned using axGetStatus() will avoid this situation, making the use of this function optional. This function should not be called when images are currently being enqueued into the buffer by a connected DAQ board or while loading a file from disk.
Examples
AxsunOCTCapture_Cpp_linux_example.cpp.

◆ axSaveFile()

AxErr axSaveFile ( AOChandle  session,
const char *  path_file,
uint8_t  full_buffer,
int32_t *  packets_written 
)

Save contents of Main Image Buffer to disk.

Parameters
sessionThe opaque handle to the session created with axStartSession().
path_fileFull directory and filename at which to create new save file.
full_bufferSet to 0 for saving only data captured during the most recent imaging sequence (e.g. a burst record) or set to 1 to save the full buffer.
packets_writtenWill be populated with the number of packets successfully saved to disk.
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. Note that a preexisting file at the location indicated for saving will be overwritten without warning. This function should be called only when images are NOT currently being enqueued into the buffer by a connected DAQ board.
Examples
AxsunOCTCapture_Cpp_linux_example.cpp.

◆ axScanCmd()

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. (WINDOWS ONLY)

Parameters
scan_commandThe desired scanner function selected from available commands in the AxScannerCommand enum. See below for notes on available scanner commands.
misc_scalarA general purpose scalar value. Valid when scan_command = WAIT_BURST, SET_SAMPLE_CLOCK, GET_DEVICE_SERIALNO, or SELECT_DEVICE. See below for usage.
scan_parametersA structure defining the basic geometry of a rectangular raster scan pattern generated by the library (parameter valid when scan_command = SET_RECT_PATTERN or STOP_AT_POSITION, otherwise set to NULL).
external_scan_patternA structure defining the user-generated scan pattern and associated arrays to be loaded (parameter valid when scan_command = LOAD_EXT_PATTERN, otherwise set to NULL).
RFUReserved for future use, set to NULL.
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. Some scan commands return positive integers as noted in their description. Scan patterns are configured based on voltage values at the output pins of the analog output generation device. Converting a voltage value to an optical beam position must incorporate external linear and non-linear factors such as the type of scanner & amplifier/controller, the opto-mechanical layout, lens distortion, etc. The active scan pattern (an array of interleaved X and Y voltages) can be generated by the library based on user-configurable high-level geometric parameters (i.e. range and origin) to define a rectangular raster scan area, or generated externally by the user and then loaded directly via array format. The rectangular raster scan pattern generated by the library consists of linear ramp functions (sawtooth wave with 100% duty cycle) along the X and Y scan dimensions. When scanning, the "fast" X voltage is updated for each clock pulse and the "slow" Y voltage is updated after each full period of the X waveform.

SETUP and HARDWARE CONNECTIONS:

  • supports NI USB-6211, USB-6001, USB-6008, or USB-6343 hardware (including OEM style) according to the following matrix.
  • requires installation of NI-DAQmx device driver software. (http://sine.ni.com/nips/cds/view/p/lang/en/nid/10181)
  • make the following terminal connections according to the functionality desired and the board type used:
FUNCTION USB-6211 USB-6343 USB-6001/6008 GROUND TYPE
X scan waveform output AO 0 AO 0 <n/a> A GND
Y scan waveform output AO 1 AO 1 <n/a> A GND
Auxiliary analog DC output <n/a> AO 2 AO 0 A GND
Image_sync pulse output PFI 5 PFI 13 <n/a> D GND
Ext. sample clock input PFI 0 PFI 8 <n/a> D GND
Square wave output PFI 4 PFI 12 <n/a> D GND
Auxiliary digital output PFI 6 PFI 2 P 1.2 D GND

AVAILABLE SCANNER COMMANDS:

  • axScanCmd(INIT_SCAN, ...) Initialize hardware and allocate scanner control resources. (DEPRECATED)

    Scanner control resources are lazy-initialized automatically on the first call to any axScanCmd() command type, so this INIT_SCAN command is no longer needed. Hardware resources are initialized automatically when a supported device is detected (may take up to 10 seconds for device to be recognized after connecting). Use SET_MAX_VOLTAGE command once a device is connected in order to set its maximum voltage limits for analog output waveforms.

  • axScanCmd(DESTROY_SCAN, ...) Destroy and deallocate scanner control resources.

    Resources previously allocated with other axScanCmd(...) function calls are automatically deallocated by axStopSession() when terminating a main Axsun OCT Capture session. Call this command to explicitly deallocate scanner resources if a main capture session was not used.

  • axScanCmd(SET_RECT_PATTERN, ..., scan_parameters, ...) Use scan_parameters to configure a rectangular raster scan pattern.

    The basic geometry defined in the scan_parameters structure is used to generate the active 1D (line) and 2D (raster) scan patterns for subsequent analog output generation, overwriting active scan patterns previously generated with this command or loaded with axScanCmd(LOAD_EXT_PATTERN,...). Contents of the scan_parameters structure are copied internally and the pointer to this structure need not remain valid following return from this command.

  • axScanCmd(LOAD_EXT_PATTERN, ..., external_scan_pattern, ...) Use external_scan_pattern to load an externally generated scan pattern.

    An arbitrary user-generated scan pattern can be loaded for subsequent analog output generation, overwriting active scan patterns previously loaded with this command or generated with axScanCmd(SET_RECT_PATTERN,...). Contents of the external_scan_pattern structure and associated arrays are copied internally and the pointer to this structure and its associated arrays need not remain valid following return from this command.

  • axScanCmd(CONTINUOUS_LINE_SCAN, ...) Start continuous line scanning based on configured scan pattern.

    Starts the analog output generation for the active 1D linear scan, repeating it continuously until commanded otherwise. The Image_sync pulse frequency is derived from the X_increment configured when the active scan pattern was set or loaded.

  • axScanCmd(CONTINUOUS_RASTER_SCAN, ...) Start continuous raster scanning based on configured scan pattern.

    Starts the analog output generation for the active 2D raster scan, repeating it continuously until commanded otherwise. The Image_sync pulse frequency is derived from the X_increment configured when the active scan pattern was set or loaded..

  • axScanCmd(STOP_AT_POSITION, ..., scan_parameters, ...) Move to a configured position and stop scanning.

    Stops the Image_sync pulse and sets a constant (non-scanning) analog output at the voltages given in the X_shift and Y_shift fields of the scan_parameters argument. This command does not alter or overwrite the active scan parameters or patterns previously configured using axScanCmd(SET_RECT_PATTERN,...).

  • axScanCmd(SETUP_BURST_RASTER, ...) Prepare a burst raster scan by pre-loading buffers and waiting at the start position.

    Uploads the active raster scan pattern to device memory and sets a constant analog output at the pattern's initial voltage, but waits to start scanning until a subsequent call to axScanCmd(START_BURST_RASTER,...).

  • axScanCmd(START_BURST_RASTER, ...) Start a burst raster scan with minimum latency.

    Starts analog output and Image_sync pulse generation for a burst raster scan. Must be preceded by a call to axScanCmd(SETUP_BURST_RASTER,...). The raster scan starts with minimal latency and is executed once.

  • axScanCmd(WAIT_BURST, misc_scalar, ...) Wait for a burst raster scan to complete.

    Waits for a burst raster scan operation to compete. The misc_scalar parameter sets the timeout (in seconds) to wait before returning an error. A timeout of -1 waits indefinitely, a timeout of 0 returns immediately with an error if the raster scan is still active or no error if it is complete.

  • axScanCmd(SET_SAMPLE_CLOCK, misc_scalar, ...) Changes between external and internal sample clock.

    The misc_scalar parameter sets the desired sample clock for subsequent analog output generation. The default value of 0 uses the external sample clock from the pin according to the table above, a non-zero value uses a 100 kHz sample clock generated internally by the device. Active scanning operations must be restarted for changes to take effect.

  • axScanCmd(GET_DEVICE_SERIALNO, misc_scalar, ...) Returns a device serial number (if AxErr return value > 0, type-cast it to int).

    A list of N connected devices is maintained internally by the library. The misc_scalar parameter sets the device index (from 0 to N-1) on which to query the device serial number. If the index is higher than N-1, function will return AxErr::DAQMX_DEVICE_NOT_FOUND.

  • axScanCmd(SELECT_DEVICE, misc_scalar, ...) Selects the active device.

    A list of N connected devices is maintained internally by the library. The device occupying the first position (index 0) is considered the "active device" to which other axScanCmd() commands are directed. A positive-valued misc_scalar parameter sets the new "active device" (indexed from 0 to N-1) to be moved into the first position in the list. A negative-valued misc_scalar parameter is interpreted as a device serial number. If a matching device is found, it is set as the "active device" and moved into the first position in the list. If the misc_scalar is higher than N-1, function will return AxErr::DAQMX_DEVICE_NOT_FOUND. If the misc_scalar is less than 0 and the requested device serial number is not found, function will return AxErr::DAQMX_DEVICE_NOT_FOUND.

  • axScanCmd(COUNT_DEVICES, ...) Returns the number of connected DAQmx devices (if AxErr return value > 0, type-cast it to int).

    Counts the number of DAQmx devices currently connected, including both supported and unsupported devices.

  • axScanCmd(SET_MAX_VOLTAGE, ...) Sets the maximum analog waveform voltage a device is allowed to output.

    A device's maximum analog waveform output is set to +/- 10.0 V by default. Use the misc_scalar parameter to set a new maximum value from 0.0 V to 10.0 V on the active device. The minimum voltage will be set to -misc_scalar. This feature is a safeguard against unintentional over-driving of connected scanners; subsequent commands to start scanning will return an error if the programmed scan pattern exceeds the configured voltage limit. This command does not apply to the general purpose DC analog output functionality provided by some devices.

  • axScanCmd(SET_DIGITAL_OUTPUT, misc_scalar, ...) Controls the general purpose digital output.

    Sets the device's general purpose digital output to low/false if misc_scalar = 0 or high/true if misc_scalar = 1.

  • axScanCmd(SET_SQUAREWAVE_OUTPUT, misc_scalar, ...) Controls the general purpose square wave synthesizer.

    Sets the device's general purpose square wave synthesizer to output at a frequency given by misc_scalar in Hz. Use misc_scalar = 0 to turn the squarewave output off.

  • axScanCmd(SET_XSINE_YRAMP_PATTERN, ..., scan_parameters, ...) Configures a raster scan pattern with sinusoidal waveform on the X dimension and linear ramp waveform on the Y dimension.

    Usage is similar to axScanCmd(SET_RECT_PATTERN, ...).

  • axScanCmd(SET_AUX_DC_ANALOG_OUTPUT, misc_scalar, ...) Controls the general purpose DC analog output voltage.

    Sets the device's general purpose DC analog output to a voltage given by misc_scalar in Volts.

  • axScanCmd(SET_AUX_DC_ANALOG_MAX, misc_scalar, ...) Controls the general purpose DC analog output voltage maximum limit.

    Sets the device's maximum general purpose DC analog output to a voltage given by misc_scalar in Volts. This feature is a safeguard against unintentional over-driving of this output terminal; subsequent commands to SET_AUX_DC_ANALOG_OUTPUT will return an error if the requested voltage exceeds the configured limit.

  • axScanCmd(SET_AUX_DC_ANALOG_MIN, misc_scalar, ...) Controls the general purpose DC analog output voltage minimum limit.

    Sets the device's minimum general purpose DC analog output to a voltage given by misc_scalar in Volts. This feature is a safeguard against unintentional over-driving of this output terminal; subsequent commands to SET_AUX_DC_ANALOG_OUTPUT will return an error if the requested voltage exceeds the configured limit.

  • axScanCmd(GET_DEVICE_MODEL_NUMBER, misc_scalar, ...) Returns a device's numeric model number (if AxErr return value > 0, type-cast it to int).

    A list of N connected devices is maintained internally by the library. The misc_scalar parameter sets the device index (from 0 to N-1) on which to query the device model number. If the index is higher than N-1, function will return AxErr::DAQMX_DEVICE_NOT_FOUND.

  • axScanCmd(SET_XSINE_YSINE_PATTERN, ..., scan_parameters, ...) Configures a raster scan pattern with sinusoidal waveforms on the X and Y dimensions.

    Usage is similar to axScanCmd(SET_RECT_PATTERN, ...).

Examples
axScanCmd_Test.cpp.

◆ axScanConvert()

AxErr axScanConvert ( AOChandle  session,
int32_t  which_window,
uint8_t  convert,
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. (WINDOWS ONLY)

Parameters
sessionThe opaque handle to the session created with axStartSession().
which_windowSelects which OpenGL window is targeted for this behavior change.
convertThe desired scan conversion behavior (disabled = 0, enabled = 1).
inner_radiusA value on the interval [0..1] which defines the inner edge of the annulus onto which an image's r = 0 data is rendered. (0 = center, 1 = outer edge of uncropped display window)
outer_radiusA value on the interval [0..1] which defines the outer edge of the annulus onto which an image's r = Rmax data is rendered. (0 = center, 1 = outer edge of uncropped display window)
crop_innerA value on the interval [-1..1] which defines the fraction of total image cropped prior to scan conversion in the radial direction from r = 0 outward.
crop_outerA value on the interval [0..2] which defines the fraction of total image cropped prior to scan conversion in the radial direction from r = Rmax inward.
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. Polar-to-rectangular scan conversion is useful for displaying images on a cartesian (x,y) display when acquired with a rotational probe or catheter in polar (r,theta) coordinates. For maximized field of view, inner_radius and crop_inner should be set to 0 and outer_radius and crop_outer should be set to 1. Adjusting crop_inner and crop_outer by an equivalent amount will achieve a 'digital Z-offset' radial shifting effect.

◆ axSelectColormap()

AxErr axSelectColormap ( AOChandle  session,
int32_t  which_window,
AxColormap  colors 
)

Select the color scheme of images displayed in an OpenGL window. (WINDOWS ONLY)

Parameters
sessionThe opaque handle to the session created with axStartSession().
which_windowSelects which OpenGL window is targeted for this style change.
colorsThe desired color scheme can be SEPIA, grayscale, inverted GREYSCALE, or a user-defined scheme loaded using axLoadUserColormap (see AxColormap enum).
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code.

◆ axSelectInterface()

AxErr axSelectInterface ( AOChandle  session,
AxInterface  which_interface 
)

Select the data interface (Ethernet, PCIe, or none) for the capture session.

Parameters
sessionThe opaque handle to the session created with axStartSession().
which_interfaceThe desired interface type to initialize for this session.
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. This function will replace/reset an existing interface which was already setup from a previous call to this function. A capture session can only have one associated interface at a time.
Examples
AxsunOCTCapture_C_example.c, AxsunOCTCapture_Cpp_example.cpp, AxsunOCTCapture_Cpp_example_NewImageCallback.cpp, and AxsunOCTCapture_Cpp_linux_example.cpp.

◆ axSelectInterpolation()

AxErr axSelectInterpolation ( AOChandle  session,
int32_t  which_window,
uint8_t  interpolation 
)

Change the OpenGL display interpolation mode. (WINDOWS ONLY)

Parameters
sessionThe opaque handle to the session created with axStartSession().
which_windowSelects which OpenGL window is targeted for this mode change.
interpolationThe desired interpolation mode (bilinear = 0, nearest neighbor = 1).
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code.

◆ axSetTrigTimeout()

AxErr axSetTrigTimeout ( AOChandle  session,
uint32_t  framesUntilForceTrig 
)

Control the behavior of Force Trigger mode.

Parameters
sessionThe opaque handle to the session created with axStartSession().
framesUntilForceTrigThe number of frames for which the driver will wait for a Image_sync signal before timing out and entering Force Trigger mode. Defaults to 24 frames at session creation. Values outside the range of [2,100] will be automatically coerced into this range.
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. The trigger timeout defines the number of consecutive frames for which the driver will wait for a Image_sync signal prior to transitioning into Force Trigger mode. Once in Force Trigger mode, the driver will return the most recently captured frame (256 A-scans) with no synchronization with the Image_sync signal (which is either too slow or absent altogether). The driver will automatically exit Force Trigger mode and re-synchronize with the Image_sync signal as soon as two consecutive Image_sync signals are detected within the timeout period. Set the trigger timeout based on the expected Image_sync signal period of your scanner and the system A-scan rate. For example, assume an effective A-scan rate of 100,000 Hz and a Image_sync period of 33 milliseconds (i.e. a B-scan period determined by the frequency of a scanner running at 30 fps). The trigger timeout is defined in number of frames (consisting of 256 A-scans each), hence the frame time for a 100kHz system is 2.56 milliseconds (=256/100000). A trigger timeout setting of at least 13 frames equaling 33.28 milliseconds (= 2.56 ms * 13) is required to avoid experiencing premature Force Trigger timeout. Setting a trigger timeout several frames larger than the minimum is recommended; however, setting it too high will delay or prevent the transition to Force Trigger mode when desired (e.g. when a Image_sync signal is absent). Remember that the A-scan subsampling feature on the DAQ reduces the effective A-scan rate of the system and could impact the trigger timeout calculation.
Examples
AxsunOCTCapture_Cpp_example_NewImageCallback.cpp.

◆ axSetupDisplay()

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. (WINDOWS ONLY)

Parameters
sessionThe opaque handle to the session created with axStartSession().
window_styleThe window style: either a floating window with border (=0) or a fixed borderless window (=1).
w_leftThe initial left edge of the window in display coordinates. Also see axUpdateView().
w_topThe initial top edge of the window in display coordinates. Also see axUpdateView().
w_widthThe initial width of the window. Also see axUpdateView().
w_heightThe initial height of the window. Also see axUpdateView().
parent_window_handleThe window handle (HWND) of an existing window of which the OpenGL window is created as a child window. Set this to 0 for creating an OpenGL window with no parent.
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. Any resources allocated with axSetupDisplay() are automatically deallocated by axStopSession() when terminating the Axsun OCT Capture Session. Parameters set the initial window style, size, and location of the OpenGL window at creation but (except the parent/child relationship) these can be subsequently changed according to the axUpdateView() and axUpdateWindowStyle() functions. The window is hidden by default after the session is created. Call axHideWindow() with false argument to show the window after position and style are configured as desired.
Examples
AxsunOCTCapture_C_example.c, AxsunOCTCapture_Cpp_example.cpp, and AxsunOCTCapture_Cpp_example_NewImageCallback.cpp.

◆ axStartSession()

AxErr axStartSession ( AOChandle session,
float  capacity_MB 
)

Start an Axsun DAQ imaging session by allocating memory for the Main Image Buffer.

Parameters
sessionPointer to session's opaque handle which will be created by this function and used as an argument for all subsequent function calls specific to this session.
capacity_MBThe desired size (in megabytes) to allocate for the Main Image Buffer.
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. axStartSession() is the first method called in a typical implementation of the AxsunOCTCapture API. Sessions started with axStartSession() must be closed with axStopSession() before the client application exits or else resources will be left allocated.
Examples
AxsunOCTCapture_C_example.c, AxsunOCTCapture_Cpp_example.cpp, AxsunOCTCapture_Cpp_example_NewImageCallback.cpp, and AxsunOCTCapture_Cpp_linux_example.cpp.

◆ axStopSession()

AxErr axStopSession ( AOChandle  session)

Stop a capture session and deallocate all resources, including Main Image Buffer and interfaces.

Parameters
sessionThe opaque handle to the session created with axStartSession().
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. axStopSession() is the last function called in a typical implementation using the AxsunOCTCapture API. A session started with axStartSession() must be closed with axStopSession() before the client application exits.
Examples
AxsunOCTCapture_C_example.c, AxsunOCTCapture_Cpp_example.cpp, AxsunOCTCapture_Cpp_example_NewImageCallback.cpp, and AxsunOCTCapture_Cpp_linux_example.cpp.

◆ axUpdateView()

AxErr axUpdateView ( AOChandle  session,
int32_t  which_window,
int32_t  w_left,
int32_t  w_top,
int32_t  w_width,
int32_t  w_height 
)

Change the OpenGL window size and position. (WINDOWS ONLY)

Parameters
sessionThe opaque handle to the session created with axStartSession().
which_windowSelects which OpenGL window is targeted for this style change.
w_leftThe left edge of the window in display coordinates (fixed borderless window only).
w_topThe top edge of the window in display coordinates (fixed borderless window only).
w_widthThe width of the window in pixels.
w_heightThe height of the window in pixels.
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. Window width and height parameters outside the range [32,4000] will be coerced. The w_left and w_top parameters are ignored when the window mode is floating with a border (see axSetupDisplay()).

◆ axUpdateWindowStyle()

AxErr axUpdateWindowStyle ( AOChandle  session,
int32_t  which_window,
uint8_t  window_style 
)

Change the OpenGL display window style. (WINDOWS ONLY)

Parameters
sessionThe opaque handle to the session created with axStartSession().
which_windowSelects which OpenGL window is targeted for this style change.
window_styleThe window style: either a floating window with border(= 0) or a fixed borderless window(= 1).
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code.

◆ axWriteFPGAreg()

AxErr axWriteFPGAreg ( AOChandle  session,
uint16_t  regnum,
uint16_t  regval 
)

Write a FPGA register on the Axsun DAQ via the PCIe interface. (WINDOWS ONLY)

Parameters
sessionThe opaque handle to the session created with axStartSession().
regnumThe unique register number to which the write operation is directed.
regvalThe desired 16-bit value to write.
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. Note that this function does not subsequently query the DAQ hardware to confirm the write was actually successful. A return value of NO_AxERROR only indicates the software's request was made successfully. Call axReadFPGAreg() to confirm hardware register value if desired. FPGA registers are 16-bits wide and all 16-bits must be written atomically. To write individual bits in a register use the axWriteFPGAregBIT() function. axWriteFPGAreg() is functionally equivalent to the AxsunOCTControl.dll library function "SetFPGARegister()" used when connected to the DAQ via Ethernet or USB.

◆ axWriteFPGAregBIT()

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. (WINDOWS ONLY)

Parameters
sessionThe opaque handle to the session created with axStartSession().
regnumThe unique register number to which the write operation is directed.
bitnumThe bit number within the desired register. The 16 bits in the register are indexed from 0 (LSB) to 15 (MSB).
bitvalThe value to write (0 = clear bit, 1 = set bit)
Returns
AxErr = NO_AxERROR for success or other AxErr error code on failure. Call axGetErrorString() for a description of an AxErr error code. Note that this function does not subsequently query the DAQ hardware to confirm the write was actually successful. A return value of NO_AxERROR only indicates the software's request was made successfully. Call axReadFPGAreg() to confirm hardware register value if desired.