|
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.
|
Go to the documentation of this file.
115 #ifndef AXSUNOCTCAPTURE_H
116 #define AXSUNOCTCAPTURE_H
123 constexpr
auto MOST_RECENT_IMAGE = uint32_t{ 0 };
125 #define MOST_RECENT_IMAGE 0
126 #endif // __cplusplus
129 struct CaptureSession;
138 #endif // __cplusplus
152 #endif // __cplusplus
164 #endif // __cplusplus
184 #endif // __cplusplus
200 #endif // __cplusplus
224 #endif // __cplusplus
240 #endif // __cplusplus
378 uint32_t image_number;
379 uint32_t frame_number;
380 uint32_t packet_number;
381 uint16_t ascan_length;
382 uint16_t data_type_code;
383 uint16_t status_flags;
384 uint16_t frames_packet_number;
385 uint16_t sync_offset;
515 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);
564 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);
597 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);
679 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);
761 AxErr axScanConvert(
AOChandle session, int32_t which_window, uint8_t convert,
float inner_radius,
float outer_radius,
float crop_inner,
float crop_outer);
1169 void axGetLibVersion(int32_t * major, int32_t * minor, int32_t * patch, int32_t * build,
char* version_str);
1175 #endif // AXSUNOCTCAPTURE_H include guard
uint32_t size_bytes
Definition: AxsunOCTCapture.h:400
Structure for packet time stamp with platform-independent size (for internal use.)
Definition: AxsunCommonEnums.h:24
AxErr axGetImageRate(AOChandle session, int32_t *images_per_second)
Get the rate of new images being enqueued in the main image buffer.
AxErr axCountWindows(AOChandle session, int32_t *num_of_windows)
Count the number of OpenGL display windows currently created. (WINDOWS ONLY)
AxErr axGetImageInfo(AOChandle session, uint32_t requested_image, image_info_t *image_info)
Get information on an image in the Main Image Buffer.
uint32_t image_number
Definition: AxsunOCTCapture.h:394
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 Imag...
axpacket_t last_packet_metadata
Definition: AxsunOCTCapture.h:422
double Y_idle
Definition: AxsunOCTCapture.h:305
@ REQUESTMODE_RFU
Definition: AxsunOCTCapture.h:193
uint8_t subsampling_factor
Definition: AxsunOCTCapture.h:410
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)
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....
Definition: AxsunOCTCapture.h:438
struct axpacket_t axpacket_t
Structure for packet metadata (for internal use.)
AxErr axSaveFile(AOChandle session, const char *path_file, uint8_t full_buffer, int32_t *packets_written)
Save contents of Main Image Buffer to disk.
uint8_t shift_adj
Definition: AxsunOCTCapture.h:412
struct CaptureSession * AOChandle
Axsun OCT Capture handle - a pointer to the opaque structure used to manage created capture sessions.
Definition: AxsunOCTCapture.h:132
@ XY
Definition: AxsunOCTCapture.h:141
int32_t crop_width_offset
Definition: AxsunOCTCapture.h:340
@ IMAGING_START
Definition: AxsunOCTCapture.h:205
uint8_t dezipper
Definition: AxsunOCTCapture.h:354
uint32_t height
Definition: AxsunOCTCapture.h:363
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....
@ INIT_SCAN
Definition: AxsunOCTCapture.h:243
uint32_t X_increments
Definition: AxsunOCTCapture.h:293
struct image_info_t image_info_t
Structure for conveying metadata information about an image.
uint32_t required_buffer_size
Definition: AxsunOCTCapture.h:432
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 Buff...
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)
struct ext_pattern_t ext_pattern_t
Structure for passing a user-generated scan pattern to axScanCmd(LOAD_EXT_PATTERN,...
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-bi...
struct scan_params_t scan_params_t
Structure for passing raster scan pattern parameters to axScanCmd(SET_RECT_PATTERN,...
AxDataType data_type
Definition: AxsunOCTCapture.h:402
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,...
AxChannelMode
DAQ channel selection modes.
Definition: AxsunCommonEnums.h:211
uint32_t image_number
Definition: AxsunOCTCapture.h:430
@ XZ
Definition: AxsunOCTCapture.h:143
@ LOAD_START
Definition: AxsunOCTCapture.h:217
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 AxNewImageCall...
AxErr axPipelineMode(AOChandle session, AxPipelineMode mode, AxChannelMode channels)
Configures FPGA registers to output the desired data type & location from the processing pipeline via...
double X_shift
Definition: AxsunOCTCapture.h:301
AxErr axStopSession(AOChandle session)
Stop a capture session and deallocate all resources, including Main Image Buffer and interfaces.
AxPipelineMode pipeline_mode
Definition: AxsunOCTCapture.h:404
@ SET_AUX_DC_ANALOG_OUTPUT
Definition: AxsunOCTCapture.h:279
@ SET_SAMPLE_CLOCK
Definition: AxsunOCTCapture.h:263
@ JPEG
Definition: AxsunOCTCapture.h:169
AxDAQEvent
Types of transitions in DAQ's operational mode, conveyed via user callback function....
Definition: AxsunOCTCapture.h:201
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)
@ WAIT_BURST
Definition: AxsunOCTCapture.h:261
int32_t movie_fps
Definition: AxsunOCTCapture.h:373
int32_t crop_height_total
Definition: AxsunOCTCapture.h:346
@ CALIBRATION_DONE
Definition: AxsunOCTCapture.h:211
@ RECORD_START
Definition: AxsunOCTCapture.h:209
int32_t width
Definition: AxsunOCTCapture.h:398
@ NO_INTERFACE
Definition: AxsunOCTCapture.h:231
AxRequestMode request_mode
Definition: AxsunOCTCapture.h:329
AxErr axResizeBuffer(AOChandle session, float capacity_MB)
Clears and resets the Main Image Buffer, optionally with a new buffer size.
@ COUNT_DEVICES
Definition: AxsunOCTCapture.h:269
@ IMAGING_STOP
Definition: AxsunOCTCapture.h:203
AxColormap
Available colormaps to select using axSelectColormap().
Definition: AxsunOCTCapture.h:153
@ RECORD_DONE
Definition: AxsunOCTCapture.h:207
@ RAW3D
Definition: AxsunOCTCapture.h:175
AxErr axWriteFPGAreg(AOChandle session, uint16_t regnum, uint16_t regval)
Write a FPGA register on the Axsun DAQ via the PCIe interface. (WINDOWS ONLY)
Structure for passing a user-generated scan pattern to axScanCmd(LOAD_EXT_PATTERN,...
Definition: AxsunOCTCapture.h:313
int32_t crop_width_total
Definition: AxsunOCTCapture.h:342
double X_symmetry
Definition: AxsunOCTCapture.h:309
struct axtimeval_t time_stamp
Definition: AxsunOCTCapture.h:408
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)
@ SET_DIGITAL_OUTPUT
Definition: AxsunOCTCapture.h:273
@ SETUP_BURST_RASTER
Definition: AxsunOCTCapture.h:257
void axGetErrorString(AxErr errorcode, char *message_out)
Get a description of a specific AxErr error code.
@ START_BURST_RASTER
Definition: AxsunOCTCapture.h:259
AOChandle session
Definition: AxsunOCTCapture.h:428
int32_t height
Definition: AxsunOCTCapture.h:396
@ LOAD_DONE
Definition: AxsunOCTCapture.h:215
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....
double X_phase
Definition: AxsunOCTCapture.h:307
@ FILETYPE_RFU
Definition: AxsunOCTCapture.h:177
uint8_t test_vector_data
Definition: AxsunOCTCapture.h:420
AxErr axGetMessage(AOChandle session, char *message_out)
Get a description of the capture session's interface status.
@ LOAD_EXT_PATTERN
Definition: AxsunOCTCapture.h:249
uint8_t downsample
Definition: AxsunOCTCapture.h:352
AxErr axGetFrameInfoAdv(AOChandle session, int64_t requested_frame_number, uint32_t *returned_frame_number, int32_t *height, int32_t *width, AxDataType *data_type_out, uint32_t *required_buffer_size)
Get information on a frame in the Main Image Buffer (A frame is 256 A-scans, unsynchronized with Imag...
@ SET_SQUAREWAVE_OUTPUT
Definition: AxsunOCTCapture.h:275
AxErr axReportImagingState(AOChandle session)
Programmatically executes the pre-registered callback function to indicate the current DAQ imaging st...
This header file contains enums and other definitions for integrating AxsunOCTCapture....
AxPipelineMode
DAQ pipeline modes.
Definition: AxsunCommonEnums.h:193
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...
@ BMP
Definition: AxsunOCTCapture.h:171
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.
AxFileType
Available file types to export using axExportImages() and axExportImagesAdv().
Definition: AxsunOCTCapture.h:165
@ SET_RECT_PATTERN
Definition: AxsunOCTCapture.h:247
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 ...
Structure for conveying metadata information about an image.
Definition: AxsunOCTCapture.h:392
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 s...
AxErr axGetDataRate(AOChandle session, double *datarate_Mbps)
Get data transfer rate on the active interface.
uint32_t width
Definition: AxsunOCTCapture.h:361
AxErr axHideWindow(AOChandle session, int32_t which_window, uint32_t hidden)
Hide or unhide the OpenGL image display window. (WINDOWS ONLY)
AxErr axRegisterScannerConnectCallback(AxConnectScannerCallbackFunction_t callback_function, void *userData)
Registers a callback function to be executed following a scanner (DAQmx) device connection or disconn...
@ STOP_AT_POSITION
Definition: AxsunOCTCapture.h:255
int32_t crop_height_offset
Definition: AxsunOCTCapture.h:344
@ YZ
Definition: AxsunOCTCapture.h:145
uint8_t trig_too_fast
Definition: AxsunOCTCapture.h:416
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)
AxErr axReadFPGAreg(AOChandle session, uint16_t regnum, uint16_t *regval)
Read a FPGA register on the Axsun DAQ via the PCIe interface. (WINDOWS ONLY)
double brightness
Definition: AxsunOCTCapture.h:367
@ SET_MAX_VOLTAGE
Definition: AxsunOCTCapture.h:271
AxErr axSelectInterpolation(AOChandle session, int32_t which_window, uint8_t interpolation)
Change the OpenGL display interpolation mode. (WINDOWS ONLY)
Structure for data made available to user in a new image callback event via registered AxNewImageCall...
Definition: AxsunOCTCapture.h:426
int32_t axGetLibBuildCfg(void)
Get the build configuration of the library.
@ DESTROY_SCAN
Definition: AxsunOCTCapture.h:245
AxColormap colormap
Definition: AxsunOCTCapture.h:369
AxChannelMode channel_mode
Definition: AxsunOCTCapture.h:406
uint32_t waiting_callbacks
Definition: AxsunOCTCapture.h:434
@ GET_DEVICE_SERIALNO
Definition: AxsunOCTCapture.h:265
uint8_t burst_recorded
Definition: AxsunOCTCapture.h:418
double * raster_pattern
Definition: AxsunOCTCapture.h:321
@ SET_XSINE_YSINE_PATTERN
Definition: AxsunOCTCapture.h:287
@ RETRIEVE_TO_CALLER
Definition: AxsunOCTCapture.h:187
@ RETRIEVE_AND_DISPLAY
Definition: AxsunOCTCapture.h:191
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)
Structure for image export preferences (movie functionality requires installation of OpenCV).
Definition: AxsunOCTCapture.h:359
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...
AxErr axUpdateWindowStyle(AOChandle session, int32_t which_window, uint8_t window_style)
Change the OpenGL display window style. (WINDOWS ONLY)
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.
double contrast
Definition: AxsunOCTCapture.h:365
double X_range
Definition: AxsunOCTCapture.h:297
void axGetLibVersion(int32_t *major, int32_t *minor, int32_t *patch, int32_t *build, char *version_str)
Get the library version.
struct request_prefs_t request_prefs_t
Structure for image request preferences.
AxErr
Error codes returned from AxsunOCTCapture or AxsunOCTControl_LW functions. Use axGetErrorString() in ...
Definition: AxsunCommonEnums.h:34
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,...
double Y_range
Definition: AxsunOCTCapture.h:299
Structure for passing raster scan pattern parameters to axScanCmd(SET_RECT_PATTERN,...
Definition: AxsunOCTCapture.h:291
AxErr axSelectInterface(AOChandle session, AxInterface which_interface)
Select the data interface (Ethernet, PCIe, or none) for the capture session.
@ CALIBRATION_START
Definition: AxsunOCTCapture.h:213
@ SET_XSINE_YRAMP_PATTERN
Definition: AxsunOCTCapture.h:277
AxRequestMode
Available request modes to define behavior of axRequestImageAdv().
Definition: AxsunOCTCapture.h:185
@ INTERFACE_RFU
Definition: AxsunOCTCapture.h:233
@ CONTINUOUS_RASTER_SCAN
Definition: AxsunOCTCapture.h:253
AxInterface
Available capture interfaces to be selected by axSelectInterface().
Definition: AxsunOCTCapture.h:225
uint32_t Y_increments
Definition: AxsunOCTCapture.h:295
@ DISPLAY_ONLY
Definition: AxsunOCTCapture.h:189
uint16_t to8Bit_min
Definition: AxsunOCTCapture.h:350
@ BINARY
Definition: AxsunOCTCapture.h:167
@ SET_AUX_DC_ANALOG_MIN
Definition: AxsunOCTCapture.h:283
AxScannerCommand
Available scanner command types to be executed by axScanCmd().
Definition: AxsunOCTCapture.h:241
@ SET_AUX_DC_ANALOG_MAX
Definition: AxsunOCTCapture.h:281
int16_t to8bit_shift
Definition: AxsunOCTCapture.h:348
double Y_shift
Definition: AxsunOCTCapture.h:303
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.
AxErr axStartSession(AOChandle *session, float capacity_MB)
Start an Axsun DAQ imaging session by allocating memory for the Main Image Buffer.
AxDataType
Integer data types which may be generated by the Axsun DAQ depending on selected pipeline bypass mode...
Definition: AxsunCommonEnums.h:224
uint32_t average_number
Definition: AxsunOCTCapture.h:333
uint32_t ext_X_increments
Definition: AxsunOCTCapture.h:315
@ PCI_EXPRESS
Definition: AxsunOCTCapture.h:229
int32_t opencv_colormap
Definition: AxsunOCTCapture.h:371
Structure for packet metadata (for internal use.)
Definition: AxsunOCTCapture.h:377
AxErr axImagingCntrlPCIe(AOChandle session, int16_t number_of_images)
Control the image streaming behavior of the Axsun PCIe DAQ between Live Imaging, Burst Recording,...
AxErr axSelectColormap(AOChandle session, int32_t which_window, AxColormap colors)
Select the color scheme of images displayed in an OpenGL window. (WINDOWS ONLY)
AxErr axLoadFile(AOChandle session, const char *path_file, int32_t *packets_read)
Load contents from file on disk into Main Image Buffer.
uint32_t ext_Y_increments
Definition: AxsunOCTCapture.h:317
Structure for image request preferences.
Definition: AxsunOCTCapture.h:326
@ GET_DEVICE_MODEL_NUMBER
Definition: AxsunOCTCapture.h:285
int32_t which_window
Definition: AxsunOCTCapture.h:331
int32_t axGetLibBuildDateTime(char *datetime_str)
Get a string describing the time and date that the library was built.
void(__cdecl * AxConnectScannerCallbackFunction_t)(void *)
A user-provided function to be called upon connection or disconnection of a NI-DAQmx device....
Definition: AxsunOCTCapture.h:441
AxDimension
Dimension for sectioning data cube with axRequestCutPlane().
Definition: AxsunOCTCapture.h:139
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)
AxErr axSetTrigTimeout(AOChandle session, uint32_t framesUntilForceTrig)
Control the behavior of Force Trigger mode.
double * linear_pattern
Definition: AxsunOCTCapture.h:319
void(__cdecl * AxCallbackFunction_t)(uint32_t, void *)
A generic user-provided callback function with an unsigned int and void* argument....
Definition: AxsunOCTCapture.h:444
struct export_prefs_t export_prefs_t
Structure for image export preferences (movie functionality requires installation of OpenCV).
uint8_t force_trig
Definition: AxsunOCTCapture.h:414
@ CONTINUOUS_LINE_SCAN
Definition: AxsunOCTCapture.h:251
@ SELECT_DEVICE
Definition: AxsunOCTCapture.h:267
@ PNG
Definition: AxsunOCTCapture.h:173
@ GIGABIT_ETHERNET
Definition: AxsunOCTCapture.h:227