Welcome to the OCTproZ v1.7.0 User Manual!

Date: December 7, 2023   Author: Miroslav Zabic (zabicmagic@spectralcode.de)

About

OCTproZ is an open source software for optical coherence tomography (OCT) processing and visualization. A plug-in system enables the integration of custom OCT systems and software modules.

Main features are:


Quick Start Guide

This sections shows you how to load an OCT raw dataset with the Virtual OCT System Extension that is provided with OCTproZ. For testing purposes you can download a test data set from here.

1. Open Virtual OCT System

Click on File → Open System

The system manager opens in a new window. Select "Virtual OCT System" and click on "Select"

2. Set Virtual OCT System settings

Click on File → System Settings

The system settings window opens. Click on Select file and select the OCT raw data file you want to open. Enter the parameters in the settings window according the dimensions of your raw data (bit depth per sample, samples per line,...). For more information on the individual parameters, click on the question mark in the upper right corner and then on the input field you would like to learn more about.

3. Set processing parameters in sidebar

Enter suitable processing paramters in the sidebar. The white curves in the k-linearization, dispersion compensation and windowing plots are reference curves that indicate how a curve would look like that does not effect the processing result at all. In other words: If your curve looks exactly as the white curve then the processing result will not change if this particular processing step is deactivated. For more information on processing, see the processing pipeline section.

4. Start the processing

Click on the "Start" button in the top left of the sidebar.

5. Adjust display settings

Hover your mouse over one of the output windows and a control panel will appear that you can use to adjust the display settings.


Processing Pipeline

This section gives an overview of the OCTproZ processing pipeline. The processing takes place entirely on the GPU. OCT raw data (i.e. spectral fringes) from the OCT system is transferred to RAM until a user-defined amount of B-scans is acquired (B-scans per buffer). Via direct memory access (DMA) this raw data batch is then copied asynchronously to GPU memory where OCT signal processing is performed. Some processing steps are combined into a single compute kernel to improve performance. For example, k-linearization, dispersion compensation and windowing take place in the same kernel. This way, all three operations can be performend with just a single iteration through the sample points.

Processing Steps

Effect of single processing steps

Every processing step, except data conversion and IFFT, can be enabled and disabled during processing. To illustrate the effect of single processing steps, B-scans of an OCT phantom (APL-OP01, Arden Photonics, UK) were acquired with a custom made SS-OCT system without k-klocking and with a slight dispersion imbalance. The acquired raw data was processed multiple times, each time with a different processing step disabled:


The B-scans above show a test pattern of an OCT phantom (APL-OP01, Arden Photonics, UK). Below each B-scan is an enlarged view of the corresponding area framed in red within the B-scan. a) The full processing pipeline is enabled. b) k linearization is disabled (all other steps are enabled). c) Dispersion compensation is disabled (all other steps are enabled). d) Windowing is disabled (all other steps are enabled). e) Fixed-pattern noise removal is disabled (all other steps are enabled). The red arrows point to horizontal structural artifacts that are visible if fixed-pattern noise removal is disabled.

Visualization

For live visualization of the processed data in 2D and 3D, the user has access to three different output windows: B-scan, en face view and volume. B-scan and en face view are orthogonal cross-sectional slices of the volume, which can be maximum intensity projections or averaged layers of a user-defined amount of layers of the volume. For easier orientation, red marker lines can be overlaid to indicate the current B-scan slice position within the en face view and vice versa.
The interactive volume viewer displays acquired OCT volumes without cropping or downsampling in real time. As soon as one batch of data is processed, the corresponding part of the volume is updated and rendered.. In order to avoid unnecessary data transfer to host memory, CUDA-OpenGL interoperability is used which allows the processed data to remain in GPU memory for visualization.

Volume rendering
Here are some example images showcasing an OCT volume of a fingernail rendered using the implemented volume rendering techniques:


Plug-ins

A developer guide with more information on plug-in development can be found here.

There are two different types of plug-ins: Acquisition Systems and Extensions.
Acquisition Systems represent software implementations of actual or virtual OCT systems. Extensions are software modules that extend the functionality of an OCT system (e.g. software control of a liquid lens) or provides additional custom defined post processing steps. Both, Acquisition Systems and Extensions, are dynamic libraries that are loaded into OCTproZ during runtime.

To develope custom plug-ins the DevKit needs to be used. Currently, the easiest way to develop plug-ins is to download the entire OCTproZ project from GitHub, compile the DevKit and OCTproZ and use the existing examples (Virtual OCT System, Demo Extension) as templates. A more advanced Extension that can be used as template as well is the Image Statistics Extension .

Troubleshooting

No visual output. B-scan, En Face View and Volume windows are black after clicking start button
Check if you have a CUDA compatible GPU.
Check if your monitor cable is connected to the GPU. If your monitor is connected to the motherboard, the processing will still run on the GPU but there will be no visual output in the OpenGL windows.
Check if you have the right processing settings. With some settings, the complete output is set to 0 and the output windows remain black. For example if all k-linearization coefficients are 0, the output will be 0. If the windowing fill factor is 0, the output will be 0. If the grayscale conversion multiplicator is 0, the output will be 0.
Check if the stretch parameters are greater than 0 in your display settings. See step 5 in the quick start guide
If you are using Windows Remote Desktop, OpenGL may not work properly which can cause black output windows.
Crash right after clicking start button and using Virtual OCT System
Maybe the size of the OCT data buffer is too large and you are running out of GPU memory. Try reducing the buffer size by reducing B-scans per buffer in the Virtual OCT System settings.

FAQ

Which OCT raw data format is supported by the Virtual OCT System?
Raw data files that only contain the raw data are supported. The samples in the raw file must have a bit depth between 8 bits and 32 bits, the byte order must be little-endian and the raw data must be unpacked. For example, raw data with packed 12-bit samples (data for two samples is spread over 3 bytes) is currently not supported.

If you have any questions, feel free to contact me: zabicmagic@spectralcode.de