AxsunOCTCapture
3.0.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.
|
This header file contains all exported function prototypes, structures, and enums necessary for integrating AxsunOCTCapture.dll into a client application. More...
Go to the source code of this file.
Data Structures | |
struct | scan_params_t |
Structure for passing rectangular 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 | AxPacket |
Structure for packet metadata. (Undocumented members are for internal use only.) More... | |
Typedefs | |
typedef struct AxCaptureSession * | AOChandle |
Axsun OCT Capture handle - a pointer to the opaque structure used to manage created capture sessions. | |
typedef void(__cdecl * | AxConnectScannerCallbackFunction_t) (void *) |
A user-provided function to be called upon connection or disconnection of a scanner (DAQmx) device. | |
Functions | |
AxErr | axStartSession (AOChandle *session, float capacity_MB) |
Start an Axsun Ethernet 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 *droppedPackets_, 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 | 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. 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) |
Advanced function for getting information on an image in the Main Image Buffer. More... | |
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. More... | |
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. More... | |
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 (and other retrieve or display calls). 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 *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 *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. More... | |
AxErr | axUpdateWindowStyle (AOChandle session, uint8_t window_style) |
Change the OpenGL display window style. More... | |
AxErr | axSelectInterpolation (AOChandle session, uint8_t interpolation) |
Change the OpenGL display interpolation mode. More... | |
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). More... | |
AxErr | axSelectColormap (AOChandle session, AxColormap colors) |
Select the color scheme of images displayed in an OpenGL window. More... | |
AxErr | axLoadUserColormap (AOChandle session, uint8_t *user_colormap_in) |
Load a user-defined AxColormap for images displayed in an OpenGL window. More... | |
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. More... | |
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. More... | |
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. More... | |
AxErr | axAdjustBrightnessContrast (AOChandle session, float brightness, float contrast) |
Change the brightness and contrast of images displayed in an OpenGL window. More... | |
AxErr | axHideWindow (AOChandle session, uint32_t hidden) |
Hide or unhide the OpenGL image display window. More... | |
AxErr | axSetTrigTimeout (AOChandle session, uint32_t framesUntilForceTrig_) |
Control the behavior of Force Trigger mode. More... | |
AxErr | axDownsampling (AOChandle session, uint8_t downsampling_state) |
Enable or disable 2x downsampling during JPEG decompression. 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 | axClearBuffer (AOChandle session) |
Clear Main Image Buffer by resetting all data to zero, leaving the buffer size the same. More... | |
AxErr | axResizeBuffer (AOChandle session, float capacity_MB) |
Resets the Main Image Buffer with a new 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. More... | |
AxErr | axWriteFPGAreg (AOChandle session, uint16_t regnum, uint16_t regval) |
Write a FPGA register on the Axsun DAQ via the PCIe interface. 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. More... | |
AxErr | axPipelineMode (AOChandle session, AxPipelineMode mode) |
Configures FPGA registers to output the desired data type & location from the processing pipeline via the PCIe interface. More... | |
AxErr | axReadFPGAreg (AOChandle session, uint16_t regnum, uint16_t *regval) |
Read a FPGA register on the Axsun DAQ via the PCIe interface. 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 files. 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. 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. 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... | |
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:
GET_DEVICE_SERIALNO
and SELECT_DEVICE
commandsOpenGL Display Functionality:
enum AxDataType |
enum AxFileType |
Available file types to export using axExportImages().
Enumerator | |
---|---|
BINARY | Raw binary |
JPEG | JPEG |
BMP | Windows Bitmap |
FILETYPE_RFU | (reserved for future use) |
enum AxInterface |
Available capture interfaces to be selected by axSelectInterface().
Enumerator | |
---|---|
GIGABIT_ETHERNET | Gigabit Ethernet interface |
PCI_EXPRESS | PCI Express x8 interface |
NO_INTERFACE | No interface selected |
INTERFACE_RFU | (reserved for future use) |
enum AxRequestMode |
Available request modes to define behavior of axRequestImageAdv().
enum AxScannerCommand |
Available scanner command types to be executed by axScanCmd().
Change the brightness and contrast of images displayed in an OpenGL window.
session | The opaque handle to the session created with axStartSession(). |
brightness | The desired brightness. Typical values are in the range [-0.5, 0.5]. |
contrast | The desired contrast. Typical values are in the range [0.5, 1.5]. |
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).
Clear Main Image Buffer by resetting all data to zero, leaving the buffer size the same.
session | The opaque handle to the session created with axStartSession(). |
This function is useful for avoiding retrieval of images from prior imaging sequences which have not yet been overwritten. Careful management of buffer status (i.e. number of images enqueued) returned using axGetStatus should avoid this situation, making the use of this function optional. This function should be called only when images are NOT currently being enqueued into the buffer by a connected DAQ board or load file operation.
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.
session | The opaque handle to the session created with axStartSession(). |
crop_left | Fraction of total image width cropped from left (0 = no cropping, 0.5 = half of image cropped, etc.). |
crop_top | Fraction of total image height cropped from top. |
crop_bottom | Fraction of total image height cropped from bottom. |
crop_right | Fraction of total image width cropped from right. |
Cropping parameters less than zero are ignored.
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).
session | The opaque handle to the session created with axStartSession(). |
requested_image_number | The image number requested for display. This can be a unique image number or it can be set to -1 to request the most recently enqueued image in the buffer. |
returned_image_number | Will be populated with the unique image number displayed. This will be equal to the "requested_image_number" parameter unless that parameter is set to -1 to request the most recent image. |
height | Will be populated with the height of the requested image (in pixels). |
width | Will be populated with the width of the requested image (in pixels). |
axDisplayImage requests the display (directly rendered into an OpenGL window) of an image from the Main Image Buffer. This function works only for 8-bit image data. See axRequestImageAdv for an advanced version of this function.
Enable or disable 2x downsampling during JPEG decompression.
session | The opaque handle to the session created with axStartSession(). |
downsampling_state | The desired downsampling behavior (disabled = 0, enabled = 1). Downsampling is disabled by default at session creation. |
2x downsampling speeds up JPEG decompression but halves the width and height of retrieved and/or displayed images. The original full-resolution images persist in the Main Image Buffer. Downsampling is helpful to keep frame rates high during real-time acquisition and display of images that have very high numbers of a-scans/image and are thus larger than the display pixel dimensions. Note that this function is not "thread-safe" with respect to the axGetImageInfo and axRequestImage functions; use of the "required_buffer_size" calculated by axGetImageInfo or axGetImageInfoAdv will not be appropriate as the "output_buf_len" for the subsequent axRequestImage or axRequestImageAdv call if the downsampling behavior was changed.
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.
session | The opaque handle to the session created with axStartSession(). |
path_directory | Null-terminated path to directory in which to export binary files (must be less than 200 characters). |
images_exported | Will be populated with the number of images successfully exported. |
file_type | = 0 for raw binary files, = 1 for JPEG files, = 2 for BMP files. |
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.
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).
session | The opaque handle to the session created with axStartSession(). |
requested_frame_number | The 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_number | Will 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_size | Will be populated with the required size (in bytes) of a user buffer that must be allocated before JPEG retrieval using axRequestCompressedJPEG. |
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).
Get data transfer rate on the active interface.
session | The opaque handle to the session created with axStartSession(). |
datarate_Mbps | The estimated data transfer rate in megabits/second for the most recently enqueued 2500 packets. |
void axGetErrorString | ( | AxErr | errorcode, |
char * | message_out | ||
) |
Get a description of a specific AxErr error code.
errorcode | An AxErr error code returned from another function in the AxsunOCTCapture API. |
message_out | A 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.
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).
session | The opaque handle to the session created with axStartSession(). |
requested_frame_number | The 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_number | Will 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. |
height | Will be populated with the height of the requested frame (in pixels). |
width | Will be populated with the width of the requested frame (in pixels). |
data_type_out | Will be populated with the data type of the requested frame (see AxDataType enum definition) |
required_buffer_size | Will be populated with the required size (in bytes) of a user buffer that must be allocated before frame retrieval using axRequestFrameAdv. |
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).
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.
session | The opaque handle to the session created with axStartSession(). |
requested_image_number | The image number for which information is desired. This can be a unique image number or it can be set to -1 to get info on the most recently enqueued image in the buffer. |
returned_image_number | Will be populated with the unique image number. This will be equal to the "requested_image_number" parameter unless that parameter is set to -1 to get info on the most recent image. |
required_buffer_size | Will be populated with the required size (in bytes) of a user buffer that must be allocated before image retrieval using axRequestImageAdv() or axRequestImage(). |
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() or axRequestImageAdv() and provides several arguments to these functions (e.g. output_buf_len, requested_image_number) and identifies "stale" images (for avoiding the wasted computation resources incurred by calling axRequestImage() using the same requested image number on consecutive calls). See axGetImageInfoAdv() for an advanced version of this function.
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.
session | The opaque handle to the session created with axStartSession(). |
requested_image_number | The image number for which information is desired. This can be a unique image number or it can be set to -1 to get info on the most recently enqueued image in the buffer. |
returned_image_number | Will be populated with the unique image number. This will be equal to the "requested_image_number" parameter unless that parameter is set to -1 to get info on the most recent image. |
height | Will be populated with the height of the requested image (in pixels). |
width | Will be populated with the width of the requested image (in pixels). |
data_type_out | Will be populated with the data type of the requested image (see AxDataType enum definition) |
required_buffer_size | Will be populated with the required size (in bytes) of a user buffer that must be allocated before image retrieval using axRequestImageAdv or axRequestImage. |
force_trig | Will be populated with 1 if requested image was acquired in Force Trigger mode, or 0 otherwise. See description associated with axSetTrigTimeout function. |
trig_too_fast | Will be populated with 1 if Image_sync trigger period is too short, or 0 otherwise. |
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). See axGetImageInfo() for a simplified version of this function.
int32_t axGetLibBuildCfg | ( | void | ) |
Get the build configuration of the library.
int32_t axGetLibBuildDateTime | ( | char * | datetime_str | ) |
Get a string describing the time and date that the library was built.
datetime_str | A 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. |
It is unsafe to pass a datetime_str output buffer allocated with fewer than 100 bytes.
void axGetLibVersion | ( | int32_t * | major, |
int32_t * | minor, | ||
int32_t * | patch, | ||
int32_t * | build, | ||
char * | version_str | ||
) |
Get the library version.
major | Version number major element. |
minor | Version number minor element. |
patch | Version number patch element. |
build | Version number build element. |
version_str | A 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.
Get a description of the capture session's interface status.
session | The opaque handle to the session created with axStartSession(). |
message_out | A pointer to a pre-allocated buffer of characters with size at least 256 bytes into which a nul-terminated message string will be copied. |
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.
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.
session | The opaque handle to the session created with axStartSession(). |
imaging | Will be populated with 0 if imaging is off, 1 if imaging is on but not recording, or 3 if imaging is on and recording is active. |
last_packet_in | Will be populated with the unique packet number most recently enqueued into the Main Image Buffer. |
last_frame_in | Will be populated with the unique frame number most recently enqueued into the Main Image Buffer. |
last_image_in | Will be populated with the unique image number most recently enqueued into the Main Image Buffer. |
droppedPackets_ | Will be populated with the number of packets dropped since the last imaging mode reset. |
frames_since_sync | Will 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. |
Hide or unhide the OpenGL image display window.
session | The opaque handle to the session created with axStartSession(). |
hidden | The desired window visibility state (visible = 0, hidden = 1). |
Configure the cropped subset of A-scans to retrieve or display in subsequent calls to axRequestImage (and other retrieve or display calls).
session | The opaque handle to the session created with axStartSession(). |
start_Ascan | The first A-scan to be retrieved, a positive-valued offset from the Image_sync pulse defining the start of an image. |
total_Ascans | The total number of A-scans to be retrieved. Set to 0 to retrieve the full image. |
This function sets the parameters used for cropping of a full image along the A-scan dimension (defined by two Image_sync pulses) within subsequent axRequestImage() calls, avoiding inefficiency associated with copying unwanted A-scans which would subsequently be discarded by the calling application. If the start_Ascan offset value exceeds the available A-scans in an image, the requested image will be retrieved/displayed starting at offset = 0. If total_Ascans exceeds the remaining A-scans available following start_Ascan, the remaining available A-scans in the image will be retrieved/displayed. Image subsetting/cropping is not available in Force Trigger mode (i.e. when no Image_sync is detected). Note that the image width cropping behavior based on these settings is applied prior to the OpenGL display window cropping behavior configured using axCropRect().
Control the image streaming behavior of the Axsun PCIe DAQ between Live Imaging, Burst Recording, and Imaging Off states.
session | The opaque handle to the session created with axStartSession(). |
number_of_images | Set 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. |
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.
Load contents from file on disk into Main Image Buffer.
session | The opaque handle to the session created with axStartSession(). |
path_file | Full directory and filename from which to load data. |
packets_read | Will be populated with the number of packets successfully loaded from disk. |
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 axClearBuffer 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.
Load a user-defined AxColormap for images displayed in an OpenGL window.
session | The opaque handle to the session created with axStartSession(). |
user_colormap_in | The AxColormap array to be loaded. |
To display a user-defined AxColormap loaded using this function, the "user" AxColormap must be selected with axSelectColormap. The AxColormap 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)
AxErr axPipelineMode | ( | AOChandle | session, |
AxPipelineMode | mode | ||
) |
Configures FPGA registers to output the desired data type & location from the processing pipeline via the PCIe interface.
session | The opaque handle to the session created with axStartSession(). |
mode | The desired pipeline mode according to the numbered pipeline diagram shown as in the Operator's Manual. |
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.
Read a FPGA register on the Axsun DAQ via the PCIe interface.
session | The opaque handle to the session created with axStartSession(). |
regnum | The unique register number to which the read operation is directed. |
regval | Will be populated with the register value fetched from the FPGA. |
axReadFPGAreg is functionally equivalent to the AxsunOCTControl.dll library function "GetFPGARegister" used when connected to the DAQ via Ethernet or USB.
AxErr axRegisterScannerConnectCallback | ( | AxConnectScannerCallbackFunction_t | callback_function, |
void * | userData | ||
) |
Registers a callback function to be executed following a scanner (DAQmx) device connection or disconnection event.
callback_function | A user-supplied function to be called. |
userData | An arbitrary structure to be made available inside the callback function (or NULL if unused). |
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.
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, unsynchronized with Image_sync signal).
session | The opaque handle to the session created with axStartSession(). |
requested_frame_number | The 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_out | A 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_out | A pre-allocated buffer of 34 bytes into which frame metadata is copied. |
output_buf_len | The pre-allocated length in bytes of the JPEG_data_out buffer. |
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).
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 signal).
session | The opaque handle to the session created with axStartSession(). |
requested_frame_number | The 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_out | A 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_out | A pre-allocated buffer of 34 bytes into which frame metadata is copied. |
height | Will be populated with the height of the requested frame (in pixels). |
width | Will be populated with the width of the requested frame (in pixels). |
data_type_out | Will be populated with the data type of the requested frame (see AxDataType enum definition) |
output_buf_len | The pre-allocated length in bytes of the frame_data_out buffer. |
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.
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.
session | The opaque handle to the session created with axStartSession(). |
requested_image_number | The image number requested for retrieval. This can be a unique image number or it can be set to -1 to request the most recently enqueued image in the buffer. |
returned_image_number | Will be populated with the unique image number retrieved. This will be equal to the "requested_image_number" parameter unless that parameter is set to -1 to request the most recent image. |
height | Will be populated with the height of the requested image (in pixels). |
width | Will be populated with the width of the requested image (in pixels). |
data_type_out | Will be populated with the data type of the requested image (see AxDataType enum definition) |
image_data_out | A 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. required_buffer_size). |
output_buf_len | The pre-allocated size in bytes of the image_data_out buffer. |
axRequestImage() requests the retrieval (into a pre-allocated buffer defined by the user) of an image from the Main Image Buffer. See axRequestImageAdv() for an advanced version of this function.
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.
session | The opaque handle to the session created with axStartSession(). |
requested_image_number | The image number requested for retrieval and/or display. This can be a unique image number or it can be set to -1 to request the most recently enqueued image in the buffer. |
image_data_out | A 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_out | A pre-allocated buffer of 34 bytes into which pertinent image metadata is copied. |
height | Will be populated with the height of the requested image (in pixels). |
width | Will be populated with the width of the requested image (in pixels). |
data_type_out | Will be populated with the data type of the requested image (see AxDataType enum definition) |
output_buf_len | The pre-allocated length in bytes of the image_data_out buffer. Can be 0 if req_mode parameter is set to DISPLAY_ONLY. |
average_number | Select the number of consecutive images to be averaged (mean) up to maximum of 10. Set to 1 for no image averaging. Image width must be <= 5000 A-scans. |
req_mode | Indicate if requested image is to be retrieved to the caller (via image_data_out buffer), displayed directly via OpenGL, or both. |
force_trig | Will be populated with 1 if requested image was acquired in Force Trigger mode, or 0 otherwise. See description associated with axSetTrigTimeout function. |
trig_too_fast | Will be populated with 1 if Image_sync trigger period is too short, or 0 otherwise. |
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. OpenGL display works only for 8-bit image data. A call to axRequestImageAdv() is intended to follow a call to axGetImageInfoAdv(), 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). See axRequestImage() for a simplified version of this function.
Resets the Main Image Buffer with a new size.
session | The opaque handle to the session created with axStartSession(). |
capacity_MB |
This function is useful for avoiding retrieval of images from prior imaging sequences which have not yet been overwritten. Careful management of buffer status (i.e. number of images enqueued) returned using axGetStatus should avoid this situation, making the use of this function optional. This function should be called only when images are NOT currently being enqueued into the buffer by a connected DAQ board or load file operation.
AxErr axSaveFile | ( | AOChandle | session, |
const char * | path_file, | ||
uint8_t | full_buffer, | ||
int32_t * | packets_written | ||
) |
Save contents of Main Image Buffer to disk.
session | The opaque handle to the session created with axStartSession(). |
path_file | Full directory and filename at which to create new save file. |
full_buffer | Set 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_written | Will be populated with the number of packets successfully saved to disk. |
Note that a preexisting file at the location indicated for saving will be overwritten without warning.
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.
scan_command | The desired scanner function selected from available commands in the AxScannerCommand enum. See below for notes on available scanner commands. |
misc_scalar | A general purpose scalar value. Valid when scan_command = WAIT_BURST, SET_SAMPLE_CLOCK, GET_DEVICE_SERIALNO, or SELECT_DEVICE. See below for usage. |
scan_parameters | A 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_pattern | A 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). |
RFU | Reserved for future use, set to NULL. |
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.
HARDWARE SETUP:
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 (connected to pin PFI0), 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. The misc_scalar parameter sets the new "active device" (indexed from 0 to N-1) to be moved into the first position in the list.
If the index is higher than N-1, function will return AxErr::DAQMX_DEVICE_NOT_FOUND. If the selected device is not supported, function will return AxErr::DAQMX_UNSUPPORTED_DEVICE.
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 voltage a device is allowed to output.
A device's maximum analog output voltage is set to +/- 10.0 V by default. Use the misc_scalar parameter to set a new value from 0.0 V to 10.0 V on the active device.
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.
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.
session | The opaque handle to the session created with axStartSession(). |
convert | The desired scan conversion behavior (disabled = 0, enabled = 1). |
interpolation | DEPRECATED, use axSelectInterpolation() instead. |
inner_radius | A 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_radius | A 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_inner | A 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_outer | A 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. |
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.
AxErr axSelectColormap | ( | AOChandle | session, |
AxColormap | colors | ||
) |
Select the color scheme of images displayed in an OpenGL window.
session | The opaque handle to the session created with axStartSession(). |
colors | The desired color scheme can be SEPIA, grayscale, inverted GREYSCALE, or a user-defined scheme loaded using axLoadUserColormap (see AxColormap enum). |
AxErr axSelectInterface | ( | AOChandle | session, |
AxInterface | which_interface | ||
) |
Select the data interface (Ethernet, PCIe, or none) for the capture session.
session | The opaque handle to the session created with axStartSession(). |
which_interface | The desired interface type to initialize for this session. |
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.
Change the OpenGL display interpolation mode.
session | The opaque handle to the session created with axStartSession(). |
interpolation | The desired interpolation mode (bilinear = 0, nearest neighbor = 1). |
Control the behavior of Force Trigger mode.
session | The opaque handle to the session created with axStartSession(). |
framesUntilForceTrig_ | The 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. |
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.
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.
session | The opaque handle to the session created with axStartSession(). |
window_style | The window style: either a floating window with border (=0) or a fixed borderless window (=1). |
w_left | The initial left edge of the window in display coordinates. Also see axUpdateView(). |
w_top | The initial top edge of the window in display coordinates. Also see axUpdateView(). |
w_width | The initial width of the window. Also see axUpdateView(). |
w_height | The initial height of the window. Also see axUpdateView(). |
parent_window_handle | The window handle (HWND) of an existing window of which the OpenGL window is created as a child window. Set this to NULL for creating an OpenGL window with no parent. |
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.
Start an Axsun Ethernet DAQ imaging session by allocating memory for the Main Image Buffer.
session | Pointer 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_MB | The desired size (in megabytes) to allocate for the Main Image Buffer. |
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.
Stop a capture session and deallocate all resources, including Main Image Buffer and interfaces.
session | The opaque handle to the session created with axStartSession(). |
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.
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.
session | The opaque handle to the session created with axStartSession(). |
w_left | The left edge of the window in display coordinates (fixed borderless window only). |
w_top | The top edge of the window in display coordinates (fixed borderless window only). |
w_width | The width of the window in pixels. |
w_height | The height of the window in pixels. |
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()).
Change the OpenGL display window style.
session | The opaque handle to the session created with axStartSession(). |
window_style | The window style: either a floating window with border(= 0) or a fixed borderless window(= 1). |
Write a FPGA register on the Axsun DAQ via the PCIe interface.
session | The opaque handle to the session created with axStartSession(). |
regnum | The unique register number to which the write operation is directed. |
regval | The desired 16-bit value to write. |
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.
Write a single bit in an FPGA register on the Axsun DAQ via the PCIe interface.
session | The opaque handle to the session created with axStartSession(). |
regnum | The unique register number to which the write operation is directed. |
bitnum | The bit number within the desired register. The 16 bits in the register are indexed from 0 (LSB) to 15 (MSB). |
bitval | The value to write (0 = clear bit, 1 = set bit) |
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.