[$\ast$]Corresponding and lead author;
Email address<EMAIL_ADDRESS>
†Equal contribution

# OCTolyzer: Fully automatic analysis toolkit for segmentation and feature
extracting in optical coherence tomography (OCT) and scanning laser
ophthalmoscopy (SLO) data

Jamie Burke  School of Mathematics, University of Edinburgh, Edinburgh, UK
Robert O Curle Ophthalmology Suite, Institute for Regeneration and Repair,
University of Edinburgh, UK  Justin Engelmann  School of Informatics,
University of Edinburgh, Edinburgh, UK  Centre for Medical Informatics,
University of Edinburgh, Edinburgh, UK  Samuel Gibbon  Robert O Curle
Ophthalmology Suite, Institute for Regeneration and Repair, University of
Edinburgh, UK  Charlene Hamid  Clinical Research Facility and Imaging,
University of Edinburgh, Edinburgh, UK  Diana Moukaddem  Department of Vision
Sciences, Glasgow Caledonian University, Glasgow, UK  Dan Pugh  British Heart
Foundation Centre for Cardiovascular Science, University of Edinburgh,
Edinburgh, UK  Tariq Farrah  British Heart Foundation Centre for
Cardiovascular Science, University of Edinburgh, Edinburgh, UK  Niall Strang
Department of Vision Sciences, Glasgow Caledonian University, Glasgow, UK
Neeraj Dhaun  British Heart Foundation Centre for Cardiovascular Science,
University of Edinburgh, Edinburgh, UK  Tom MacGillivray  Clinical Research
Facility and Imaging, University of Edinburgh, Edinburgh, UK  Centre for
Clinical Brain Sciences, University of Edinburgh, Edinburgh, UK  Stuart King
School of Mathematics, University of Edinburgh, Edinburgh, UK  Ian J.C.
MacCormick  Institute for Adaptive and Neural Computation, School of
Informatics, University of Edinburgh, Edinburgh, UK  Centre for Clinical Brain
Sciences, University of Edinburgh, Edinburgh, UK

###### Abstract

Purpose To describe OCTolyzer: an open-source toolkit for retinochoroidal
analysis in optical coherence tomography (OCT) and scanning laser
ophthalmoscopy (SLO) images.

Methods OCTolyzer has two analysis suites, for SLO and OCT images. The former
enables anatomical segmentation and feature measurement of the en face retinal
vessels. The latter leverages image metadata for retinal layer segmentations
and deep learning-based choroid layer segmentation to compute retinochoroidal
measurements such as thickness and volume. We introduce OCTolyzer and assess
the reproducibility of its OCT analysis suite for choroid analysis.

Results At the population-level, choroid region metrics were highly
reproducible (Mean absolute error/Pearson/Spearman correlation for macular
volume choroid thickness (CT):6.7$\mu$m/0.9933/0.9969, macular B-scan
CT:11.6$\mu$m/0.9858/0.9889, peripapillary CT:5.0$\mu$m/0.9942/0.9940).
Macular choroid vascular index (CVI) had good reproducibility (volume
CVI:0.0271/0.9669/0.9655, B-scan CVI:0.0130/0.9090/0.9145). At the eye-level,
measurement error in regional and vessel metrics were below 5% and 20% of the
population’s variability, respectively. Major outliers were from poor quality
B-scans with thick choroids and invisible choroid-sclera boundary.

Conclusions OCTolyzer is the first open-source pipeline to convert OCT/SLO
data into reproducible and clinically meaningful retinochoroidal measurements.
OCT processing on a standard laptop CPU takes under 2 seconds for macular or
peripapillary B-scans and 85 seconds for volume scans. OCTolyzer can help
improve standardisation in the field of OCT/SLO image analysis and is freely
available here: https://github.com/jaburke166/OCTolyzer.

Translation relevance Few open-source pipelines provide accurate and
reproducible measurements of the retina and choroid from OCT images which are
vital to research and clinical practice. OCTolyzer addresses this gap.

##  1 Introduction

The retina is a light-sensitive tissue at the back of the eye and is essential
for vision, comprising several neural and vascular layers. The inner retinal
layers are maintained by the retinal microvascular system sourced by the
central retinal artery and vein which branch out from the optic nerve head,
while the outer retina (photoreceptors) are sustained by the choroid. This is
a dense vascular layer sitting behind the photoreceptors and retinal pigment
epithelium, supplied by the short, posterior ciliary arteries 1.

Optical coherence tomography (OCT) uses low coherence interferometry to
collect depth and intensity information from the hyper-reflectivity of retinal
tissue. Typically, a confocal, infrared reflectance scanning laser
ophthalmoscopy (SLO) image is also acquired and used as a localiser to
facilitate clinical interpretation (supplementary Fig. S1). This image shows
the en face, superficial retinal vessels along the inner surface of the retina
and is very similar to colour fundus photography but with a field of view of
30 degrees (approximately 9 mm2).

OCT is most often used to acquire cross-sectional images of the retina and
choroid. The choroid has traditionally received less attention than the
retina, since older OCT technology was not very effective at imaging
structures posterior to the retinal pigment epithelium. However, recent
advances have improved images of the choroid, enabling cross-sectional
characterisation of both the retina and choroid in OCT 2.

The localiser SLO image of the OCT image-set has also not received much
attention, because its role has been mainly to orientate the observer to
locations within the cross-sectional image stack. However, the en face SLO has
several valuable characteristics: its confocal imaging method produces greater
contrast of the vessels, optic disc and fovea over regular colour fundus
images 3, and the interferometry of the OCT system enables an exact conversion
factor from pixel space into physical space, a crucial step in generating
clinically meaningful datasets of the retina 4. In colour fundus systems,
comprising a microscope attached to a camera with a flash, heuristic
approaches are commonly used to obtain physical measurements, such as optic
disc area normalisation 5.

The OCT/SLO system together capture the retina and choroid and permit a unique
assessment of the microvasculature which play a critical role in maintaining
eye health. Moreover, there is increasing evidence to suggest that the retinal
and choroidal circulations correspond with microvascular changes in structure
and function of vital organs like the brain, kidney and heart 6; 7; 8; 9.
These observations contribute to the nascent field of “oculomics”, the
relationship which the ocular system has in the context of systemic health 10.
Moreover, accessibility of OCT systems are improving in terms of cost, size
and availability outside of the clinic 11; 12; 13; 14, so providing a means of
automatic processing for the vast volumes of data collected on a global scale
would likely provide a significant benefit to research and clinical
communities.

Anatomical annotation of the retina and choroid on OCT/SLO is prohibitively
expensive in terms of time, labour and is prone to human error. Therefore,
there has been a wealth of research into automatic segmentation methods. The
majority have focused on retinal OCT layer segmentation, with more than 60
papers examined in a recent comprehensive review 15. There has been far less
focus on choroid segmentation 16; 17; 18. Similarly, there have been very few
methods for retinal vessel segmentation in SLO 19; 20; 21; 22; 23.

Many of these previous methods have not been made available to the research
community, or require permission or payment to be used. Moreover, it is rare
for computational methods to be released with accompanying code for batch
processing and feature measurement 24; 25; 26; 27. There has been increasing
demand for easy-to-use, open source toolkits to help promote standardisation
of ocular parameters in research 28; 29; 30; 17; 18; 31 and equip general
researchers who may not have any specialist training in image analysis.
However, there is a distinct lack of similar pipelines for OCT and SLO imaging
modalities.

Accordingly, we have developed a fully automatic analysis toolkit, OCTolyzer,
for segmentation and feature measurement of cross-sectional retinal and
choroidal OCT images and the accompanying en face SLO image. The benefits of
OCTolyzer are:

  * •

It is the first of its kind, providing a fully automated end-to-end procedure
from raw OCT/SLO data to feature measurement of the retina and choroid.

  * •

It is modular, such that each OCT/SLO analysis suite can be used
independently. In particular, the SLO analysis suite, SLOctolyzer 31, offers a
more general-purpose approach to SLO image analysis.

  * •

It uses the latest deep learning algorithms for en face retinal vessel
segmentation in SLO images, choroidal layer segmentation in OCT, and leverages
image metadata to obtain retinal layer segmentations in OCT (if available).

  * •

It supports analysis of three core OCT data types: single/radial macular OCT
B-scans, macular OCT volume scans, and optic disc-centred OCT peripapillary
B-scans. Thus, OCTolyzer’s SLO analysis suite supports analysis of macula- and
disc-centred SLO images.

  * •

It can be used for batch processing which is easy to deploy and collates
clinical measurements into a single file ready for downstream statistical
analysis.

##  2 Methods

Fig. 1 describes the core elements of OCTolyzer’s analysis pipeline. OCTolyzer
contains two analysis suites, for the OCT and the corresponding localiser SLO
images. OCTolyzer is freely available on GitHub and can be used without author
permissions, specialist training or a technical background. OCTolyzer is
freely available here: https://github.com/jaburke166/OCTolyzer.

Figure 1: OCTolyzer’s pipeline. (A) OCTolyzer expects a file containing the
OCT (and optional SLO) image data, and necessary OCT file metadata. (B – E) A
deeper dive into OCTolyzer’s internal structure. (B – D) OCT analysis suite:
analysis pipelines for when OCTolyzer detects a single/radial macular B-scan
(B), macular volume scan (C) or peripapillary B-scan (D). (E) SLO analysis
suite for macula- or disc-centred SLO localiser images, which accompany OCT
capture, using SLOctolyzer 31.

###  2.1 Data

####  2.1.1 Segmentation model populations

The data used to construct the previously published deep learning segmentation
models for the OCT and SLO analysis suites have been described 18; 17; 31. The
majority of this data were from cohorts related to systemic health and
normative data. Supplementary Table S1 and Table S2, with supporting text,
describe the image and population characteristics for the two deep learning
models OCTolyzer uses for OCT choroid segmentation. More details can be found
in the original papers which describe the OCT choroid segmentation models 18;
17. Supplementary Table S3 describe the image characteristics of the five
cohorts used to build the segmentation models for OCTolyzer’s SLO analysis
suite. Additionally, supplementary Table S4 describe which of the cohorts and
how many eyes/images were used in each of the three SLO segmentation models
for training and evaluation. More details can be found in the original paper
describing OCTolyzer’s stand-alone SLO analysis suite, SLOctolyzer 31. All
studies and cohorts adhered to the Declaration of Helsinki, received relevant
ethical approval, and informed consent from all subjects was obtained in all
cases from the host institution.

####  2.1.2 Reproducibility populations

Three cohorts were used in this analysis, i-Test 32, Glasgow Caledonian
University Topcon (GCU Topcon) 33 and Diurnal Variation for Chronic Kidney
Disease (DVCKD) 32. We used all available eyes which had repeated data
available (at the point of analysis) from each study (120 eyes from 60
participants from the i-Test study, 33 eyes from 21 participants in the GCU
Topcon study and 22 eyes from 22 participants in the DVCKD study). Table 1
describes the core image and population characteristics for these three
samples.

Study i-Test 32 GCU Topcon 33 DVCKD 32; 34 Cohort demographics Participants
(Eyes) 60 (120) 21 (33) 22 (22) Right eyes (%) 60 (50) 15 (45.5) 22 (100) Age
(SD) 34.7 (5.2) 23.9 (4.2) 21.3 (2.2) Sex, F (%) 60 (100) 9 (43) 10 (45.5)
Ethnicity 52 White, 6 Asian, 2 Mixed 12 White, 5 Asian, 2 Black, 2 Middle
Eastern Unknown Refractive status† 3 hyperopes, 31 emmetropes, 26 myopes 9
hyperopes, 8 emmetropes, 3 hyperopes, 1 missing Axial length 24.1 $\pm$ 1.3 mm
— mild myopes. Gestation 35.6 $\pm$ 3.4 NA NA Study purpose Pre-eclamptic /
normative pregnancy at late gestation Diurnal variation Diurnal variation
Control/Case 45/15 21/0 22/0 Image characteristics Device Spectralis
(Heidelberg) DRI Triton Plus (Topcon) Spectralis (Heidelberg) OCT Type
Spectral-domain Swept-source Spectral-domain Scan Pattern Macular volume
Macular radial Peripapillary Mode HRA+OCT CFP+OCT HRA+OCT Time of day
(Interval) All in afternoon (1 minute) 13 morning, 12 afternoon, 8 evening (5
minutes) Each at 9am, 12:30pm, 4pm ($\pm$ 40 minutes) B-scans per eye 31 (EDI)
/ 61 (non-EDI) 12 1 ART 50 (EDI) / 12 (non-EDI) NA 100 SNR 35.61 >88 >25 Pixel
resolution 496 $\times$ 768 992 $\times$ 1024 768 $\times$ 1536

Table 1: Population demographics and image characteristics of the three
samples used for assessing OCTolyzer’s reproducibility for choroid analysis.
SD, standard deviation; GCU, Glasgow Caledonian university; DVCKD, diurnal
variation for chronic kidney disease; HRA, Heidelberg retina angiography; OCT,
optical coherence tomography; SLO, confocal infrared reflectance scanning
laser ophthalmoscopy; EDI, enhanced depth imaging; ART, automatic real time;
SNR, signal-to-noise ratio; CFP, colour fundus photography. †:
myopic/hyperopic status defined as $<-1/>1$ dioptres. Dioptre measurements for
the i-Test sample was the scan focus values collected each OCT scans’
metadata, for the GCU Topcon sample this was each eye’s spherical equivalent
and for the DVCKD sample this data was unavailable, but their axial length was
measured.

Acquisition for i-Test 32 used the spectral domain OCT (SD-OCT) Heidelberg
Spectralis Standard and FLEX modules, the latter presenting as a mobile
version of the former (Heidelberg Engineering, Heidelberg, Germany). During
acquisition, two unregistered macula-centred volume scans for each eye was
collected, each scan covering a 30 $\times$ 20 degree (approximately 9
$\times$ 6.6 mm, horizontal $\times$ vertical) field of view. Repeated OCT
volume scans were taken immediately (within 1 minute) after one another, with
enhanced depth imaging (EDI) mode toggled on and off. For each EDI OCT volume,
31 parallel line-scans were collected, linearly spaced approximately 240
microns apart with an automatic real time (ART) B-scan averaging of 50. For
each non-EDI OCT volume, 61 parallel line-scans were collected, linearly
spaced approximately 120 microns apart with an ART of 12. OCT B-scans were of
pixel resolution 496 $\times$ 768 (pixel height $\times$ width). Collectively,
OCT B-scans comprising the volume scans had an average quality score of 35.58,
according to the signal-to-noise ratio index built-in to the Heidelberg
scanning device (Heidelberg Engineering, Heidelberg, Germany).

The GCU Topcon study 33 used the swept source OCT (SS-OCT) Topcon DRI Triton
Plus device (Topcon, Tokyo, Japan) and collected data for the purposes of
assessing diurnal variation of the choroid, primarily targeting hyperopes
during recruitment. During CFP+OCT acquisition, a twelve-line, fovea-centred
OCT radial scan was captured, starting from a horizontal-line B-scan and
rotating clockwise in 30 degree intervals. Repeated scans were taken at the
same location during each visit within 5 minutes of each other. OCT B-scans
were of resolution 992 $\times$ 1024 and covered approximately 9 mm laterally.
Any set of 12 B-scans with an average image quality score less than 88 —
reported by the signal-to-noise ratio index built-in to the Topcon scanning
device (Topcon, Tokyo, Japan) — was excluded. Given repeated acquisition was
not the primary aim of the GCU Topcon study, only 12 participants had repeated
OCT data in both eyes and nine participants in one eye.

Participants in the DVCKD study were recruited to assess the impact of time of
day on retinochoroidal metrics in healthy volunteers to support research
related to chronic kidney disease 34. During acquisition, the SD-OCT
Heidelberg Spectralis Standard Module was used to collect horizontal-line OCT
B-scans, OCT volume scans and OCT peripapillary scans of the right eye only.
While this dataset might be impacted by choroid diurnal variation, it was the
only available dataset containing repeated peripapillary B-scans taken on the
same day. Thus, only the OCT peripapillary scans were selected to assess
OCTolyzer’s reproducibility. Peripapillary B-scans collected for the DVCKD
study were circular cross-sections of the retina and choroid and centred on
the optic disc. B-scans were collected with EDI mode activated using an ART of
100 and had a pixel resolution of 768 $\times$ 1536\. The study collected
scans at three time points during daylight, in the morning (09:12 $\pm$ 12
minutes), early afternoon (12:36 $\pm$ 7 minutes) and early evening (16:08
$\pm$ 8 minutes).

###  2.2 OCTolyzer’s segmentation module

OCTolyzer’s OCT and SLO analysis suites each have separate segmentation
modules for anatomical segmentation of the choroidal layer and vessels in OCT
images and en face retinal vessels, fovea and optic disc in SLO images. The
segmentation models have been described previously 17; 18; 31.

####  2.2.1 OCT Segmentation

OCTolyzer does not have a standalone algorithm for retinal layer segmentation,
but supports extraction of the segmented layers from image metadata, as it’s
common for OCT manufacturers to have their own built-in segmentation tool for
the retinal layers. Whether all retinal layers have been quality checked is at
the discretion of the end-user. This is typically performed on the
manufacturers proprietary software, such as the Heidelberg Eye Explorer
(HEYEX) viewer (Heidelberg Engineering, Heidelberg, Germany) 35.

Choroid segmentation for macular OCT B-scans is with Choroidalyzer 17.
Choroidalyzer is a deep learning-based tool which automatically segments the
choroidal region and vasculature, and also detects the fovea on fovea-centred
OCT B-scans.

Choroid segmentation for disc-centred, peripapillary B-scans is with DeepGPET
18. DeepGPET is a deep learning-based tool which automatically segments the
choroidal region and is robust to segmenting peripapillary choroids, of which
it was not trained on (supplementary Fig. S2).

####  2.2.2 SLO Segmentation

There are three segmentation models for the SLO analysis suite, one for all-
vessel segmentation, one for fovea detection and another for segmentation of
the SLO into arteries, veins and the optic disc (artery-vein-optic disc
detection) 31.

Figure 2: A diagram of how measurements are made for a single macular OCT
B-scan. (A) localiser SLO with line of OCT acquisition shown in green. (B)
Exemplar horizontal-line OCT B-scan overlaid onto the localiser SLO. (C) OCT
B-scan with retinal and choroid layer segmentations and layer names overlaid —
retinal layer definitions are presented in supplementary Table S5. (D)
Thickness lines drawn between upper and lower boundaries for the whole retina
(top) and choroid (bottom) to demonstrate measuring per A-scan and locally
perpendicular to upper boundary. The black solid line represents the subfoveal
thickness measurement.

###  2.3 OCTolyzer’s measurement module

OCTolyzer’s OCT analysis suite supports retinochoroidal spatial measurements
on OCT scans, while the SLO analysis suite supports measurement of vessel
complexity, density, calibre and tortuosity of the en face retinal vessels in
SLO images 31.

####  2.3.1 Macular B-scan

For macular OCT B-scans, Choroidalyzer automatically detects the fovea pixel
coordinate if the scan is fovea-centred. For a user-specified, fovea-centred
region of interest (RoI), we measure thickness (subfoveal and averaged over
the RoI), area for all available layers, and choroidal vessel area and
vascular index. Retinal layer segmentations are assumed to be available in the
image metadata. Otherwise, retinal measurements are not made.

We define the choroid as the space posterior to hyper-reflective Bruch’s
complex and anterior to the sclera. To account for choroidal curvature,
thickness measurements are made by measuring a straight line micron distance
between the upper and lower boundaries, locally perpendicular to the upper
boundary. Retinal layer thicknesses by default are measured per A-scan, i.e.
through measuring a vertical, straight line micron distance between upper and
lower boundaries. Area measurements are the number of pixels within the RoI
constituting the layer (or choroid vessel), converted into mm2. Choroid
vascular index is the ratio of vessel area to total choroid area in the RoI.
Fig. 2 shows an exemplar OCT B-scan with the retina and choroid fully
segmented (C), with thickness lines overlaid for the retina and choroid
separately (D).

Figure 3: A diagram of how measurements are made for a macular OCT volume. (A)
Exemplar 3D visualisation of an OCT volume scan. (B) Sequential B-scans with
retinal and choroid layer segmentations overlaid. (C) Thickness maps of the
inner, outer and whole retina (top) and choroid thickness, choroid vessel
density and choroid vascular index maps (bottom), with average measurements
along the ETDRS grid overlaid. All inner retinal layer thickness maps can also
be computed and measured.

####  2.3.2 Macular volume scan

An OCT volume is made up of several, parallel OCT B-scans in sequence.
Choroidalyzer is used to segment the choroidal layer and vessels for all
B-scans. The foveal pit is assumed to be present in one or more of the OCT
B-scans, and the central B-scan in the stack may not necessarily be at the
centre of the macula. Thus, the B-scan and corresponding pixel coordinate
which has the highest probability outputted from Choroidalyzer’s fovea
detection is selected as the central B-scan and fovea coordinate, respectively
— i.e., at the centre of the macular volume scan. The fovea on the localiser
SLO is detected by cross-referencing the fovea detected from the OCT data.
Retinal layer segmentations are assumed to be available in the image metadata.
Otherwise, retinal measurements are not made.

For each layer of interest, thicknesses are taken at every available A-scan
(perpendicularly-aligned for choroidal measurements), measuring the distance
between the layers’ upper and lower boundaries. This is done for all B-scans
of the OCT volume, and they are aligned using the lateral location of the
fovea — extrapolated from the central B-scan with the detected fovea. This
creates a coarse map of thickness values across the OCT volume, which are then
interpolated, smoothed, padded and rotated to align with the region of
interest on the localiser SLO. We apply bi-linear interpolation and Gaussian
blur to the coarse map to align the maps’ pixel resolution to that of the
localiser SLO and smooth any interpolation artefacts. The padding centres the
thickness map on the fovea, and the rotation ensures perfect registration with
the region of acquisition on the localiser SLO. The angle of rotation is
detected by measuring the angle of elevation of the B-scan location on the
localiser SLO. Supplementary Fig. S3 shows the pipeline for computing a
choroid thickness map.

We centre three concentric circles with 1mm, 3mm and 6mm diameters using the
fovea on the localiser SLO and split the 3mm and 6mm circles into four,
equally sized quadrants. The quadrants are aligned with the angle of elevation
of the OCT volume’s region of interest. Average thickness (in microns) and
interpolated volumes (in mm3) are measured for these 9 sub-regions,
constituting all areas of interest along the early treatment diabetic
retinopathy study (ETDRS) grid 36. A final measurement is taken as the average
over the entire 6mm, circular RoI. Additional choroid vessel density (in
micron2) and vascular index (dimensionless) maps are also measured along the
ETDRS grid. Any missing values are approximated using nearest neighbour
interpolation, and the percentage of missing values per sub-region are logged
and outputted to the end-user.

Fig. 3 shows the core steps in processing an OCT volume, from raw data to
measurement.

Figure 4: A diagram of how measurements are computed for an OCT peripapillary
B-scan. (A) An exemplar OCT peripapillary, circular OCT B-scan overlaid onto
the localiser SLO. (B) The circular OCT B-scan with retinal and choroid layer
segmentations overlaid. (C) Detection of the centre of the temporal
peripapillary grid. (D) Division of the circular OCT B-scan into the 6
peripapillary grids, with output values from measuring the peripapillary
retina overlaid. (E) Thickness profile of the peripapillary retina, with
peripapillary grid thresholds overlaid.

####  2.3.3 Peripapillary B-scan

For every layer of interest — peripapillary choroid and any available retinal
layers from image metadata — we generate a thickness array, measuring a micron
distance every A-scan (column pixel). We do not measure locally
perpendicularly for the choroid because the sinuous nature of the B-scan is a
result of the circular-shaped acquisition line, and not curvature due to poor
acquisition or differences in anatomy like with macular B-scans which have a
linearly shaped scan pattern. The array is padded with zeros if the
segmentation doesn’t reach the lateral ends of the image, alerting the end-
user of any incomplete segmentations. This is because the thickness array must
extend across the entire lateral axis due to the continuity of the two ends of
the B-scan.

To create the peripapillary grids, we define the centre (0 degrees) of the
temporal peripapillary grid (the lateral position along the B-scan) by
deducing the point along the circular acquisition region (on the localiser
SLO) which is co-linear with the optic disc centre and fovea centre. If the
localiser SLO is unavailable, then the centre is taken as the lateral centre
of the B-scan. Thus, without the SLO, the peripapillary grid will likely be
off-centre. The thickness array can then be divided into temporal (-45 – 45
degrees), supero-temporal (45 – 90 degrees), supero-nasal (90 – 135 degrees),
nasal (135 – -135 degrees), infero-nasal (-135 – -90 degrees) and infero-
temporal (-90 – -45 degrees) grids. Average thickness (in microns) is measured
per grid, as well as the nasal-to-temporal (N/T) ratio and papillomacular
bundle (-30 – 30 degrees). A final average over the whole B-scan is also
measured. Thickness profiles for each layer are also generated, showing the
raw thickness evolution and a moving average estimate, with the peripapillary
grid and angular thresholds overlaid. Fig. 4 shows a series of images
describing this procedure.

We have also built in an overlap index to assess how off-centre a
peripapillary scan may be from the centre of the optic disc. The overlap index
computes the distance between the acquisition’s centre and the optic disc
centre inferred from the SLO analysis suite, and is measured as a percentage
of the optic disc diameter. We have empirically determined a threshold of 15%
to likely exceed acceptable centring of the OCT peripapillary scan on the
optic disc. See supplementary Fig. S4 for two examples, one of which exceeds
the 15% threshold.

####  2.3.4 localiser SLO

The measurements obtained from the en face retinal vessels segmented from the
localiser SLO image have been described 31. In brief, we have adapted the code
provided by Automorph 29 to measure vessel complexity, density, tortuosity and
calibre of the arteries, veins and all-vessels from the localiser SLO. We
measure fractal dimension (using the Minkowski-Bouligand dimension 37), vessel
density (ratio of vessel pixels to pixel resolution), global vessel calibre
(ratio of vessel pixels to skeletonised vessel pixels) and local vessel
calibre (vessel calibre computed and averaged across individual vessel
segments). We also measure central retinal artery and vein equivalents (CRAE,
CRVE), computed using the Knudston approach 38, as well as tortuosity density
39. For both macula- and optic disc-centred SLO images, all measurements are
computed across the whole image. For optic disc-centred SLO images, CRAE/CRVE,
local vessel calibre and tortuosity measurements are computed for circular
regions of interest centred on the optic disc, zones B and C which have
standard definitions 40.

###  2.4 OCTolyzer’s pipeline

####  2.4.1 Input

OCTolyzer fully supports `.vol` file formats (from Heidelberg Engineering
imaging devices) and was designed around such file formats for extracting
macular B-scan, volume and peripapillary B-scan data using the EyePy python
package 41. There is currently no support for `.e2e` files as current python-
based file readers 41; 42 are unable to locate the necessary pixel length
scales for converting from pixel space into physical space. Additionally, we
have not considered support for other proprietary file formats such as `.fda`,
`.fds`, `.img` and `.oct`, due to the propensity for storing ophthalmic image
and metadata in DICOM (`.dcm`) format for purposes of vendor neutrality.
`.dcm` file formats currently have limited support but we are working on this
presently. See supplementary Fig. S5 for information on OCTolyzer’s expected
input, setup and interface.

####  2.4.2 OCT analysis suite

OCT B-scans are automatically brightened to promote accurate segmentation of
the choroidal layer. Gamma-level contrast enhancement is used to brighten OCT
B-scans such that their mean pixel intensity is approximately 0.2 and
normalised in [0, 1]. This is particularly important for OCT B-scans which
show large choroids or where EDI mode was not activated during acquisition.

Choroidal vessels can be corrupted by superficial retinal vessel shadowing,
where the OCT beam penetrates through superficial retinal vessels sitting
perpendicular to the incident laser light, which consequently darkens the
corresponding A-scans of the deeper outer retinal and choroidal structures
behind it 43. We apply a multiplicative compensation factor for each A-scan,
automatically brightening the shadow-corrupted pixel columns 44. Column-wise
compensation factors are computed as the element-wise ratio between each
A-scans’ averaged signal (axially), and the lateral moving average over these
averaged A-scans — the latter signal smooths out any sudden dips in brightness
from the shadow-corrupted A-scans.

B-scans are segmented to extract the choroidal layer and vessels using
Choroidalyzer or DeepGPET 17; 18. For peripapillary B-scans, the image is
first padded laterally with 240 pixels by reflecting each opposite edge — as
the B-scan is circular and thus continuous at either end — to ensure the
entire width of the choroid is segmented. Empirically determined thresholds of
0.5 and 0.25 are used for obtaining binary choroid region segmentation masks
using Choroidalyzer and DeepGPET, respectively. It is important for
peripapillary choroids to be segmented end-to-end laterally, and given that
DeepGPET’s training pipeline did not include peripapillary OCT B-scans, a
lower threshold was selected to further mitigate under-segmented peripapillary
choroids.

Choroidalyzer outputs the raw probability map for choroid vessel segmentation.
This is to account for poorly defined vessel walls which are often visualised
in OCT B-scans whose cross-section through the choroid cuts across the dense
vascular space, resulting in a highly heterogeneous visualisation of choroidal
vessels in terms of size and shape.

For fovea detection in macular B-scans, the horizontal and vertical location
of the fovea coordinate on the B-scan is detected by passing 21-wide and
51-long triangular filters over the raw probability map outputted from
Choroidalyzer 17.

Any available retinal layer segmentations from image metadata are combined
with the choroid layer and vessel segmentations and fed into OCTolyzer’s
measurement module. The relevant measurements of thickness, area, volume,
vascular index and vessel density are computed and saved out. Additionally,
key visualisations for assessing segmentation quality are saved out during
processing. This includes representative B-scans with segmentations overlaid
for single macular and peripapillary B-scans, and macular thickness/density
maps with ETDRS grid values overlaid onto the localiser SLO for OCT volume
data (if the SLO is available). For peripapillary OCT, thickness profiles and
peripapillary grids are saved out. To prevent problems of memory consumption
during large-scale batch processing, saving these out are optional.

####  2.4.3 SLO analysis suite

This suite has been described previously 31. The segmentation module resizes
the SLO images to a common resolution of 768 $\times$ 768, and the outputted
segmentation maps are resized back to input resolution. If macula-centred, the
fovea coordinate from the OCT is used to cross-reference the corresponding
fovea on the localiser SLO. Segmentation masks are binarized using a threshold
of 0.5, and the vessel maps are post-processed using a series of morphological
operations to promote connectivity and remove small false positive regions.
The optic disc is modelled as an ellipse for optic disc-centred SLO images,
and the diameter of the optic disc is measured as the average of the minor and
major axis lengths. The measurement module measures vessel complexity,
tortuosity and calibre of all-vessels, arteries and veins for the whole image,
and additionally for zones B and C in disc-centred images. Optionally,
segmentation maps are saved out, as well as a composite image showing the
detected fovea, optic disc, veins and arteries overlaid onto the localiser SLO
for assessing segmentation quality. OCTolyzer also supports manual correction
of erroneous en face retinal vessel segmentations using ITK-Snap 45. Upon
manual annotation, OCTolyzer can be rerun again and the manually annotated
segmentations will be used to recompute the en face retinal vessel
measurements.

####  2.4.4 Output

OCT layer segmentations, SLO segmentation masks, thickness maps, a process log
and summary measurements for the processed OCT/SLO file are saved out.
Alongside summary measurements, key metadata extracted from the input file are
saved out, such as the exact field of view captured, the angle of elevation of
the OCT volume scan during acquisition, the average quality of the OCT data,
resolution and pixel lengthscale information. Additionally, we save out useful
metadata during processing, including coordinates of the fovea on the B-scan
and/or localiser SLO, the centre of the optic disc and it’s estimated radius.
Supplementary Table S6 presents a full list of the metadata outputted by
OCTolyzer after processing a `.vol` RAW file from a Heidelberg Engineering
device. See supplementary Fig. S6 for information on OCTolyzer’s outputs.

###  2.5 Statistical analysis

Method | Metric [unit] | Mean (SD) | MAE | Pearson | Spearman | ICC(3,1)
---|---|---|---|---|---|---
Choroidalyzer |  |  |  |  |  |
i-Test |  CT [$\mu$m] | 274.09 (91.80) | 6.7342 | 0.9933 | 0.9969 | 0.9962
| CVI | 0.51 (0.03) | 0.0271 | 0.9669 | 0.9655 | 0.9813
GCU Topcon |  SFCT [$\mu$m] | 392.63 (110.94) | 11.5535 | 0.9858 | 0.9889 | 0.9929
|  CA [mm2] | 1.62 (0.46) | 0.0509 | 0.9835 | 0.9870 | 0.9916
| CVI | 0.53 (0.03) | 0.0130 | 0.9090 | 0.9145 | 0.9522
DeepGPET |  |  |  |  |  |
DVCKD |  CT [$\mu$m] | 169.60 (54.07) | 5.0320 | 0.9942 | 0.9940 | 0.9971
Table 2: Reproducibility performance for OCTolyzer’s OCT analysis suite using
Choroidalyzer and DeepGPET. All Pearson and Spearman correlations were
statistically significant with P-values $P<0.0001$. SD, standard deviation;
GCU, Glasgow Caledonian university; DVCKD, diurnal variation for chronic
kidney disease; MAE, mean absolute error; ICC, intra-class correlation; SFCT,
subfoveal choroid thickness; CT, choroid thickness; CVI, choroid vascular
index; CA, choroid area.

We investigate the reproducibility of OCTolyzer’s segmentation models for
choroid OCT data on downstream clinical measurements. The reproducibility of
the SLO segmentation models has been assessed previously 31. We use
Choroidalyzer to segment the macular OCT data in the i-Test and GCU Topcon
samples, and DeepGPET to segment the peripapillary OCT data in the DVCKD
sample.

For the i-Test sample, we measured average choroid thickness and choroidal
vascular index in the 9 ETDRS grid values per eye for each repeated pair.
Thus, there were 1080 comparisons made for this sample. For the DVCKD sample,
we measured average choroid thickness in the 6 peripapillary grids, and the
papillomacular bundle for each eye. Note, there are three images per eye so we
compare pairwise, chronological measurements (morning – afternoon, afternoon –
evening) so that there were 308 comparisons made. As we are comparing
measurements across the day, diurnal variation of the choroid is a potential
confounding factor for this sample. Thus, we address the longitudinal
evolution of the peripapillary choroid too.

For each participant in the GCU Topcon sample, OCT B-scan capture was
collected throughout the day, with some examinations containing repeated
acquisitions. There were 79 instances of repeated OCT B-scan data overall, and
approximately 25% of these including more than two acquisitions per
examination. Additionally, each acquisition included 12 OCT B-scans per eye.
To prevent any sampling bias and remain objective in our reproducibility
analysis, we selected one repeated pair per eye to maximise equal sample size
for morning, afternoon and evening acquisition where possible. This led to
selecting 13 repeated pairs from the morning, 12 from the afternoon and 8 from
the evening. Thus, there were 396 comparisons made from 33 eyes, using
subfoveal choroidal thickness, choroidal area and choroid vascular index in a
6mm, fovea-centred region of interest.

We measure the reproducibility of Choroidalyzer and DeepGPET at the
population-level, reporting population mean and standard deviation, as well as
mean absolute error (MAE) and Pearson, Spearman and intra-class correlation
(ICC(3,1)) coefficients. Additionally, we show correlation plots and use
Bland-Altman 46 plots to assess the relationship between repeated measurements
and the distribution of residuals.

We also report the reproducibility of Choroidalyzer and DeepGPET at the eye-
level, using a novel estimate of measurement noise $\lambda$ 47. For each
feature, $\lambda$ measures the within-eye variability in units of between-eye
variability and is calculated as the ratio between the standard deviation of
within-eye measurements and the standard deviation of between-eye
measurements.

Within-eye and between-eye standard deviations are measured by averaging the
measurements for each repetition in an eye’s pair, and taking the standard
deviation for each pair and across pairs, respectively. Thus, since we report
9 values per ETDRS grid for the OCT volume comparison, we take an average of
these 9 values for each member of the repeated pair, thus creating a single,
representative pair of measurements per eye. We do a similar averaging for the
measurements in both the GCU Topcon and DVCKD samples.

Finally, we measured the execution time of OCTolyzer’s OCT analysis suite and
entire pipeline for each OCT data type which it supports. We deployed
OCTolyzer with and without the SLO analysis suite to analyse each exemplar OCT
data type 100 times and reported mean and standard deviation execution time in
seconds. Repeated experiments were run on a standard, Windows laptop with a 4
year old i5 CPU with 16GB of RAM, but no GPU.

##  3 Results

Figure 5: Correlation and Bland-Altman plots for assessing the reproducibility
of OCTolyzer’s analysis suite for macular OCT data using Choroidalyzer 17. (A)
Reproducibility for SD-OCT macular volume scans with EDI mode toggled on and
off from the i-Test sample. (B) Reproducibility of SS-OCT macular B-scan pairs
from the GCU Topcon sample. Figure 6: (A) Correlation and Bland-Altman plot
for all chronologically paired (morning – afternoon and afternoon – evening)
choroid thickness measurements in all peripapillary grids. (B) Longitudinal
evolution of average choroidal thickness in each peripapillary grid shown as
box-plots, with mean values overlaid as crosses. Figure 7: Reproducibility of
OCTolyzer’s OCT analysis for macular OCT data using Choroidalyzer 17 at the
eye-level. We show distributions of eye-level measurement noise $\lambda$ for
both the i-Test macular SD-OCT volume data and GCU Topcon macular SS-OCT
B-scan data. Representative B-scans, with segmentations overlaid in red, are
selected and shown for the major outliers with arrows indicating the source of
the error. The between-eye standard deviations are shown below each box-plot.

###  3.1 Reproducibility

Figure 8: Reproducibility of OCTolyzer’s OCT analysis suite for OCT
peripapillary data using DeepGPET 18 at the eye-level. We show the
distribution of the eye-level measurement noise $\lambda$ for peripapillary CT
in blue, and the red crosses are the individual values for $\lambda$. The
peripapillary OCT B-scans of the two major outliers are shown to the right for
all three time points, with choroid layer segmentations overlaid in dashed
red. The red arrows show the only obvious, but minimal, difference in
segmentation.

B-scan type | OCT resolution | SLO resolution | Choroid segmentation | OCT analysis suite | OCT+SLO analysis suite
---|---|---|---|---|---
Macular OCT B-scan | $1\times 496\times 768$ | $768\times 768$ | 0.31 (0.02) | 1.55 (0.13) | 22.40 (0.97)
Macular OCT volume | $61\times 496\times 768$ | $768\times 768$ | 16.8 (1.60) | 85.00 (3.65) | 109.00 (3.11)
Peripapillary OCT B-scan | $1\times 768\times 1536$ | $1536\times 1536$ | 1.56 (0.23) | 2.29 (0.14) | 128.00 (6.37)

Table 3: Average (standard deviation) execution time in seconds of the OCT
analysis suite (always performed by default) and the combined execution time
for both OCT and SLO analysis suites.

####  3.1.1 Population-level

Table 2 presents the reproducibility performance of OCTolyzer’s OCT analysis
suite for all three OCT data types which it supports. OCTolyzer’s analysis
suite for choroid region segmentations had excellent correlations across all
three cohorts using Choroidalyzer and DeepGPET (Pearson/Spearman for ETDRS
choroid thickness (CT): 0.9933/0.9969, B-scan subfoveal CT (SFCT):
0.9858/0.9889, B-scan choroid area (CA): 0.9835/0.9870, peripapillary CT:
0.9942/0.9940). Reproducibility for choroid vascular index (CVI) was slightly
lower but still good (ETDRS CVI: 0.9669/0.9655, B-scan CVI: 0.9090/0.9145).

Measurements taken in the GCU Topcon suggested these individuals had much
thicker subfoveal choroids (mean $\pm$ SD of 386.9 $\pm$ 110.9 $\mu$m),
compared to the i-Test measurements (mean $\pm$ SD of 275.7 $\pm$ 91.8
$\mu$m). While the i-Test sample was older than the GCU Topcon sample, the GCU
Topcon study did target hyeropes during recruitment, thus resulting in smaller
eyes and thicker choroids. Moreover, the i-Test sample represent ETDRS grid
measurements which are taken as averages over macular sub-regions, allowing
for noise in measurement error to be averaged out unlike point-source
subfoveal choroid thickness measurements (SFCT). The peripapillary choroids
were thinnest in the DVCKD sample (mean $\pm$ SD of 169.9 $\pm$ 54.1 $\mu$m),
which makes sense given peripapillary choroids, nearer the disc, are thinner
than macular choroids.

These observations explain why we see higher mean absolute error (MAE) in the
GCU Topcon cohort (MAE: 11.6 $\mu$m) compared with the peripapillary (MAE: 5.0
$\mu$m) and volume data (MAE: 6.7 $\mu$m). Additionally, this also highlights
the importance of reporting values over an area through averaging, rather than
taking a single point-source measurement. Nevertheless, these errors are still
below any change expected due to diurnal variation 48; 49; 50; 51; 52, which
changes by approximately 30 $\mu$m over the course of the day. These errors
are also below the threshold expected to exceed manual rater agreement in SFCT
53, which has been reported as a mean inter-rater error of 32 $\mu$m and
intra-rater error of 23 $\mu$m.

For CVI, the MAE in the i-Test sample was double that in the GCU Topcon
sample. The MAE was worse in the i-Test sample because of the additional
speckle noise appearing in each non-EDI member of the i-Test ETDRS comparison,
which can make vessel wall boundaries ambiguous. Regardless, these reported
errors are five times below recently reported repeatability of CVI across
macular OCT volumes from different manufacturers 54. Ma, et al. 54 presented a
mean difference between SD-OCT and SS-OCT of 0.13, while here we present a MAE
of 0.0271 for ETDRS CVI (comparing SD-OCT macular volume data between EDI and
non-EDI acquisition), and 0.0130 for B-scan CVI for repeated SS-OCT B-scans.

Fig. 5 show the correlation and Bland-Altman plots for the SD-OCT i-Test and
SS-OCT GCU Topcon macular OCT samples. Generally we see that for larger
choroids there is larger error in regional metrics. In the case for i-Test,
this is entirely expected because the optical signal for non-EDI OCT
acquisition degrades the deeper through the eye it penetrates, and the
visibility of the deeper choroidal vasculature decays rapidly also. This is
also the case for larger choroids in general, and thus why we see similarly
larger error in the GCU Topcon sample — the largest choroid had a SFCT of 756
$\mu$m (approximately 3.25 standard deviations away from the mean).

The distributions in the Bland-Altman plots for SD-OCT macular OCT volume data
in Fig. 5 show under-prediction of CT and over-prediction of CVI for the non-
EDI scans of each pair, while the distributions for macular SS-OCT B-scan data
are perfectly centred. The under-prediction of CT in the non-EDI measurements
was likely because of the aforementioned optical signal decay in non-EDI
scans, which had a direct consequence on CVI, as the vascular index is
normalised by the size of the choroid, leading to over-prediction of CVI in
non-EDI measurements. However, this under-/over-prediction is unlikely to be
clinically significant.

Fig. 6(A) show the correlation and Bland-Altman plots for comparing pairwise
peripapillary grid CT measurements for morning vs. afternoon and afternoon vs.
evening (with scatter points coloured accordingly). The first striking
observation is the degree of separation measurements have between pairwise
time point comparisons. The residuals of measurements comparing afternoon and
evening are centred around 0, while residuals comparing morning and afternoon
appear to be almost consistently below the residual origin (and identity line
in the correlation plot).

Fig. 6(B) shows the longitudinal evolution of peripapillary choroid thickness
for each peripapillary grid between morning, afternoon and evening, with the
mean value per time point and grid shown as coloured crosses. Across the
board, morning measurements appear larger than afternoon and evening. This
corresponds to the trend observed in measuring the same choroids manually in
the macula 34 (shown in their supplementary materials), as well as the natural
diurnal variation of the choroid observed in other studies 48; 49; 50; 51; 52.
These previous studies have reported choroidal fluctuations over the course of
day with an amplitude of approximately 30 $\mu$m, and the majority reporting
larger CT measurements in the morning, compared to the afternoon and evening.

Thus, given that the largest residuals were those observed between morning and
afternoon, and that we know the choroid thins between this time period, we
propose that the diurnal variation of the choroid is the primary driver of the
largest residuals in measuring peripapillary choroid thickness with OCTolyzer,
and not segmentation error.

####  3.1.2 Individual-level

Fig. 7 and Fig. 8 presents the reproducibility of OCTolyzer’s OCT analysis
suite for the macular and peripapillary OCT data at the eye-level,
respectively. We present box plots to describe the distribution of measurement
noise $\lambda$, expressed in terms of the overall population variability
(shown below the box-plots as the value $\sigma$).

For choroid region metrics, OCTolyzer’s eye-level measurement noise was very
low compared to the populations natural variability, with the upper quartile
of the box-plot distributions for ETDRS CT/B-scan SFCT/B-scan CA sitting below
5% of each features population standard deviation, and below 10% for
peripapillary CT. In the latter case, the eye-level variability is confounded
with natural diurnal variation of the choroid, and the population standard
deviation for the DVCKD sample was about half of the values for the i-Test and
GCU Topcon samples. Thus, for choroid region metrics, segmentation error
contributes to only 5-10% of the overall population variability.

We observed higher variability in the choroid vessel metrics at the eye-level,
with B-scan CVI measurement noise primarily sitting below 15% of the
population standard deviation ($\sigma$=0.03) and 25% for ETDRS CVI
($\sigma$=0.03). This suggests that the CVI measurements are less reliable
than the regional metrics, and more so for ETDRS CVI. However, ETDRS CVI could
have higher variability than B-scan CVI because of the image quality
difference between EDI and non-EDI volume pairs (ART 50 for EDI volume data
compared to ART 12 for non-EDI volume data), as well as the unregistered
nature of the volume scans which have different B-scan sampling rates (31
B-scans per EDI volume compared 61 B-scans per non-EDI volume) and slightly
different regions of interest up to some rotation — leading to a different
stack of cross-sections of the dense, heterogeneous choroidal vasculature —
being captured.

The major outliers for the macular OCT B-scans shown in Fig. 7 are mainly
thick choroids whose lower boundaries (arrows) have poor visibility primarily
due to decaying optical signal. This has a direct consequence for the CVI
outliers, as CVI is normalised by the estimated size of the choroid. Moreover,
image quality plays a clear role in poor quality segmentation, such as for the
major outlier for B-scan CVI, where one of the repeated pair has poorer
contrast and thus poor vessel wall definition. It is encouraging to see that
major outliers are coming from challenging cases of thicker choroids with
obscure choroid-scleral junctions and poor quality vessel wall definition.

In Fig. 8, we show the B-scans of the major outliers at each time point with
the segmentations overlaid using DeepGPET 18. Any differences (red arrows) are
minimal, and the segmentations do not look qualitatively different. These two
cases were the major outliers due to the difference in CT observed from
morning – afternoon (a negative differential of 15 and 14 $\mu$m in average
CT, respectively) relative to their afternoon – evening change (a positive
differential of 1 and 2 $\mu$m, respectively). Thus, we propose the major
outliers are primarily driven by minimal diurnal variation of the choroid, and
not segmentation error.

###  3.2 Execution time

Using a standard laptop CPU, OCTolyzer was able to fully process a single line
OCT B-scan in 1.55 $\pm$ 0.1s (pixel resolution $496\times 768)$. An OCT
volume with thickness maps computed and measured for every retinal and
choroidal layer takes 85 $\pm$ 3.7s (pixel resolution $61\times 496\times
768$). Execution time would improve if the choroid was measured per A-scan (64
$\pm$ 2.5s), rather than locally perpendicular to its upper boundary, and
significantly so with GPU acceleration.

An OCT peripapillary scan can be fully processed in 2.29 $\pm$ 0.14s (pixel
resolution $768\times 1536)$, and takes 1.56 $\pm$ 0.2s to segment the
choroidal layer. To align the peripapillary grid, the localiser must be
available (as an SLO image) and the fovea and optic disc must be segmented,
which increases execution time to 30.70 $\pm$ 2.10.

Execution time increases when the SLO analysis suite is toggled on,
particularly for disc-centred SLO images (OCT peripapillary scans), because
there are three regions of interest measured for each vessel type (all-vessel,
artery, veins). However, this is still acceptable performance on a standard
laptop CPU, suggesting its feasibility to be used for large scale OCT/SLO
image analysis.

##  4 Discussion

We have developed a fully automatic method, OCTolyzer, for segmentation and
feature extracting in OCT and SLO data. While the reproducibility of
OCTolyzer’s SLO analysis suite (SLOctolyzer) has been assessed previously 31,
OCTolyzer’s OCT analysis suite also demonstrates excellent reproducibility
across the three different OCT data types of which it supports, both at the
population- and eye-level.

Across macular OCT B-scans, macular OCT volume scans and peripapillary OCT
B-scans, OCTolyzer had very high correlations across repeated measurements
(Pearson, Spearman and intra-class correlations for regional metrics were all
greater than 0.98, and 0.91 for choroid vascular index in the macular data).
Mean absolute errors from all paired samples in the repeated macular OCT data
were below the values of previously reported agreement thresholds 53; 54.

The systematic bias observed in the macular OCT volume data was a result of
comparing repeated scans where EDI mode was toggled on and off, increasing the
potential for the non-EDI scan of each pair having poor choroid-scleral
junction visibility. The residuals for vessel metrics (CVI) were well balanced
and appeared to show no apparent trend. Major outliers from eye-level
reproducibility analysis for both regional and vessel metrics in macular OCT
data highlighted the challenge larger choroids pose for segmentation, given
the propensity for optical signal degradation.

Nevertheless, the majority of measurement error of regional metrics observed
for macular OCT B-scan data were within 5% of the population’s natural
variability for regional metrics, and 25% for volumetric CVI and 15% for
B-scan CVI. However, the population variability is notably smaller for CVI
measurements, and the image quality, sampling rate and unregistered nature of
the EDI and non-EDI volume pairs all likely played a role in producing greater
variability in volumetric CVI. Thus, the macular regional metrics were more
reliable than vessel metrics, but they were both still reasonable for the
homogeneous (young and healthy) cohorts analysed.

For peripapillary OCT B-scans, the reproducibility results were confounded by
natural diurnal variation of the choroid. Analysis of residuals suggested that
the major outliers were sourced primarily between morning – afternoon
comparisons, rather than afternoon – evening comparisons, and major outliers
at the eye-level showed no qualitative difference in segmentation error.
Manual measurements of fovea-centred choroidal thickness showed the same
longitudinal trend 34 (shown in their supplementary materials), as well as a
wealth of literature suggesting choroidal thinning throughout daytime, and
specifically between the morning and afternoon 48; 49; 50; 51; 52. Thus, this
suggests the error observed was primarily driven by diurnal variation and not
segmentation error.

OCTolyzer’s OCT analysis suite is equipped with choroid segmentation methods
which can produce reproducible and clinically meaningful features of the
choroid in the macula and around the optic disc. The reproducibility analysis
(both at the population- and eye-level) also helpfully provide approximate
thresholds which end-users can use to understand whether the change they are
observing in the choroid after application of OCTolyzer is due to actual
biological change or due to segmentation error.

OCTolyzer’s runtime is entirely reasonable for large-scale ophthalmic image
analysis, even on a standard laptop CPU, taking 1.55s for a single 496
$\times$ 768 B-scan, 2.29s for a single 496 $\times$ 1536 peripapillary
B-scan, and 85s for a 61 $\times$ 496 $\times$ 768 OCT volume scan. AlzEye is
a recently collected, large-scale dataset of retinal images from the
Moorefield’s Eye Hospital NHS Foundation Trust 55. AlzEye contains 1,567,358
OCT images from 154,830 patients. Assuming the 1,567,358 images were from
approximately 25,695 61-stack OCT volume scans, these could be fully processed
in approximately 25 days on the same laptop CPU — an upper bound which could
be significantly improved upon with GPU acceleration and a stronger CPU.

While OCTolyzer does not have an automatic process for checking image quality,
we are able to inform the user of the signal-to-noise ratio of the OCT B-scan
data and use the overlap index to assess how off-centre a peripapillary scan
is from the optic disc centre. While OCTolyzer does not have an automatic
approach to check segmentation quality, OCTolyzer optionally saves out images
of the OCT and SLO images with segmentations overlaid, allowing the end-user
to inspect segmentation quality in real-time, and also supports manual
annotation of the en face retinal vessels on the localiser SLO — currently OCT
segmentations cannot be manually edited. We also alert the end-user in the
process log of any obvious segmentation issues. For example, we flag to the
end-user where peripapillary choroids have not been segmented end-to-end and
pad the missing thickness values with zeros. Additionally, for macular OCT
volume scans, if the thickness maps have any missing data within the ETDRS
grid this is also flagged and the corresponding missing values are imputed
using nearest neighbour interpolation.

There were some limitations associated with our reproducibility analysis of
the OCT analysis suite. For example, our paired macular OCT volume data were
not registered between acquisitions. Thus, the i-Test sample does not provide
a perfect comparison to which segmentation could be the direct cause of
measurement error. Similarly for the DVCKD sample, the measurement error
observed in the peripapillary choroids of these OCT B-scans were confounded by
diurnal variation of the choroid. While we could mitigate for this in the GCU
Topcon sample by selecting only one time point, this was not the case for the
DVCKD sample. Thus, biological change also contributed to the measurement
error we observed in the DVCKD sample.

Moreover, it is important for the reader to be aware of potential data leakage
in our reproducibility analysis of the macular OCT data. We use Choroidalyzer
to segment macular OCT data on the i-Test and GCU Topcon sample, but these
reproducibility samples had a distinct overlap with the dataset used to train
or evaluate Choroidalyzer 17 (using ground truth labels previously segmented
by DeepGPET 18). Just over a third of the i-Test sample (21 / 60) were used
for training or evaluation. However, only the EDI counterpart of their OCT
volume pair were used. Thus, while Choroidalyzer had potentially seen 42 eyes
(of 120 used for analysis) during model construction to some extent, the image
artefacts introduced by deactivating EDI mode still posed a significant
challenge to Choroidalyzer’s reliability as a method. For the GCU Topcon
sample, all eyes featured in at least one or more B-scans for training or
evaluation of Choroidalyzer, and a third (11 / 33) of repeated pairs were used
for training or evaluation, since many of the B-scans from the hyperopes were
excluded from training because DeepGPET failed to segment their thicker
choroids 17.

There are also some limitations associated with OCTolyzer as a pipeline.
Firstly, the pipeline was initially designed for inputting `.vol` RAW files
exported from the HEYEX viewer (and imported into Python using EyePy 41). This
proprietary file typically almost always contains the paired localiser SLO
image, which is not always the case for other file types (e.g., `.dcm` files).
Therefore, we are working on supporting stand-alone OCT analysis through
`.dcm` files, i.e., where proprietary files only contain the OCT image data,
and potentially excludes automatic retinal layer segmentations.

Additionally, the pipeline does not support automatic retinal layer
segmentation other than those accessible from the image metadata. Therefore,
manual quality inspection of the segmentations on the device before data
extraction and processing with OCTolyzer is required. Finally, our choroid
segmentation methods were built using OCT data related to systemic health
change, and not related to eye pathology. Thus, acquiring examples of extreme
choroid thinning/thickening due to, say pathological myopathy/polypoidal
choroidal vasculopathy would be ideal to assess the robustness of OCTolyzer’s
OCT choroid segmentation methods to eye pathology.

There are several avenues of future work to extend OCTolyzer as a helpful tool
for the general researcher and clinician. As with any large-scale image
analysis pipeline, the ability to reject images based on quality or
segmentation accuracy is crucial for forming a meaningful dataset of clinical
measurements. Current signal-to-noise ratios built into imaging devices do not
characterise the quality of the image in the context to which it will be
analysed for. Such context-dependent image quality methods are essential in
large-scale ophthalmic image analysis.

localiser en face images for OCT acquisition need not necessarily be an SLO
image, but sometimes a colour fundus image (or other en face scans like blue-
light fundus auto-fluorescence). Currently, OCTolyzer only supports
segmentation and feature measurement of the SLO, so providing support for
other en face modalities would be ideal.

##  5 Conclusion

OCTolyzer is the first open-source, fully automatic analysis toolkit for the
retinal and choroidal microvasculature as seen in OCT/SLO data, complete with
segmentation and feature measurement of macular OCT B-scans, macular OCT
volumes and optic disc OCT peripapillary scans, as well as their corresponding
localiser SLO image. OCTolyzer is capable of converting proprietary OCT/SLO
data into clinically meaningful and reproducible features of the en face
retinal vasculature, cross-sectional retinal layers, choroidal layer and
vasculature.

OCTolyzer can be freely downloaded and used without specialist training or
proprietary software to run the pipeline. Ultimately, we hope OCTolyzer will
help standardise the reporting of ocular measurements, enable large-scale
ophthalmic image analysis among the research community, and become a
foundational pipeline which the wider research community may continue to
extend on and improve, thus addressing the distinct lack of such available
pipelines for OCT data.

## Acknowledgements

J.B. was supported by the Medical Research Council (grant MR/N013166/1) as
part of the Doctoral Training Programme in Precision Medicine at the Usher
Institute, University of Edinburgh. For the purpose of open access, the
authors have applied a creative commons attribution (CC BY) licence to any
author accepted manuscript version arising.

##  6 Conflicts of Interest

The authors declare no conflicts of interest.

## References

  * 1 Sohan Singh Hayreh and Shelagh Bell Hayreh.  Uveal vascular bed in health and disease: uveal vascular bed anatomy. paper 1 of 2.  Eye, 37(13):2590–2616, 2023.
  * 2 Richard F Spaide, Hideki Koizumi, and Maria C Pozonni.  Enhanced depth imaging spectral-domain optical coherence tomography.  American journal of ophthalmology, 146(4):496–500, 2008.
  * 3 Creig S Hoyt and David Taylor.  Pediatric Ophthalmology and Strabismus, Expert Consult-Online and Print, 4: Pediatric Ophthalmology and Strabismus.  Elsevier Health Sciences, 2012.
  * 4 Silke Aumann, Sabine Donner, Jörg Fischer, and Frank Müller.  Optical coherence tomography (oct): principle and technical realization.  High resolution imaging in microscopy and ophthalmology: new frontiers in biomedical optics, pages 59–85, 2019.
  * 5 Carolin Schanner, Nina Hautala, Franziska G Rauscher, and Aura Falck.  The impact of the image conversion factor and image centration on retinal vessel geometric characteristics.  Frontiers in Medicine, 10:1112652, 2023.
  * 6 Anita Kundu, Justin P Ma, Cason B Robbins, Praruj Pant, Vithiya Gunasan, Rupesh Agrawal, Sandra Stinnett, Burton L Scott, Kathryn PL Moore, Sharon Fekrat, et al.  Longitudinal analysis of retinal microvascular and choroidal imaging parameters in parkinson’s disease compared with controls.  Ophthalmology Science, page 100393, 2023.
  * 7 Jamie Burke, Neeraj Dhaun, Baljean Dhillon, Kyle J Wilson, Nicholas AV Beare, and Ian JC MacCormick.  The retinal contribution to the kidney–brain axis in severe malaria.  Trends in parasitology, 2023.
  * 8 Craig Balmforth, Job JMH van Bragt, Titia Ruijs, James R Cameron, Robert Kimmitt, Rebecca Moorhouse, Alicja Czopek, May Khei Hu, Peter J Gallacher, James W Dear, et al.  Chorioretinal thinning in chronic kidney disease links to inflammation and endothelial dysfunction.  JCI insight, 1(20), 2016.
  * 9 Ehsan Khalilipur, Zahra Mahdizad, Negin Molazadeh, Hooshang Faghihi, Nasim Naderi, Mohammadreza Mehrabi Bahar, Ata Firouzi, Parham Sadeghipour, Majid Maleki, Sahel Soltani Shahgoli, et al.  Microvascular and structural analysis of the retina and choroid in heart failure patients with reduced ejection fraction.  Scientific Reports, 13(1):5467, 2023.
  * 10 Siegfried K Wagner, Dun Jack Fu, Livia Faes, Xiaoxuan Liu, Josef Huemer, Hagar Khalid, Daniel Ferraz, Edward Korot, Christopher Kelly, Konstantinos Balaskas, et al.  Insights into systemic disease through retinal imaging-based oculomics.  Translational vision science & technology, 9(2):6–6, 2020.
  * 11 Angelica Ly, Lisa Nivison-Smith, Barbara Zangerl, Nagi Assaad, and Michael Kalloniatis.  Self-reported optometric practise patterns in age-related macular degeneration.  Clinical and Experimental Optometry, 100(6):718–728, 2017.
  * 12 Anish Jindal, Irene Ctori, Bruno Fidalgo, Priya Dabasia, Konstantinos Balaskas, and John G Lawrenson.  Impact of optical coherence tomography on diagnostic decision-making by uk community optometrists: a clinical vignette study.  Ophthalmic and Physiological Optics, 39(3):205–215, 2019.
  * 13 Reena Chopra, Siegfried K Wagner, and Pearse A Keane.  Optical coherence tomography in the 2020s—outside the eye clinic.  Eye, 35(1):236–243, 2021.
  * 14 Ge Song, Evan T Jelly, Kengyeh K Chu, Wesley Y Kendall, and Adam Wax.  A review of low-cost and portable optical coherence tomography.  Progress in Biomedical Engineering, 3(3):032002, 2021.
  * 15 Ignacio A Viedma, David Alonso-Caneiro, Scott A Read, and Michael J Collins.  Deep learning in retinal optical coherence tomography (oct): A comprehensive survey.  Neurocomputing, 507:247–264, 2022.
  * 16 Reza Alizadeh Eghtedar, Mahdad Esmaeili, Alireza Peyman, Mohammadreza Akhlaghi, and Seyed Hossein Rasta.  An update on choroidal layer segmentation methods in optical coherence tomography images: a review.  Journal of Biomedical Physics & Engineering, 12(1):1, 2022.
  * 17 Justin Engelmann, Jamie Burke, Charlene Hamid, Megan Reid-Schachter, Dan Pugh, Neeraj Dhaun, Diana Moukaddem, Lyle Gray, Niall Strang, Paul McGraw, Amos Storkey, Paul J. Steptoe, Stuart King, Tom MacGillivray, Miguel O. Bernabeu, and Ian J. C. MacCormick.  Choroidalyzer: An Open-Source, End-to-End Pipeline for Choroidal Analysis in Optical Coherence Tomography.  Investigative Ophthalmology & Visual Science, 65(6):6–6, 06 2024.
  * 18 Jamie Burke, Justin Engelmann, Charlene Hamid, Megan Reid-Schachter, Tom Pearson, Dan Pugh, Neeraj Dhaun, Amos Storkey, Stuart King, Tom J MacGillivray, et al.  An open-source deep learning algorithm for efficient and fully automatic analysis of the choroid in optical coherence tomography.  Translational Vision Science & Technology, 12(11):27–27, 2023.
  * 19 Juan Xu, Hiroshi Ishikawa, Gadi Wollstein, and Joel S Schuman.  Retinal vessel segmentation on slo image.  In 2008 30th Annual International Conference of the IEEE Engineering in Medicine and Biology Society, pages 2258–2261. IEEE, 2008.
  * 20 Enrico Pellegrini, Gavin Robertson, Emanuele Trucco, Tom J MacGillivray, Carmen Lupascu, Jano van Hemert, Michelle C Williams, David E Newby, Edwin JR van Beek, and Graeme Houston.  Blood vessel segmentation and width estimation in ultra-wide field scanning laser ophthalmoscopy.  Biomedical optics express, 5(12):4329–4337, 2014.
  * 21 Robert Kromer, Rahman Shafin, Sebastian Boelefahr, and Maren Klemm.  An automated approach for localizing retinal blood vessels in confocal scanning laser ophthalmoscopy fundus images.  Journal of medical and biological engineering, 36:485–494, 2016.
  * 22 Maria Ines Meyer, Pedro Costa, Adrian Galdran, Ana Maria Mendonça, and Aurélio Campilho.  A deep neural network for vessel segmentation of scanning laser ophthalmoscopy images.  In Image Analysis and Recognition: 14th International Conference, ICIAR 2017, Montreal, QC, Canada, July 5–7, 2017, Proceedings 14, pages 507–515. Springer, 2017.
  * 23 Adam Threlfall, Samuel Gibbon, James Cameron, and Tom MacGillivray.  A publicly available vessel segmentation algorithm for slo images.  arXiv preprint arXiv:2311.17525, 2023.
  * 24 Sarah Patterson.  Oct-tools.  https://github.com/sarastokes/OCT-tools, 2019.
  * 25 Alexander Brandt.  Oct-marker.  https://github.com/neurodial/OCT-Marker/tree/master, 2018.
  * 26 Meng Xuan, Wei Wang, Danli Shi, James Tong, Zhuoting Zhu, Yu Jiang, Zongyuan Ge, Jian Zhang, Gabriella Bulloch, Guankai Peng, et al.  A deep learning–based fully automated program for choroidal structure analysis within the region of interest in myopic children.  Translational Vision Science & Technology, 12(3):22–22, 2023.
  * 27 Javier Mazzaferri, Luke Beaton, Gisèle Hounye, Diane N Sayah, and Santiago Costantino.  Open-source algorithm for automatic choroid segmentation of oct volume reconstructions.  Scientific reports, 7(1):42112, 2017.
  * 28 Adria Perez-Rovira, T MacGillivray, Emanuele Trucco, KS Chin, K Zutis, C Lupascu, Domenico Tegolo, Andrea Giachetti, Peter J Wilson, A Doney, et al.  Vampire: Vessel assessment and measurement platform for images of the retina.  In 2011 Annual International Conference of the IEEE Engineering in Medicine and Biology Society, pages 3391–3394. IEEE, 2011.
  * 29 Yukun Zhou, Siegfried K Wagner, Mark A Chia, An Zhao, Moucheng Xu, Robbert Struyven, Daniel C Alexander, Pearse A Keane, et al.  Automorph: automated retinal vascular morphology quantification via a deep learning pipeline.  Translational vision science & technology, 11(7):12–12, 2022.
  * 30 Justin Engelmann, Ana Villaplana-Velasco, Amos Storkey, and Miguel O Bernabeu.  Robust and efficient computation of retinal fractal dimension through deep approximation.  In International Workshop on Ophthalmic Medical Image Analysis, pages 84–93. Springer, 2022.
  * 31 Jamie Burke, Samuel Gibbon, Justin Engelmann, Adam Threlfall, Ylenia Giarratano, Charlene Hamid, Stuart King, Ian JC MacCormick, and Tom MacGillivray.  Sloctolyzer: Fully automatic analysis toolkit for segmentation and feature extracting in scanning laser ophthalmoscopy images.  arXiv preprint arXiv:2406.16466, 2024.
  * 32 Neeraj Dhaun.  Optical coherence tomography and nephropathy: The octane study.  https://clinicaltrials.gov/ct2/show/NCT02132741, 2014.  ClinicalTrials.gov identifier: NCT02132741. Updated November 4, 2022. Accessed May 31st, 2023.
  * 33 Diana Moukaddem, Niall Strang, Lyle Gray, Paul McGraw, and Chris Scholes.  Comparison of diurnal variations in ocular biometrics and intraocular pressure between hyperopes and non-hyperopes.  Investigative Ophthalmology & Visual Science, 63(7):1428–F0386, 2022.
  * 34 Tariq E Farrah, Dan Pugh, Fiona A Chapman, Emily Godden, Craig Balmforth, Gabriel C Oniscu, David J Webb, Baljean Dhillon, James W Dear, Matthew A Bailey, et al.  Choroidal and retinal thinning in chronic kidney disease independently associate with egfr decline and are modifiable with treatment.  Nature Communications, 14(1):7720, 2023.
  * 35 Heidelberg Engineering.  SPECTRALIS Product Family User Manual.  =, 2022.
  * 36 Early Treatment Diabetic Retinopathy Study Research Group et al.  Early treatment diabetic retinopathy study design and baseline patient characteristics: Etdrs report number 7.  Ophthalmology, 98(5):741–756, 1991.
  * 37 Kenneth Falconer.  Fractal geometry: mathematical foundations and applications.  John Wiley & Sons, 2004.
  * 38 Michael D Knudtson, Kristine E Lee, Larry D Hubbard, Tien Yin Wong, Ronald Klein, and Barbara EK Klein.  Revised formulas for summarizing retinal vessel diameters.  Current eye research, 27(3):143–149, 2003.
  * 39 Enrico Grisan, Marco Foracchia, and Alfredo Ruggeri.  A novel method for the automatic evaluation of retinal vessel tortuosity.  In Proceedings of the 25th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (IEEE Cat. No. 03CH37439), volume 1, pages 866–869. IEEE, 2003.
  * 40 James R Cameron, Lucia Ballerini, Clare Langan, Claire Warren, Nicholas Denholm, Katie Smart, and Thomas J MacGillivray.  Modulation of retinal image vasculature analysis to extend utility and provide secondary value from optical coherence tomography imaging.  Journal of Medical Imaging, 3(2):020501–020501, 2016.
  * 41 Olivier Morelle.  Eyepy.  https://github.com/MedVisBonn/eyepy/tree/master, 2023.
  * 42 Mark Graham.  Eyepy.  https://github.com/marksgraham/OCT-Converter, 2024.
  * 43 Joel S Schuman, James G Fujimoto, Jay Duker, and Hiroshi Ishikawa.  Optical coherence tomography of ocular diseases.  CRC Press, 2024.
  * 44 Zaixing Mao, Atsuya Miki, Song Mei, Ying Dong, Kazuichi Maruyama, Ryo Kawasaki, Shinichi Usui, Kenji Matsushita, Kohji Nishida, and Kinpui Chan.  Deep learning based noise reduction method for automatic 3d segmentation of the anterior of lamina cribrosa in optical coherence tomography volumetric scans.  Biomedical optics express, 10(11):5832–5851, 2019.
  * 45 Paul A. Yushkevich, Joseph Piven, Heather Cody Hazlett, Rachel Gimpel Smith, Sean Ho, James C. Gee, and Guido Gerig.  User-guided 3D active contour segmentation of anatomical structures: Significantly improved efficiency and reliability.  Neuroimage, 31(3):1116–1128, 2006.
  * 46 J Martin Bland and DouglasG Altman.  Statistical methods for assessing agreement between two methods of clinical measurement.  The lancet, 327(8476):307–310, 1986.
  * 47 Justin Engelmann, Diana Moukaddem, Lucas Gago, Niall Strang, and Miguel O Bernabeu.  Applicability of oculomics for individual risk prediction: Repeatability and robustness of retinal fractal dimension using dart and automorph.  Investigative Ophthalmology & Visual Science, 65(6):10–10, 2024.
  * 48 Ranjay Chakraborty, Scott A Read, and Michael J Collins.  Diurnal variations in axial length, choroidal thickness, intraocular pressure, and ocular biometrics.  Investigative ophthalmology & visual science, 52(8):5121–5129, 2011.
  * 49 Colin S Tan, Yanling Ouyang, Humberto Ruiz, and SriniVas R Sadda.  Diurnal variation of choroidal thickness in normal, healthy subjects measured by spectral domain optical coherence tomography.  Investigative ophthalmology & visual science, 53(1):261–266, 2012.
  * 50 Shinichi Usui, Yasushi Ikuno, Masahiro Akiba, Ichiro Maruko, Tetsuju Sekiryu, Kohji Nishida, and Tomohiro Iida.  Circadian changes in subfoveal choroidal thickness and the relationship with circulatory factors in healthy subjects.  Investigative ophthalmology & visual science, 53(4):2300–2307, 2012.
  * 51 Takamasa Kinoshita, Yoshinori Mitamura, Kayo Shinomiya, Mariko Egawa, Akiko Iwata, Akiko Fujihara, Yoko Ogushi, Kentaro Semba, Kei Akaiwa, Eisuke Uchino, et al.  Diurnal variations in luminal and stromal areas of choroid in normal eyes.  British Journal of Ophthalmology, 101(3):360–364, 2017.
  * 52 Lisa A Ostrin, Ashutosh Jnawali, Andrew Carkeet, and Nimesh B Patel.  Twenty-four hour ocular and systemic diurnal rhythms in children.  Ophthalmic and Physiological Optics, 39(5):358–369, 2019.
  * 53 Waheeda Rahman, Fred Kuanfu Chen, Jonathan Yeoh, Praveen Patel, Adnan Tufail, and Lyndon Da Cruz.  Repeatability of manual subfoveal choroidal thickness measurements in healthy subjects using the technique of enhanced depth imaging optical coherence tomography.  Investigative ophthalmology & visual science, 52(5):2267–2271, 2011.
  * 54 Feiyan Ma, Yifan Bai, Jialiang Duan, Yuchen Liang, and Qingli Shang.  Validation of reliability, repeatability and consistency of three-dimensional choroidal vascular index.  Scientific Reports, 14(1):1576, 2024.
  * 55 Siegfried Karl Wagner, Fintan Hughes, Mario Cortina-Borja, Nikolas Pontikos, Robbert Struyven, Xiaoxuan Liu, Hugh Montgomery, Daniel C Alexander, Eric Topol, Steffen Erhard Petersen, et al.  Alzeye: longitudinal record-level linkage of ophthalmic imaging and hospital admissions of 353 157 patients in london, uk.  BMJ open, 12(3):e058552, 2022.
  * 56 Thomas Pearson, Yingdi Chen, Baljean Dhillon, Siddharthan Chandran, Jano van Hemert, and Tom MacGillivray.  Multi-modal retinal scanning to measure retinal thickness and peripheral blood vessels in multiple sclerosis.  Scientific Reports, 12(1):20472, 2022.
  * 57 Craig W Ritchie and Karen Ritchie.  The prevent study: a prospective cohort study to identify mid-life biomarkers of late-onset alzheimer’s disease.  BMJ open, 2(6):e001893, 2012.
  * 58 Craig W Ritchie, Katie Wells, and Karen Ritchie.  The prevent research programme–a novel research programme to identify and manage midlife risk for dementia: the conceptual framework.  International Review of Psychiatry, 25(6):748–754, 2013.
  * 59 Ali Hatamizadeh, Hamid Hosseini, Niraj Patel, Jinseo Choi, Cameron C Pole, Cory M Hoeferlin, Steven D Schwartz, and Demetri Terzopoulos.  Ravir: A dataset and methodology for the semantic segmentation and quantitative analysis of retinal arteries and veins in infrared reflectance imaging.  IEEE Journal of Biomedical and Health Informatics, 26(7):3272–3283, 2022.
  * 60 Yingdi Chen, Juan Larraz, Michael Wong, Patrick Kearns, Fraser Brown, Sarah-Jane Martin, Peter Connick, Niall MacDougall, Christine Weaver, Baljean Dhillon, et al.  Longitudinal retinal imaging study of newly diagnosed relapsing-remitting multiple sclerosis in scottish population: baseline and 12 months follow-up profile of futurems retinal imaging cohort.  BMJ Open Ophthalmology, 7(1):e001024, 2022.
  * 61 Patrick KA Kearns, Sarah J Martin, Jessie Chang, Rozanna Meijboom, Elizabeth N York, Yingdi Chen, Christine Weaver, Amy Stenson, Katarzyna Hafezi, Stacey Thomson, et al.  Futurems cohort profile: a scottish multicentre inception cohort study of relapsing-remitting multiple sclerosis.  BMJ open, 12(6):e058506, 2022.

## Supplementary Material

### Simultaneous OCT + SLO capture during acquisition

Supplementary Fig. S1 shows a screenshot from the Heidelberg Eye Explorer
(HEYEX) software (version 1.12.1.0) (Heidelberg Engineering, Heidelberg,
Germany) of an OCT volume for an individual’s eye. During OCT capture, the SLO
image (left) is used to reference the location of the B-scans (right) captured
during acquisition.

Figure S1: Screenshot from HEYEX viewer of an OCT volume during acquisition.
(Left) the SLO image with the acquisition location of the OCT volume overlaid
in green, with the green central line indicating the location of the cross-
sectional OCT B-scan. (Right) the corresponding fovea-centred OCT B-scan of
the OCT volume.

### Population tables for OCTolyzer’s segmentation models

#### OCT Segmentation

The following datasets were used for OCT choroid segmentation: OCTANE 32, a
longitudinal cohort of kidney donors and transplant recipients (47 eyes).
Diurnal Variation for Chronic Kidney Disease (DVCKD) 32, a cohort of young
healthy adults collected to assess diurnal variation of the choroid in
Edinburgh (20 eyes). Normative, a collection of OCT data from healthy subjects
(author J.B. and a healthy cohort collected for a study related to multiple
sclerosis 56) (60 eyes). i-Test 32, a cross-sectional cohort of women
undergoing normative, pre-eclamptic or intra-uterine growth restrictive
pregnancy (42 eyes). PREVENT Dementia, a cohort of mid-life individuals, half
of whom are at genetic risk of developing later life dementia 57; 58 (232
eyes). GCU Topcon, a longitudinal cohort of young, healthy participants with
varying degrees of myopia collected for assessing diurnal variation of the
choroid in Glasgow (43 eyes).

For DeepGPET’s model construction 18 only the OCTANE, Normative and a subset
of the i-Test data (10 eyes, 5 participants) were used. More details can be
found in the original papers describing the methods 18; 17.

OCTANE 32 Diurnal Variation 32 Normative i-Test 32 Prevent Dementia 57 GCU
Topcon 33 Total Subjects 46 20 1 21 121 24 233 Control/Case 0 / 46 20 / 0 1 /
0 11 / 10 56 / 65 24 / 0 112 / 121 Male/Female 24 / 22 11 / 9 1 / 0 0 / 21 66
/ 55 14 / 9 116 / 116 Right/Left eyes 46 / 0 20 / 0 1 / 1 21 / 21 117 / 115 22
/ 21 227 / 158 Age (mean (SD)) 47.5 (12.3) 21.4 (2.3) 23.0 (0.0) 32.8 (5.4)
50.8 (5.6) 21.8 (7.9) 42.9 (13.7) Device manufacturer Heidelberg Heidelberg
Heidelberg Heidelberg Heidelberg Topcon All Device type Standard Standard FLEX
FLEX Standard DRI Triton Plus All nEDI / EDI EDI EDI Both EDI Both Average ART
100 100 9 50 100 Scan location Horizontal/Vertical 168 / 0 55 / 50 4 / 4 76 /
76 381 / 369 132 / 139 816 / 638 Volume/Radial/Peripapillary 0 / 0 / 0 0 / 0 /
66 365 / 0 / 0 2,408 / 0 / 0 0 / 0 / 0 0 / 1,307 / 0 2,773 / 1,307 / 66 Total
B-scans 168 171 373 2,560 750 1,578 5,600

Table S1: Image characteristics of the cohorts used for building Choroidalyzer 17. |  OCTANE |  i-Test |  Normative | Total
---|---|---|---|---
Subjects | 47 | 5 | 30 | 82
Male/Female | 24 / 23 | 0 / 5 | 20 / 10 | 44 / 38
Right/Left eyes | 47 / 0 | 5 / 5 | 29 / 29 | 81 / 34
Age (mean (SD)) | 48.8 (12.9) | 34.4 (3.4) | 49.1 (7.0) | 48.0 (11.2)
HRA+OCT Module | Standard | FLEX | Standard | Both
Horizontal/Vertical scans | 166 / 0 | 16 / 16 | 57 / 54 | 239 / 70
Volume scans | 174 | 186 | 46 | 406
Total B-scans | 340 | 218 | 157 | 715
Table S2: Image characteristics of the cohorts used for building DeepGPET 18.

#### SLO Segmentation

The following datasets were used for SLO segmentation: RAVIR 59, an open
source dataset of SLO images with varying degrees of retinal pathology.
Normative 40, a small dataset of SLO images collected in-house. SLO images
captured from the PREVENT Dementia 57; 58 and i-Test 32 cohorts were also used
(285 eyes and 186 eyes, respectively) and were described qualitatively above.
FutureMS 60; 61, a cohort of individuals with newly diagnosed relapsing-
remitting multiple sclerosis (MS) (15 eyes). More details can be found here
31.

Study | Participants | Images | Right eyes | Retinal pathology | HRA+OCT Module | Image resolution | Location
---|---|---|---|---|---|---|---
RAVIR 59 | 23 | 23 | 14 | Yes | Standard | 768 | Disc
Healthy 40 | 7 | 7 | 7 | No | Standard | 1536 | Disc
PREVENT 57; 58 | 144 | 285 | 142 | No | Standard | 1536 | Disc
i-Test 32 | 93 | 186 | 93 | No | Standard & FLEX | 768 | Macula
FutureMS 61; 60 | 15 | 15 | 9 | No | Standard | 1536 | Disc
Table S3: Image characteristics of the cohorts used to build SLOctolyzer’s
segmentation module 31.

SLO segmentation model | Cohort | Total
---|---|---
RAVIR 59 |  Healthy 40 |  PREVENT 57; 58 |  i-Test 32 |  FutureMS 60; 61
All-vessel segmentation | 23 | 7 | ✗ | ✗ | ✗ | 30
Fovea detection | 23 | 7 | 285 | 186 | 15 | 516
Artery, Vein, Optic disc detection | ✗ | ✗ | ✗ | 15 | 15 | 30

Table S4: Number of eyes (images) used for each segmentation model stratified
by cohort. AVOD, artery-vein-optic disc.

### DeepGPET’s robustness to peripapillary choroids

Supplementary Fig. S2 shows successful choroid segmentations after application
of DeepGPET 18, a model which was trained only on macula-centred OCT B-scans.
The choroids were selected to show DeepGPET’s robustness to image quality,
choroid size and extent of sinuosity for different peripapillary OCT B-scan.
The peripapillary choroids shown here were sourced from the DVCKD cohort 32.

Figure S2: A selection of peripapillary choroids from 8 different eyes from
the DVCKD cohort 32, with successful choroid segmentation after application of
DeepGPET 18.

### Layer definition

Supplementary Table S5 defines the different layers of the retina and choroid
which OCTolyzer is capable of making measurements on for the three OCT data
types which OCTolyzer supports.

Abbreviation | Layer
---|---
ILM – RNFL | Retinal Nerve Fiber Layer
RNFL – GCL | Ganglion Cell Layer
GCL – IPL | Inner Plexiform Layer
IPL – INL | Inner Nuclear Layer
INL – OPL | Outer Plexiform Layer
OPL – ELM | External Limiting Membrane
ELM – PR1 | Photoreceptor Layer 1
PR1 – PR2 | Photoreceptor Layer 2
PR2 – RPE | Retinal Pigment Epithelium
RPE – BM | Bruch’s Membrane Complex
ILM – ELM | Inner retinal layers
ELM – BM | Outer retinal layers
ILM – BM | All retinal layers
BM – CHOR | Choroid
Table S5: All available layers which OCTolyzer measures. ILM, inner limiting
membrane.

### Detailed thickness map diagram

Supplementary Fig. S3 shows a detailed diagram of how the thickness maps are
generated from the segmentations of an OCT volume. The full, detailed pipeline
is described below.

All valid thicknesses are measured for each B-scan (panel B, multicoloured),
and each B-scans’ thickness array is aligned with the fovea from the localiser
SLO (panel B, red dotted lines). thickness array alignment per B-scan is
required since the anatomical layer segmentations (panel C, black) do not
necessarily cover the lateral width of the acquisition region of interest
(panel C, black-on-green).

The aligned thickness arrays then follow this step-by-step process (panel D):
the coarse thickness map is generated for each B-scan by vertically stacking
the aligned thickness arrays. This is padded horizontally by duplicating the
edge values. This is then interpolated to the same pixel resolution as the SLO
localiser using bi-linear interpolation. A Gaussian filter whose standard
deviation is the pixel distance between the parallel, OCT B-scans is used for
smoothing. This is then vertically padded to centre the map onto the fovea of
the localiser SLO, and the thickness values outside of the ends the original
B-scan segmentations are set to 0 (panel C, black). Finally, this map is
rotated to the angle of elevation of the original region of interest (panel C,
green).

Figure S3: Detailed diagram of how thickness maps are generated, using the
choroidal layer as an example. (A) OCT volume of sequential B-scans, with
retinal and choroidal layer segmentations overlaid. (B) Valid thickness
measurements taken of the choroid across each layer segmentation in every OCT
B-scan (C) SLO image with lines of acquisition for each B-scan (green), with
the distance the layer segmentation reached per B-scan (black), with the
horizontal position on the B-scan of the fovea overlaid as a red line. (D)
Step-by-step process of generating the thickness map. (E) The final choroid
thickness map overlaid onto the SLO image.

### Overlap index demonstration

Figure S4: Overlap index measured and visualised for two OCT peripapillary
scans. The images are (optionally) saved out during processing of an OCT
peripapillary B-scan to visualise the overlap, as well as the alignment of the
thickness profiles to the orientation of the fovea and optic disc centre. (A)
An example where the overlap index is within the 15% threshold, where the blue
cross (the centre of the acquisition’s B-scan) and green cross (the centre of
the optic disc, measured with the SLO analysis suite), are within 3% of the
optic disc diameter. (B) an example where the overlap index exceeds the 15%
threshold. Here, the acquisition line-scan is clearly off-centre from the
centre of the optic disc. OD, optic disc.

### Metadata output from OCTolyzer

Key | Description
---|---
Filename | Filname of the SLO+OCT file analyse.
FAILED | Boolean flag on whether file unexpectably failed to be analysed.
eye | Type of eye, either Right or Left.
Bscan_type | Type of OCT scan acquired. One of H(orizontal)-line, V(ertical)-line;A(rtery)V(ein)-line, P(osterior)pole and Peripapillary.
Bscan_resolution_x | Number of columns of B-scan, typically 768 or 1536 for Heidelberg.
Bscan_resolution_y | Number of rows of B-scan, typically 768 or 496 for Heidelberg.
Bscan_scale_z | Micron distance between successive B-scans in a Posterior pole acquisition. Is 0 for all other Bscan_types.
Bscan_scale_x | Pixel lengthscale in the horizontal direction B-scan/SLO, measured in microns per pixel.
Bscan_scale_y | Pixel lengthscale in the vertical direction in the B-scan, measured in microns per pixel.
scale_units | Units of the lengthscales, this is fixed as microns per pixel.
avg_quality | Heidelberg-provided signal-to-noise ratio of the B-scan(s).
retinal_layers_N | Number of retinal layer segmentations extracted from metadata.
scan_focus | Scan focus of the acquisition, in Dioptres. This decides the scaling and is a gross measure of refractive error.
visit_date | Date of acquisition.
exam_time | Time of acquisition.
slo_resolution_px | Number of rows/columns in the square-shaped SLO image (typically 768 or 1536).
field_of_view_mm | Field of view captured during acquisition, usually between 8 and 9 mm if field size is 30 degrees.
slo_scale_xy | Pixel lengthscale of the SLO image, and is typically the same for both directions.
location | Whether scan is macula-centred or disc-centred. Is either “macular” or “peripapillary”
field_size_degrees | Field of view in degrees, typically 30.
slo_modality | Modality used for SLO image capture.
acquisition_angle_degrees | Angle of elevation from horizontal image axis of acquisition for Posterior pole scans.
Bscan_fovea_x | Horizontal pixel position of the fovea on the OCT B-scan (if visible in one of the scans, only relevant for macular OCT).
Bscan_fovea_y | Vertical pixel position of the fovea on the OCT B-scan (if visible in one of the scans, only relevant for macular OCT).
slo_fovea_x | Horizontal pixel position of the fovea on the SLO image, if visible.
slo_fovea_y | Vertical pixel position of the fovea on the SLO image, if visible.
slo_missing_fovea | Boolean value flagging whether fovea is missing from data (either due to acquisition or segmentation failure).
optic_disc_overlap_index_% | % of the optic disc diameter, defining how off-centre a peripapillary image acquisition is from the optic disc centre.
optic_disc_overlap_warning | Boolean value, flagging if the overlap index is greater than 15%, the empirical cut-off to warn end-user of an off-centre scan.
optic_disc_x | Horizontal pixel position of the optic disc centre on the SLO image, if visible.
optic_disc_y | Vertical pixel position of the optic disc centre on the SLO image, if visible.
optic_disc_radius_px | Pixel radius of the optic disc.
thickness_units |  Units of measurement for thickness, always in $\mu$m (microns).
vascular_index_units | Units of measurement for choroid vascular index, always dimensionless (no units, but is a ratio between 0 and 1).
vessel_density_units |  Units of measurement for choroid vessel density, always in $\mu$m2 (square microns).
area_units |  Units of measurements for area, always in mm2 (square millimetres).
volume_units |  Units of measurements for volume, always in mm3 (cubic millimetres).
linescan_area_ROI_microns | For single-line, macular OCT, this is the micron distance defining the fovea-centred region of interest.
choroid_measure_type | Whether the choroid is measured column-wise (per A-scan) or perpendicularly. Always per A-scan for peripapillary OCT.
acquisition_radius_px | Pixel radius of the acquisition line around the optic disc for peripapillary OCT.
acquisition_radius_mm | Millimetre radius of the acquisition line around the optic disc for peripapillary OCT.
acquisition_optic_disc_center_x | Horizontal pixel position of the optic disc centre, as selected by the user during peripapillary OCT acquisition.
acquisition_optic_disc_center_y | Vertical pixel position of the optic disc centre, as selected by the user during peripapillary OCT acquisition.

Table S6: Metadata extracted and inferred using OCTolyzer when processing a
“.vol” RAW export file from a Heidelberg Engineering imaging device.

### OCTolyzer’s interface

Figure S5: Demonstration of setting up and running OCTolyzer on a batch of
demonstrative data. (A) configuration file with user-specified inputs. (B) The
folder storing the files (all “.vol” in this example) to be analysed. (C)
Running OCTolyzer on a batch of data can be done from a python integrated
development environment (left) or via the terminal (right). Figure S6: Output
files and folders from running OCTolyzer on a batch of three files (all “.vol”
in this example), each a different OCT data type which is supported. (A) The
folder storing all outputs from batch processing, including folders with
results for each individually processed file, a process log, the configuration
used and summary measurement and metadata output. (B – D) Exemplar output for
each of the OCT data types which OCTolyzer supports: single macular B-scan,
macular volume and peripapillary B-scan. (E – F) Composite segmentations of
the SLO and OCT segmentation masks for real-time segmentation quality
inspection. (G) Summary output file storing key metadata and measurements from
OCTolyzer’s measurement module for the SLO and OCT data.