Image Capture Tool
version 1.0.0.375 or later

Introduction

The Image Capture Tool (AxsunImageCaptureTool.exe) is a software interface for users of the Axsun Ethernet/PCIe DAQ. It provides a tab- and button-based GUI to easily view the captured image data transmitted from the DAQ device by exposing functionality in the AxsunOCTCapture API. It supports image capture over Gigabit Ethernet and PCIe interfaces, as well as DAQ imaging mode controls over the PCIe interface only.
The Image Capture Tool ("ICT") is not intended to be a fully-featured OCT image capture and analysis application, but rather a springboard for integrating the AxsunOCTCapture library ("Capture API") functionality into the user's custom OCT imaging application. The Image Capture Tool's primary functions include:
  • Retrieve and display data transmitted by the DAQ and buffered in RAM
    • Supports all data types (8-bit, 16-bit, 32-bit, complex)
    • Supports image cropping and averaging during retrieval
    • Supports raw unprocessed fringe data or processed intensity OCT images
  • Indicate DAQ imaging mode, status of data buffer, and status of Image_sync synchronization trigger
  • Save and load data buffers to and from disk
  • Export captured images to a variety of file types
  • Control DAQ imaging mode and FPGA registers (PCIe interface only)
  • Expose secondary AxsunOCTCapture API features such as:
    • OpenGL-based rendering, scan conversion, etc.
    • Control 2-axis galvo raster scan pattern via some NI USB multi-function I/O devices

Compatibility Requirements

PC: The Image Capture Tool is compatible with 64-bit versions of Windows OS from Windows 7 through Windows 10. An available 1Gbps Ethernet port is required for connecting to the Ethernet DAQ via network interface, or an available PCIe Gen 1 x8 port is required for connecting to the PCIe DAQ.
Because the Ethernet/PCIe DAQ performs FPGA-based OCT image formation on the DAQ board, computer computational requirements such as CPU speed, processor cores, and available RAM are typically satisfied by "consumer-level" personal computer platforms available from 2014 onward.
NOTE: For best Ethernet image capture performance, disable any malware protection utilities which may impede network traffic and avoid running other applications which compete for network bandwidth.
FPGA bitstream: Modern versions of the Image Capture Tool (i.e. based on AxsunOCTCapture version 3.x or newer) do not support all legacy FPGA bitstream versions. Keep your FPGA version current to take advantage of new DAQ functionality and modern versions of the ICT.
Camera Link DAQ Support: The Image Capture Tool and the AxsunOCTCapture library do not support the Axsun Camera Link DAQ. A third-party PCIe frame grabber and its associated software is required to capture image data transmitted from the Camera Link DAQ. More information on the Axsun Camera Link DAQ can be found here.

Installation

To install the Image Capture Tool and its dependencies, download the most recent version from www.axsun.com/downloads and follow the complete software installation instructions for the Axsun Integrated Engine.

Using the Image Capture Tool

NOTE: Your screen may not match exactly with the screen representations shown in this guide, depending on your system configuration and installed firmware/software versions.
  • Launch the Hardware Control Tool application to access high-level functionality provided by the DAQ board and any connected Laser Engines (optional).
  • Launch the Image Capture Tool (AxsunImageCaptureTool.exe) and make the appropriate selection when prompted for either an Ethernet or PCIe capture session:
  • If you select a PCIe capture session, a second popup will appear. Select "Axsun":
  • The selected session type will be indicated at the top of the window, and a status message will be given on the Buffer tab:
  • If installation or connection errors (e.g. missing dependencies or hardware) were encountered when starting the session, the Image Capture Tool will support review of previously saved data files only. Follow recommendations given in error prompts, review the installation instructions, or see the DAQ Troubleshooting page to overcome the errors and then try launching the ICT again.

Image Capture Status Indicators and Image Request Controls

The bottom left corner of the Image Capture Tool window has lights to indicate the following DAQ and buffer states (also see Capture API documentation for axGetStatus()):
  • Imaging: data is actively being enqueued into the Main Image Buffer, either transmitted from the DAQ or loaded from a previously-saved data file.
  • Burst Recording: image data is currently being acquired from the DAQ in Burst Record mode.
  • Loading: image data is currently being loaded into the Main Image Buffer from a previously-saved data file.
  • Image_sync Trigger Too Fast: the frequency of the trigger signal connected to the Image_sync input exceeds the allowable maximum (≈390 Hz for a laser with 100 kHz A-line rate).
  • Image_sync Too Slow (Force Trig): the frequency of the trigger signal connected to the Image_sync input is too slow relative to the configured Force Trigger timeout period, and thus the newest frame has been displayed in unsynchronized Force Trigger mode (see Capture API documentation for axSetTrigTimeout()).
Image capture and image_sync trigger status indicators.
  • Move the white Requested Image # slider control to request an image to be retrieved from the Main Image Buffer for display. This can be a unique image number, or it can be set equal to 0 to display the most recently enqueued image in the buffer (typical for real-time low-latency display in Live Imaging mode). Numeric indicators show the actual Returned Image #, and the Width (A-scans) & Height (Pixels) dimensions of the displayed image (see Capture API documentation for axGetImageInfo() and axRequestImage()).
  • A general purpose message indicator shows relevant information, warnings, or errors that may occur when requesting images.
Request Image # controls, image size indicators, and message indicator field.
  • Press the SHOW MORE INFO button to display a pop-up window that provides more advanced information about the displayed image, including timestamp, image dimensions before and after cropping, data type, ADC channel, pipeline mode, and other details:
  • If Burst Recorded images have been captured or loaded into the Main Image Buffer, a LOOP button will automatically be shown and playback start image (green) and stop image (red) sliders are available to control looping playback behavior. Press the LOOP button to toggle between paused and playback display modes. Numeric controls are also provided for the current requested image (white), start image (green), and stop image (red) to control image playback more precisely than dragging the sliders.
Request Image # controls when Burst Recorded data is in the Main Image Buffer

Image Display Window Tabs

The Image Capture Tool window contains tabs for a full 2D OCT B-Scan (i.e. intensity image) as well as a 1D Single A-Scan plot selected from the currently displayed OCT B-Scan.
HINT: 2D image and 1D plot indicators provide standard LabVIEW-based interaction tool palettes for zooming in & out, panning, changing the range of x, y, and z (grayscale) axes, etc.:
Axis AutoScaling can be toggled by right-clicking on an axis and checking or unchecking the AutoScale selection from a pop-up menu:
FULL buttons automatically set the indicator to full zoom (all of the way out) and disable AutoScaling on all axes. More details on interactive LabVIEW graph tools can be found at www.ni.com.

OCT B-Scan

Processed OCT intensity images (as well as other data representations acquired in different pipeline modes) which are retrieved from the Main Image Buffer will be displayed on the OCT B-Scan tab:
2D intensity image on the OCT B-Scan tab
  • Press the SAVE IMAGE (.bin) button to save the currently displayed image in a header-less raw binary format. The file formatting details (required for interpreting the saved binary file) will be displayed in the message indicator:
  • Press the SAVE IMAGE (.png) button to save the currently displayed image in .png format.
  • The Images/Sec (acq.) indicator shows the current image acquisition rate during live image capture (i.e. the rate at which new images are being enqueued into the Main Image Buffer).
  • The Images/Sec (disp.) indictor shows the current image display rate (i.e. the refresh rate of the OCT B-Scan indicator).
NOTE: The image acquisition and display rates shown will not necessarily be equal. Depending on the A-scan rate, image dimensions, pipeline mode, and host PC capabilities, the acquired image rate may substantially exceed the displayed image rate.

Single A-Scan

The Single A-Scan tab displays a 1D graph with a single A-scan's amplitude as a function of pixel number (e.g. z-dimension or depth) in a processed OCT image, or as a function of sample number in a pre-FFT (interference fringe amplitude) pipeline mode.
  • Select the desired A-scan to view in the 1D graph using the Plot A-Scan # control or drag the yellow vertical cursor on the OCT B-scan thumbnail image.
1D amplitude plot on the Single A-Scan tab
  • Enter the system's scan depth value (in mm) into the X-axis scale to field in order to convert the depth axis display from pixels numbers to physical units.
NOTE: Accuracy of a mm-scaled X-axis depends on the accuracy of the scan depth value entered into the X-axis scale to field. The connected system's actual scan depth is not automatically communicated from the hardware, not does it accommodate refractive index inhomogeneities in the scanned object.

Control and Indicator Tabs

Additional Image Capture Tool functionality is grouped onto several tabs on the right side of the main window. The following sections highlight the relevant controls and indicators available on each tab, and their associated AxsunOCTCapture API functions. Refer to the AxsunOCTCapture API documentation and function reference for more information on the underlying behavior of these controls and indicators.

Image

The Image tab provides basic display controls for image retrieval and display (including cropping and averaging) as well as OpenGL rendering and window behavior. It is divided into Image Request Preferences and OpenGL Controls sections:
The Image tab has two sections: Image Request Preferences and OpenGL Controls

Image Request Preferences

  • Press the RESET button to return all values in the Image Request Preferences to their default values.
  • Select the desired display behavior using the Mode menu:
    • Retrieve Only copies image data from the AxsunOCTCapture library's Main Image Buffer into the Image Capture Tool application, displaying it on the OCT B-Scan and Single A-scan tabs.
    • Display Only bypasses the retrieval of image data into the Image Capture Tool application and rather renders it directly to an OpenGL window (created by first pressing the axSetupDisplay button). Requested image data will not be displayed on the OCT B-Scan and Single A-Scan tabs. This mode is optimized for speed because direct rendering avoids a memory-copy of the image contents.
    • Retrieve & Disp exhibits both behaviors: it copies the image data into the Image Capture Tool application as well as rendering it directly to an OpenGL window.
  • Use the Average # control to calculate the average (arithmetic mean) of up to 10 consecutive images in the buffer during the retrieval & display. Set equal to 1 to disable averaging. Image averaging helps suppress noise in the displayed image but also slows the image display rate. Averaging is unavailable for some data types and is not available in Force Trigger mode.
  • Cropping an image during retrieval & display avoids inefficiency associated with copying unwanted pixels (e.g. a galvo scanner fly-back region not suitable for display). Cropping controls the retrieved image dimensions; the original images stored in the Main Image Buffer are unaffected. Set all values equal to 0 to turn off cropping behavior and retrieve images with their original dimensions.
    • Crop Width Offset sets the first A-scan to be retrieved.
    • Crop Width Total sets the total number of A-scans to be retrieved.
    • Crop Height Offset sets the first depth pixel to be retrieved.
    • Crop Height Total sets the total number of depth pixels to be retrieved.
Image retrieval cropping geometry
Control or Indicator Name
Associated Capture API Function and Arguments
Notes
Mode
request_mode member of
request_prefs_t struct argument ofaxRequestImage()
Also calls axHideWindow() to show or hide the OpenGL image display window depending on the selected mode.
Average #
average_number member of
request_prefs_t struct argument ofaxRequestImage()
Averaging is unavailable for some data types and is not available in Force Trigger mode.
Downsample
downsample member of
request_prefs_t struct argument ofaxRequestImage()
Speeds up JPEG decompression by reducing image resolution 2x along each dimension.
Crop Width Offset, Width Total, Height Offset, Height Total
request_prefs_t struct members in argument ofaxRequestImage()
This cropping applied to image prior to any cropping during OpenGL image rendering.
Window #
which_window member of
request_prefs_t struct argument ofaxRequestImage()
Controls which OpenGL window the requested image is rendered to.
To 8-bit Shift,
To 8-bit Min
request_prefs_t struct members in argument ofaxRequestImage()
Controls 16-bit to 8-bit dynamic range compression behavior.
HINT: For more information on behavior controlled by fields in the Image Request Preferences section of the Image tab, see the AxsunOCTCapture API documentation for the axRequestImage() function and specifically the request_prefs_t struct members.

OpenGL Controls

The AxsunOCTCapture library supports direct rendering of images to child windows via OpenGL on platforms which support OpenGL version 3.3 or newer.
  • To use OpenGL rendering, first press the axSetupDisplay button to create a window and initialize OpenGL resources.
  • Insure that the Mode menu is set to either Display Only or Retrieve & Disp.
  • Make additional adjustments to the displayed image properties using the controls listed here:
Control or Indicator Name
Associated Capture API Function and Arguments
Notes
axSetupDisplay
axSetupDisplay()
Initiates OpenGL rendering functionality.
Window Style
axUpdateWindowStyle()
Choose Floating (movable with border) or Fixed (borderless) window styles.
Polar Scan Convert
convert argument of axScanConvert()
Supports display of OCT images captured using a rotational scanning device by performing a polar-to-cartesian scan conversion.
Inner Radius, Outer Radius, Inner Crop, Outer Crop
arguments of axScanConvert()
Supports polar-domain (radial) transformations (e.g. "Z-offset calibration") for scan-converted images.
Interpolation
axSelectInterpolation()
Change the interpolation algorithm.
Colormap
axSelectColormap()
Adjust the displayed image colormap.
Contrast, Brightness
axAdjustBrightnessContrast()
Adjust the displayed image brightness and contrast.
Scale: Once
axAdjustBrightnessContrast()with contrast = 0
Auto-scales the brightness and contrast once (on the next rendered image).
Scale: Cont.
axAdjustBrightnessContrast()with contrast = -1
Auto-scales the brightness and contrast continually (for each newly rendered image).
Window Width, Height
axUpdateView()
Change the size of the OpenGL window, as well as the window position for fixed windows.
Crop Top, Left, Right, Bottom
axCropRect()
Cropping dimensions applied on the OpenGL rendered image. (Superseded by image cropping available in axRequestImage() )
NOTE: If desired, more than one OpenGL rendering window can be created by pressing axSetupDisplay additional times, with the total number of generated windows indicated in the numeric "of ___" indicator next to the button (see the axCountWindows() API function). Any subsequent adjustments to the OpenGL image display properties are targeted only to the specific window number (see the which_window argument in the OpenGL related API calls) selected in the control to the left of this indicator. This number also corresponds to the window targeted for image rendering in the Window # field of the Image Request Preferences.

Buffer

The Buffer tab provides an indication of the current Main Image Buffer status and other information related to session initialization, plus controls for interacting with the buffer, such as the ability to Save and Load buffers to/from a file for offline storage and retrieval, and the ability to Export individual images into common file types.
The Buffer tab
Control or Indicator Name
Associated Capture API Function and Arguments
Notes
Main Image Buffer status:
axGetStatus()
Indicates current Main Image Buffer status.
Data Rate (Mbps):
axGetDataRate()
A chart of the instantaneous data transfer rate on the active interface as a function of time.
LOAD BUFFER FROM FILE
axLoadFile()
Load a previously-saved buffer file.
SAVE BUFFER AS FILE
axSaveFile()
Save the current buffer contents to a file.
RESIZE BUFFER to ___ MB
axResizeBuffer()
Clears and resizes the Main Image Buffer.
SET TRIGGER TIMEOUT to ___ frames
axSetTrigTimeout()
Configure the force trigger timeout measured in numbers of frames (256 A-line intervals).
EXPORT IMAGES to ___
axExportImages() or axExportImagesAdv()
Exports all images from the start (green) to the stop (red) image control sliders into individual files. Choose the file type from several common formats.
Width
export_prefs argument for axExportImagesAdv()
Control the width of exported images.
Height
export_prefs argument for axExportImagesAdv()
Control the height of exported images.
Save / Load / Export / Resize status:
See AxErr return values from the relevant functions.
Displays status or error messages after saving, loading, exporting, or resizing the buffer.
Capture Session status:
axGetMessage()after calls toaxStartSession()or axSelectInterface()
Provides a description of the capture session's current interface status.
Capture Library:
axGetLibVersion()
axGetLibBuildDateTime()
axGetLibBuildCfg()
Version details for the Capture library loaded by the application.
Application:
n/a
Version information for the Image Capture Tool application.

Scanner

The Scanner tab provides controls for a connected National Instruments USB multi-function I/O device, commonly used to generate a raster-scan waveform for a 2-axis galvo scanner. See the AxsunOCTCapture API documentation for the axScanCmd() function for more details on supported devices, terminal connections, and behaviors.
The Scanner tab has controls for waveform generation and auxiliary output functions
Control Name
Associated scan_command argument to axScanCmd()
Notes
Connected Devices:
COUNT_DEVICES
GET_DEVICE_MODEL_NUMBER
GET_DEVICE_SERIALNO
Lists connected devices by model number and serial number. Click on a device in the list to make it the active device targeted in subsequent commands.
Status:
AxErr return value from axScanCmd()
Provides status and error messages following execution of scanner commands.
STOP SCAN
STOP_AT_POSITION
Stops the 2-axis waveform generation.
1D LINE SCAN
CONTINUOUS_LINE_SCAN
Continuously generate a linear (1D) scan.
2D RASTER SCAN
CONTINUOUS_RASTER_SCAN
Continuously generate a raster (2D) scan.
Scan Pattern Cluster
SET_RECT_PATTERN
SET_XSINE_YRAMP_PATTERN
SET_XSINE_YSINE_PATTERN
scan_parameters argument to axScanCmd() defines the X/Y raster pattern increments, voltage ranges, offsets, and other characteristics based on this scan pattern cluster.
Sample Clock
SET_SAMPLE_CLOCK
Switch between External and Internal 100kHz sample clock source. Connect the External clock source to the laser's sweep trigger for system synchronization.
Limit (V)
SET_MAX_VOLTAGE
Set the maximum voltage for the 2-axis waveform generation. (This is a safeguard against over-driving connected hardware.)
Auto Restart
n/a
If ON, changes to values in the Scan Pattern Cluster control will immediately update the currently executing scan pattern.
LOAD EXT PATTERN
LOAD_EXT_PATTERN
Load a user-defined scan pattern from a file if the pre-defined scan patterns in the Scan Pattern Cluster's Shape menu are insufficient.
DC Analog Output (V)
SET_AUX_DC_ANALOG_OUTPUT
Controls a DC (i.e. not waveform) analog output voltage on supported devices.
Min Limit
SET_AUX_DC_ANALOG_MIN
Sets the minimum DC analog output voltage on supported devices, as a safeguard against accidental over-driving of the connected hardware.
Max Limit
SET_AUX_DC_ANALOG_MAX
Sets the maximum DC analog output voltage on supported devices, as a safeguard against accidental over-driving of the connected hardware.
Square Wave Freq (Hz)
SET_SQUAREWAVE_OUPTUT
Synthesize a square wave output at the desired frequency on supported devices.
Digital Output
SET_DIGITAL_OUTPUT
Control a general purpose digital output on supported devices.

PCIe

The PCIe tab provides basic controls for DAQ Imaging Mode and low-level FPGA register read/write access when connected to a DAQ via the PCIe interface.
The PCIe tab
Control Name
Associated Capture API Function and Arguments
Notes
PCIeDAQ: LIVE
axImagingCntrlPCIe(-1)
Start live imaging.
PCIeDAQ: OFF
axImagingCntrlPCIe(0)
Stop live imaging or abort a Record operation.
PCIeDAQ: RECORD
axImagingCntrlPCIe(N)
Start a Burst Record operation of N Images.
WRITE (PCIe Registers)
axWritePCIeFPGAreg()
regnum and regval arguments as entered in the associated RegNum and RegVal fields. (For Axsun internal use only.)
READ (PCIe Registers)
axReadPCIeFPGAreg()
Reads all registers in a loop and lists hex and decimal values in the associated table. (For Axsun internal use only.)
WRITE (FPGA Registers)
axWriteFPGAreg()
regnum and regval arguments as entered in the associated RegNum and RegVal fields.
READ (FPGA Registers)
axReadFPGAreg()
Reads all registers in a loop and lists hex and decimal values in the associated table.
SET MODE
axPipelineMode()
Sets the selected Pipeline Mode, Channel Mode, and Subsampling Factor.
NOTE: The PCIe tab will be disabled unless a PCIe capture session was successfully started by selecting the PCIe interface during Image Capture Tool launch (also seeaxSelectInterface()). The controls and associated API function calls on this tab are not operational when connected to a DAQ via the Ethernet or USB interfaces.

Quitting the Image Capture Tool

To exit the Image Capture Tool simply close the main window by clicking the "x" icon in the upper right corner.
Last modified 6mo ago