Optical Coherence Tomography (OCT) is a non-invasive imaging methodology which attains fine resolutions  of several microns similar to microscopy, with a common limitation of penetration depths of a few millimetres. Since its introduction in Ophthalmology in the early 1990s, OCT has cycled through several generations  – Time-Domain or TD-OCT and Fourier-Domain or FD-OCT, with its two variants Spectral-Domain or SD-OCT, and Swept-Source or SS-OCT. FD-OCT has an SNR advantage  over the earlier TD-OCT. Most commercial OCT systems are shipped with bundled software which does the data processing necessary for FD-OCT. A large number of open-sourced packages exist, many of them implemented in MATLAB™, which take in the data from the commercial OCT systems and do post-processing such as segmentation . Some groups have also open-sourced GPU-based  OCT pipelines. Our research effort is to produce low-cost OCT  implementations, along with the software required for data acquisition and processing.
Our focus on lowering cost precludes SS-OCT due to relatively high costs of swept-sources. From our initial  TD-OCT implementation, we moved on to FD-OCT to shorten acquisition times as is needed for in-vivo biological samples. We found parallel SD-OCT  to be an architecture which could support a low-cost implementation. The software reported here implements data acquisition and processing without the need for expensive components like GPU-accelerated high-throughput data-acquisition cards. Simplicity and ease of use were our main considerations.
The cost of OCT devices represents a significant barrier to entry into the field, preventing the adoption of OCT for a wider range of applications. Commonly available commercial OCT devices cost more than five figures in US dollars till recently . This software would be useful for optics researchers who wish to assemble lab-built camera-based parallel SD-OCT devices for one-tenth the cost of commercial devices. The detailed descriptions of our device designs, published separately , along with this software, help in the democratization of OCT. Such low-cost OCT devices are not just useful for clinical use; they also encourage the use of OCT devices in University laboratories, enabling inter-disciplinary work with Material Science, Chemistry or Biology departments. Compared to electron microscopy, OCT tomograms are less expensive and have additional advantages of ease of sample preparation and of being non-destructive. Tomographic imaging of crystal imperfections, biofilms, measurements of refractive index and dispersion of samples, volume renderings of micro-machined or laser etched parts and many more applications can result from inter-departmental collaborations using OCT. Many more innovative investigations could result from lowering the cost barrier to entry for OCT imaging.
Researchers in OCT commonly use the terms A-scan and B-scan. A-scan refers to the one-dimensional reflectivity plot at one point on the sample, along its depth. B-scan refers to a 2-D plot of sample reflectivity, with the lateral extent along the sample shown on the horizontal axis, and the depth axis going into the sample being depicted as the downward vertical axis. This is illustrated in Figure 1. We refer to B-scans repeatedly in our discussion.
ABC-OCT, Affordable B-scan Camera-based Optical Coherence Tomography, is implemented in C++ using the OpenCV  framework. It is compatible with the platforms supported by OpenCV, and has been tested on Windows 8.1, Windows 10 and Linux (Mint 18.1, kernel 4.4.0). We use a version including the camera SDK from QHYCCD  of our camera (QHY5L-II M) compiled from BscanFFT.cpp for our research. In case a camera from another manufacturer is being used, if an SDK is supplied, our code can easily be modified to use that SDK. To demonstrate this, we have included a version of our software which will work with any available webcam, which can be compiled from BscanFFTwebcam.cpp.
The software has been tested for both algorithmic correctness as well as for cross-platform operation by running on multiple platforms, as listed in the availability section. The test images included in the source repository were used to verify correctness of the code, by comparing the results of the included Matlab-compatible GNU Octave code and our C++ code. The BscanFFTsim.cpp file, when compiled, creates a test version of our software which can directly read test image files. To quickly test the webcam version of our software, the user just needs to run it and display the included test images in front of the webcam, which can be done using a mobile phone, for example.
A possible test procedure for the webcam version is:
The software has been tested by compiling and running on Microsoft®Windows 8.1, Microsoft®Windows 10 and Linux Mint 18.1. Software using the same QHYCCD SDK has been successfully run on Windows XP. Hence, it is likely that compiling with suitable architecture flags (32-bit or 64-bit) would enable this software to run on the wide range of OS families supported by the OpenCV framework and the QHYCCD SDK. The included Windows binaries have been tested and found to be running on Windows 8.1 and Windows 10. The included AppImage Linux binaries have been tested and found to be running on Linux Mint 18.1, Ubuntu 16.04 LTS and Fedora 24. Newer distros are likely to have problems with the AppImage due to libc incompatibilities, and hence compiling from source is recommended.
The software is written in C++, and has been tested by compiling with GCC version 5.4.0 and Microsoft®Visual Studio Community version 15.9. It is likely that the software will compile and run on the wide range of architectures supported by the OpenCV framework and the QHYCCD SDK.
Installed size of the ABC-OCT software is only a few MB, but a modern PC with at least 4GB of RAM is recommended. The default settings make the software use slightly more than 1 GB of RAM, in order to optimize performance. The raw data dumps saved also use up disk space; typically 1 GB for 50 frames of capture data with saving of intermediate frames enabled. The full functionality of the software, with exposure control and arbitrary capture frame size needs a QHYCCD (brand name) camera and its SDK to be installed. The webcam version needs a functioning webcam installed on the system. Keyboard inputs are used to control the software.
The ABC-OCT software requires the OpenCV framework. opencv-3.3.1 and opencv-3.4.0 have been tested, higher versions should also work. Realtime display requires a camera SDK from QHYCCD, or any installed webcam.
Hari Nandakumar did the software development and is its current maintainer. Shailesh Srivastava supervised the development process.
Persistent identifier: https://doi.org/10.5281/zenodo.3403735
Licence: MIT license
Publisher: Hari Nandakumar
Version published: 1.12b
Date published: 25/03/19
Persistent identifier: https://github.com/hn-88/FDOCT
Licence: MIT license
Date published: 25/03/19
Our ABC-OCT software enables anyone with access to an undergraduate level optics lab to assemble and use a parallel Fourier-Domain Optical Coherence Tomography (FD-OCT) instrument. Even the webcam demo version enables qualitative tomographic imaging. The software has been made freely available to the community to further encourage the use of OCT imaging in student laboratories and elsewhere.
The MIT License has been selected to ensure that the code is available with minimum restrictions. Support for modifying and using the software is available through GitHub issues page, or by contacting the corresponding author.
We thank Bhagawan Sri Sathya Sai Baba, the founder Chancellor of our University, who guided and encouraged us throughout this work.
The authors have no competing interests to declare.
Drexler, W and Fujimoto, J G 2015 Optical Coherence Tomography: Technology and Applications, Second Edition. Switzerland: Springer International Publishing. DOI: https://doi.org/10.1007/978-3-319-06419-2_58
Fujimoto, J and Swanson, E 2016 The development, commercialization, and impact of optical coherence tomography. Investigative ophthalmology & visual science, 57(9): OCT1–OCT13. URL: https://iovs.arvojournals.org/article.aspx?articleid=2536019. DOI: https://doi.org/10.1167/iovs.16-19963
De Boer, J F, et al. 2003 Improved signal-to-noise ratio in spectral-domain compared with time-domain optical coherence tomography. Optics letters, 28(21): 2067–2069. URL: http://ol.osa.org/abstract.cfm?URI=ol-28-21-2067. DOI: https://doi.org/10.1364/OL.28.002067
Mayer, M A, et al. Dec. 2010 Retinal Nerve Fiber Layer Segmentation on FD-OCT Scans of Normal Subjects and Glaucoma Patients. Biomed. Opt. Express, 1(5): 1358–1383. URL: http://www.osapublishing.org/boe/abstract.cfm?URI=boe-1-5-1358. DOI: https://doi.org/10.1364/BOE.1.001358
Jian, Y, Wong, K and Sarunic, M V 2013 GPU accelerated OCT processing at megahertz axial scan rate and high resolution video rate volumetric rendering. In: Optical Coherence Tomography and Coherence Domain Optical Methods in Biomedicine, XVII. Vol. 8571. International Society for Optics and Photonics. 85710Z. URL: https://www.spiedigitallibrary.org/conference-proceedings-of-spie/8571/85710Z/GPU-accelerated-OCT-processing-at-megahertz-axial-scan-rate-and/10.1117/12.2006670.short. DOI: https://doi.org/10.1117/12.2006670
Nandakumar, H, Subramania, A K and Srivastava, S 2018 Sub-4-micron full-field optical coherence tomography on a budget. Sādhanā, 43(6): 97. URL: https://www.ias.ac.in/article/fulltext/sadh/043/06/0097. DOI: https://doi.org/10.1007/s12046-018-0881-3
Grajciar, B, et al. 2005 Parallel Fourier domain optical coherence tomography for in vivo measurement of the human eye. Optics Express, 13(4): 1131–1137. URL: http://www.opticsexpress.org/abstract.cfm?URI=oe-13-4-1131. DOI: https://doi.org/10.1364/OPEX.13.001131
Bradski, G 2000 The OpenCV Library. In: Dr. Dobb’s Journal of Software Tools. URL: https://github.com/opencv/opencv.
Soldan, J Oct 2018 QHYCCD Linux SDK. This repository contains a new (2017+) QHYCCD’s Ubuntu Linux 64 and ARM V8 (Raspberry PI3, Odroid XU4) deliveries. URL: https://github.com/qhyccd-lzr/QHYCCD_Linux_New.