Automated detection of shadow artifacts in optical coherence tomography angiography.

Frequently, when imaging retinal vasculature with optical coherence tomography angiography (OCTA) in diseased eyes, there are unavoidable obstacles to the propagation of light such as vitreous floaters or the pupil boundary. These obstacles can block the optical coherence tomography (OCT) beam and impede the visualization of the underlying retinal microcirculation. Detecting these shadow artifacts is especially important in the quantification of metrics that assess retinal disease progression because they might masquerade as regional perfusion loss. In this work, we present an algorithm to identify shadowed areas in OCTA of healthy subjects as well as patients with diabetic retinopathy, uveitis and age-related macular degeneration. The aim is to exclude these areas from analysis so that the overall OCTA parameters are minimally affected by shadow artifacts.


Introduction
Optical coherence tomography angiography (OCTA) [1,2] is a non-invasive optical imaging modality for visualizing retinal circulation. It has emerged in recent years as an alternative to established technologies that require dye injection such as fluorescein angiography and indocyanine green angiography. Besides being fast and dye-free, other advantages of OCTA are depth-resolved visualization of retinal flow [3] and superior representation of microvascular details [4,5]. This last feature has allowed the development of analytical metrics with clinical application in detection of retinal vascular abnormalities [6][7][8]. However, some of these metrics such as vessel density or avascular area may become unreliable if parts of the scan are blocked by vitreous floaters, by the pupil or by other opacities anterior to the retina.
OCTA commercial systems are generally equipped with software that analyzes the integrity of scans and computes a signal quality or signal strength index (SSI) to identify inadequate ones. The most common reasons for insufficient signal quality are excessive motion artifacts [9], poor beam focus [10] and media opacities (e.g. cataract). However, localized signal blockage by vitreous floaters or vignetting of a corner of the image by the pupil margin might not cause enough signal loss to deem the whole scan unsatisfactory. In such cases, shadows can be mistaken for focal perfusion loss in the clinical interpretation of the OCTA image and cause artefactual reduction in the overall vessel density or capillary density measured from the OCTA scan. Moreover, pupil vignetting and vitreous floaters are very common and difficult to avoid in OCTA images with larger fields of view. Therefore, it is preferable to identify and exclude these focal artifacts rather than discarding the entire scan.
Anterior segment and vitreous opacities affect both the reflectance and flow signals in the OCTA scan. The signal-processing problem of shadow detection can be described as follows.
images are not reliable indicators of shadows either since atrophied and cystic areas also appear dark (Fig. 1). In previous works, we have proposed vascular pixel identification schemes that could compensate for partial shadowing by reflectance-adjusted thresholding [11,12]. Other approaches have amplified the flow signal values under drusen shadows in order to retrieve some of the signal underneath [13]. However, these methods fail in shadow areas with severe signal loss. This article describes a method to detect severe shadows that render flow signal unreliable and mark them for exclusion. White arrows on the upper left corner represent areas of apparent normal perfusion. A green arrow represents the area of perfusion loss caused by the disease whereas blue arrows represent loss of OCTA signal in shadowed areas. Because many diseases such as DR manifest real loss of perfusion, the loss of OCTA signal in (A) alone is not enough to discriminate regions shadowed by vitreous floaters. (B) En face mean projection of the retinal slab of the equivalent 3 × 3 mm 2 OCT reflectance image. A red arrow represents an example of intra-retinal fluid (see cross-sectional B-scan in (C)) that can cause dark areas in en face mean projections of OCT reflectance. A yellow arrow is an example of a dark area caused by a vitreous shadow (see cross-sectional B-scan in (D)). There is a need to distinguish true perfusion loss (green arrow) from shadowing (blue arrows) by analyzing tissue reflectance, but without falsely excluding areas of low tissue reflectivity such as fluid space (red arrow). An insight that we use in the rest of the article is that true shadowing affects reflectance signal throughout the entire image depth (yellow arrow in D), while low tissue reflectivity such as cysts are confined to a single layer (red arrow in C).
In this article, we validate an algorithm that discriminates areas where the absence of flow signal is due to actual physiological processes associated with retinal disease rather than artefactual shadows. The algorithm is calibrated with manufactured shadows created by partially blocking the optical signal in the sample arm of the OCT instrument with opaque filaments of polylactic acid (PLA). We then found features of shadow pixels based on OCT reflectance as well as OCTA focal perfusion density and flow index in order to train an ensemble classifier that identified the normal from shadow pixels in the feature space of principal components. We validated the algorithm by scanning healthy subjects with progressively increasing signal attenuation using neutral density filters (NDF) between the eye and the instrument. Since NDFs were manufactured using a Schott glass substrate that reduces the intensity reaching the retina by different optical densities, their effect on signal strength can simulate that of cataracts attenuating light by multiple scattering in the nucleus of the crystalline lens [14]. We also tested the algorithm on healthy subjects with natural floater shadows and pupil vignetting, as well as on patients with diabetic retinopathy (DR), uveitis, age-related macular degeneration (AMD) and glaucoma.

Data acquisition
Subjects were scanned with a commercial, 840-nm-wavelength, 70-kHz spectral-domain OCT system (Avanti RTVue-XR, Optovue Inc.) using AngioVue 3 × 3 and 6 × 6 mm 2 OCTA scan patterns. Tracking was activated to reduce motion artifacts [9]. The 3 × 3 mm 2 scans contained volumetric data at 304 x 304 A-lines. The 6 × 6 mm 2 scans used the AngioVue high-definition (HD) format, which contains 400 x 400 A-lines. Flow signal was generated by the split-spectrum amplitude-decorrelation (SSADA) algorithm [1,15] from two repeated Bscans at each lateral position. An orthogonal registration algorithm was used to merge two raster scans -one with horizontal-priority and one with vertical-priority. This algorithm was originally developed by MIT [16], and implemented by Optovue as their proprietary Motion Correction Technology (MCT) software. The merged volumetric OCTA scan contain both structural (reflectance) and angiographic (flow) data that is further analyzed. The merged volume will be referred to as a "scan" in the rest of this article.
Eight scans of varying signal strength were obtained from one eye of each healthy subject. A first scan was acquired under optimal imaging conditions. Then six increasingly attenuated scans were acquired by placing different combinations of NDFs between the eye and the scanner, achieving various degrees of global attenuation with local effects in the OCTA signal retrieved. No physical compensation of the dispersion mismatch introduced by the glass could be done in the reference arm of the commercial OCT system, thus relying on the automatic numerical compensation by AngioVue's software. A final unattenuated scan was acquired for repeatability assessment.
Scans with manufactured shadows were obtained from one eye of ten healthy subjects. Two scans were first obtained under optimized imaging conditions from each eye. Then a scan with a focal shadow was obtained from each eye. The shadow was produced by placing a filament of PLA between the eye and the scanning optics in the sample arm of the instrument, avoiding the foveal avascular zone.
Scans were also obtained from clinical research participants with known eye conditions. Two scans were obtained from one eye of these subjects. All participants were recruited from the Casey Eye Institute at the Oregon Health & Science University (OHSU). These scans may contain focal shadows, but must pass quality assessment to assure good focus, no excessive motion artifacts, and Q-score of at least 6 as assessed by AngioVue software version 2017.1.0.151. The protocol was approved by the Institutional Review Board/Ethics Committee of OHSU and the research adhered to the tenants of the Declaration of Helsinki.

Considerations on discrimination of flow vs. background signal in OCTA
OCTA algorithms detect flow signal at each voxel ( , , ) x y z by computing motion-associated changes of the OCT reflectance signal expressed as 0 ( , , ; ) in MB-scans of the same tissue section [17,18]. One early approach to tackle this task was to compute the variance of the phase Φ [19][20][21][22] or the speckle amplitude 0 A [23,24] to gain contrast between static tissue and flow voxels (with high signal variance). However, as OCTA developed, these algorithms had to adapt to two major problems.
The first problem was that speckle variance increased with reflectance signal strength [25,26], thus yielding larger flow signal in tissue layers with strong reflectivity, as well as blood vessels. To highlight flow and reduce the influence of signal strength and tissue reflectivity, normalization was needed. One way to normalize signal strength is to divide speckle variance by the summation of the signal strengths squared, yielding a quantity called decorrelation (Eq. (1). Alternatively, the ratio between sequential signal amplitude could be evaluated, which was equivalent to taking the variance of logarithmic amplitude [25,27] rather than the linear amplitude. Mathematically, all of these quantities -decorrelation, amplitude ratio, and phase variance -are measures of variation nominally unaffected by the average reflectance amplitude.
However, all of these OCTA algorithms still needed to take steps to eliminate the contribution from noise. Since a series of pure noise is maximally decorrelated, voxels where noise predominate over signal could be mistaken as flow voxels. For amplitude-based algorithms such as split-spectrum amplitude decorrelation angiography (SSADA) [28,29], a floor could be placed on the OCT signal amplitude so that voxels with very low signal also have very low decorrelation and logarithmic variance. For phase-based algorithms, the phase could be excluded from analysis if the magnitude falls below a threshold. Unfortunately, the noise-filtering step re-introduced a signal strength dependence to quantification of metrics with clinical utility derived from flow signal. As reflectance signal drops, both flow signal and noise are increasingly filtered out. We have found empirically that the vessel densitymeasured as the percentage of vascular pixels -scales approximately linearly with the logarithm of reflectance signal amplitude. This dependence could be reduced using a slabbased compensation algorithm [11] or regression-based bulk-motion subtraction algorithm (rb-BMS) [12] over a wide range of signal strengths. In rb-BMS we have characterized the component of flow signal due to bulk motion and subtract it from OCTA data to obtain cleaned flow signal that is more purely associated with blood flow. This algorithm discriminates vascular from avascular voxels after accounting for reflectance and bulk motion. However, there comes a point when the signal-to-noise ratio is too low for these compensation methods to work. This generally occurs in shadow regions, where the OCT beam is blocked by the iris (pupil edge) or other media opacities (vitreous floaters, cataracts). The shadow detection algorithm we propose here identifies these regions and removes them from further analysis so that errors are not introduced into the evaluation of valid regions.

Pre-processing
Retinal layer interfaces were segmented from reflectance OCT B-scans by a directional graph search method [30] incorporated in the COOL ART OCTA signal processing tool developed at the Center for Ophthalmic Optics & Lasers (COOL) lab ( Fig. 2(A)). The superficial vascular complex (SVC) was defined between the ILM and 80% of the ganglion cell complex, and its maximum projection along the depth axis allowed en face visualization of the superficial retinal flow. The inner retina was defined between the ILM and the outer boundary of the outer plexiform layer (OPL). The data in the inner and outer retina adding the choriocapillaris slabs were used in the thresholding scheme discussed as follows.
The thresholding method used in the rb-BMS algorithm was applied to remove noise pixels in the avascular regions while preserving the vascular ones ( Fig. 2 (B)). Since the scans had been already merged by Optovue's registration software, the method in Ref [12]. was adapted to the data received after MCT processing. Briefly, the relationship between reflectance R and bulk motion decorrelation signal D BM was calculated for the pixels contained in avascular A-lines between ILM and Bruch's membrane in both the horizontal and vertical priorities. Regression analysis in this step produced an estimate of the slope m, the intercept n and the RMS of the residual Re s of the fitting data from the fitted curve [12]. A threshold T (Eq. (2)) was then imposed on each voxel of the three-dimensional flow signal data to remove background signal leaving only true flow signal and their projection artifacts. ( , , ) ( , , ) 2 Re RMS T x y z mR x y z n s = + + × A new en avascular A-l used as back accurate appr repeated itera until the pe plateau [31].
All signal MA, USA).
where the mean projections of logarithmic reflectance scan R in both the inner (I, ILM to OPL) and the outer (O, outer retina + choriocapillaris (CC)) slabs were first normalized to the position-dependent averaged reflectance maps of the same two slabs in the healthy population ( control R ) and . Then, the maximum value of the two normalized projections was used at each position to generate norm R (Fig. 3(C1-C5)). In addition to the map norm R , an additional feature map was generated from the reflectance image by finding the standard deviation along the axial direction for a slab that included the retina and choriocapillaris (Fig. 4). This feature exploits the large variance that exists in the reflectance of retinal layers even in the presence of pathologies (e.g. Figure 3(B3, B4, and B5)), as opposed to the tissue under shadows (e.g. Figure 3(B2)) where all layers are attenuated. A map of the averaged standard deviation in the control group   We then turned to the OCTA image to derive additional features useful in the pixel classification task. Since the OCT and OCTA images are both produced from the same optical signal, they are perfectly registered and we could further associate the position of dark areas in norm R and _ std norm R with areas of OCTA flow signal loss. Two additional features were associated with shadows in OCTA. First, the average decorrelation value of the inner retinal slab was calculated in areas of 9 × 9 pixels, defining focal FI (Fig. 5). Shadows increasingly cause filtering out of voxels with low reflectance, affecting the local flow index. The local FI maps were also normalized to the reference ( , ) control FI x y of normal subjects by Eq. (4), where ( , , ) D x y z is the flow signal, z represents average over the axial dimension ( z ∈ ILM: OPL) and ( , ) x y ϖ is a 3 × 3-pixel moving average window centered at position ( , ) x y . to an ensemble classifier that segmented the shadow area. The supervised machine learning method needed a labeled training data set. The training data set consisted of two groups; one composed by healthy subject scans containing manufactured shadows and the other by DR scans without vitreous floaters or vignetting. Shadows appearing naturally in either healthy or diseased eyes were not used for training owing to unreliable manual assignment of labels, which will be discussed further in section 2.5. The first group forming the training set contained the ten scans of healthy eyes with manufactured shadows of different severities (Fig. 6). The second group consisted of 17 scans of one eye of DR subjects. This group was included in the training set with the purpose of preventing the detection of avascular areas with inherently low focal flow index and typically lower reflectance than young, healthy subjects. It should be noted that this inclusion increased the class imbalance to approximately 9-to-1, a problem that was alleviated by choosing a random-undersampling (RUS) boost forest modality. The size of the training data set was 2.5 × 10 6 vectors in feature space  3 . Principal component analysis (PCA) was used to investigate the feasibility of dimensionality reduction. The expressed variances were sufficiently high (66.8%, 26.8% and 6.4%) after PCA to justify the need of all dimensions in the classification routine.

Generation of training labels
To avoid the subjectivity inherent to manual grading of shadow positions in clinical scans such as Figs. 1(A), 4(A) and 5(A), the following method was designed to label the positions of the shadows on the healthy subject scans in Fig. 6. Focal vessel density maps focal VD were generated by calculating the percentage of vascular pixels in areas of 11 × 11 pixels. Rigidbody registration was applied on scans corresponding to the same eye to overlap the center of their FAZ. Images of right eyes were flipped before averaging in order to overlap nasal and temporal sides with equivalent local density and reflectance characteristics of left eyes. From the three scans available per subject (Fig. 7(A-C)) focal VD Δ was found for the two scans acquired under optimal conditions (Fig. 7(A-B)) as well as between an optimal scan and a manufactured shadow (Fig. 7(B-C)). For each subject, a lower threshold was set on the shadowed scan at two standard deviations of below threshold in the manufactured shadows were labeled with a value of robust than manually drawing the approximate boundaries of shadows and normal areas in Fig. 6 based on the subjective perception of a human grader. There was good contrast between shadow and non-shadowed regions for all three features forming the training set ( Fig. 7(D-O)). Once the classes were assigned ( Fig. 7(P)), the RUS boost classifier with 100 decision trees was trained at a learning rate of 0.05. Finally, a morphological opening operation was applied to remove areas smaller than 37 connected pixels, which is the mean normal intervascular space outside the FAZ.

Software validation
Evaluating the software performance on scans with clinical shadows is difficult because human graders cannot confidently extract its boundaries from en face images. First, as expressed above, other structures related to pathologies can contribute to darkness in the projection of reflectance and/or absence of vasculature in the projection of flow. For a human expert to generate an accurate ground truth that separates real shadows from retinal degeneration they would need to grade hundreds of reflectance B-scans per volumetric scan, while simultaneously examining those positions on en face projections of OCTA signal, which is not feasible and remains subjective. Second, as noted in Eqs. (3) and (4), the definition of shadows proposed here includes a normalization to the mean projection of a population of healthy subjects. Therefore, its classification only depends on pixel characteristics and not on a contrast between the features of pixels on both sides of the boundary. This means that in principle, in a scan significantly below the required minimum quality index (e.g. a patient with severe cataracts), the entire area could be potentially detected as a shadow, independently of whether floaters and vignetting exist or not. These cases should correspond to SSI values typically recommended for scan exclusion (SSI < 55). Thus, comparison of software performance with manual grading by two experts in OCTA analysis was performed on clinical shadows of healthy subjects only, which are generally bright scans with good contrast between localized shadows and neighboring areas (e.g. Figure  3 A2-C2)).
In addition, the software was applied on the data acquired from the NDF experiment described in section 2.1. Because scans in this experiment were acquired by attenuating the optical signal in the sample arm, some OCTA signal should be irretrievable and result in reduced apparent vessel density (percentage of vascular pixels in en face images). We evaluated whether excluding the FAZ and the regions detected as shadows would make the vessel density of these scans independent of SSI.

Results
The algorithm was tested on a separate set of 10 healthy subjects not used in the generation of normalizing control maps. The algorithm was also run on five subjects with uveitis, five subjects with DR and one subject with AMD showing shadowed areas. In addition, we included three subjects with AMD and four subjects with glaucoma that did not show vitreous floaters with the purpose of evaluating whether retinal atrophies would cause erroneously detected shadows.
The accuracy of the RUS boost ensemble in the manufactured shadow data set was 99.1%, the sensitivity was 93.0% and the specificity was 99.0%, evaluated by 5-fold cross-validation. For the group of clinical shadow scans the sensitivity and specificity of pixel-wise classification were 91.6% and 86.9%, taking the manual segmentation of one of the expert graders as ground truth. The other expert grader performed with a sensitivity of 87.2% and a specificity of 93.3% with respect to the same reference.

Performance on healthy subjects
The pre-processing step of vascular vs background pixel discrimination by rb-BMS successfully compensated for the dependence on reflectance on the two scans taken under optimal imaging conditions (without NDF) from healthy subjects (Fig. 8(A)). The vessel density was independent from SSI (Pearson's r = 0.0669, p = 0.77). The repeatability between two scans on the same eye was 1.67%, evaluated by the pooled standard deviation. The mean VD was 51.4% and the standard deviation of the group was 3.6%. Noticeably, rb-BMS was unable to maintain the independence from SSI (r = 0.5220, p<0.01) when part of the OCTA signal was irretrievable in scans with optical signal artificially attenuated by various combinations of NDFs (Fig. 8(B)). Then, by applying our shadow exclusion algorithm we were able to retrieve areas where perfusion analysis could be considered reliable, demonstrated by the significantly reduced dependence of VD on SSI (Fig. 8(C), r = 0.1741, p = 0.14) and a similar VD distribution (mean = 50.7%, standard deviation = 3.5%) with respect to the data acquired without NDFs (Fig. 8(A)). The area of manufactured shadows formed by increasingly higher attenuation of the optical signal with NDFs was inversely proportional to the SSI (Fig. 8(D)). Fig. 8. Performance of the algorithm on 3 × 3 mm 2 scans of 10 healthy subjects acquired by intentionally reducing the signal strength with different combinations of neutral density filters (NDF) placed between the eye and the instrument. (A) Shows that the vessel density of the scans acquired without NDF is independent from signal strength index (SSI) after being processed by the reflectance-adjusted thresholding scheme in the regression-based bulk motion subtraction (rb-BMS) algorithm. (B) Shows the vessel density of all scans acquired in this experiment, demonstrating that rb-BMS is not able to retrieve all signal after a certain level of attenuation. (C) is the vessel density of all scans in (B) by excluding the areas detected with the shadow segmentation algorithm. Note that by only considering the areas with reliable OCTA signal for quantification, the vessel density was again independent from SSI. (D) Inverse linear relationship between shadow area and SSI in the NDF attenuation experiment, R = −0.67, p<0.01.
Floaters cast by vitreous shadows and affecting clear visualization of vasculature were detected successfully on 3 × 3 and 6 × 6 mm 2 scans of three of the 10 healthy subjects in the test set (one representative case in Fig. 9). En face OCT angiograms showed intact retinal vasculature after the subject had their floaters removed in a vitrectomy procedure ( Fig. 9(C1-C2)). The corners of the 6 × 6 mm 2 scan were still affected by vignetting ( Fig. 9(C2)). Fig. 9. Shadows from vitreous floaters on 3 × 3 mm 2 (A1-B1) and 6 × 6 mm 2 (A2-B2) macular OCTA scans of a healthy subject. Yellow areas overlapped onto en face projections of the superficial vascular complex represent the shadowed areas automatically detected by the algorithm. (C1-C2) represent 3 × 3 mm 2 and 6 × 6 mm 2 OCTA of the same subject after having the floaters removed in a vitrectomy. Floaters disappeared, revealing the intact vascular network on the superficial vascular complex. The vignette corner area in (C2) is due to partial blockage of the optical signal by the pupil.

Performance on DR
Diabetic retinopathy patients can develop the same type of floaters that appear from normal aging but can also show additional optical signal absorption in the vitreous caused by hemorrhage from neovascular vessels in the proliferative stage of the disease. OCTA from five of the DR subjects recruited exhibited shadows from vitreous floaters in macular window of 3 × 3 mm 2 along with real avascular areas adjacent to them (Fig. 10). These vitreous shadows were successfully detected by the algorithm. White arrows represent non-shadowed areas with intra-retinal fluid, whereas blue arrows represents shadowed areas. The third column represents the shadow area detected by the algorithm (yellow), overlaid on the en face OCT angiogram. Regions with apparent loss of perfusion outside the yellow area can be confidently measured as avascular areas.

Performance on uveitis
Uveitis is an inflammatory disease affecting the uvea, which comprises the iris, the ciliary body and the choroid. It can be caused by infectious, autoimmune or systemic diseases, or it could have unknown causes (white-dot syndrome). Uveitis can affect one or all of these ocular structures, but only intermediate uveitis and pan-uveitis cause inflammation of the cells in the vitreous humor, thereby creating floaters. Owing to the high prevalence of floaters, it is important in uveitis to distinguish what areas with apparent loss of perfusion represent actual capillary loss and what areas are shadows. Vitreous shadows were identified on five of the 24 subjects with uveitis participating in this study. Our algorithm proposed herein succeeded in detecting both vitreous floater shadows and vignetting in uveitis (Fig.  11). Fig. 11. Areas of vitreous floater shadows detected on two uveitis subjects. En face angiograms and OCT reflectance represent an area of 6 × 6 mm 2 projected over the superficial vascular complex (SVC). Blue arrows represent areas with apparent loss of perfusion that were caused by shadows from either vitreous floaters (subjects 1 and 2) or pupil vignetting (subject 2) and were successfully detected by the algorithm. Green arrows represent vitreous floaters that cast shadows on the reflectance projection but did not affect the angiograms and hence, were not detected. Loss of perfusion on the upper-left corner of the angiogram of subject 1 was not caused by corner vignetting and was not detected by the algorithm.

Performance on AMD
Another disease in which shadow artifacts are very common is AMD because patients are elderly subjects. The high prevalence of drusen and RPE atrophies in AMD poses a special challenge to the current algorithm. In these structures, the projected reflectance values would be low due to soft drusen, pigment epithelium detachment or atrophy of the RPE layer. In Fig.  12, we demonstrate that the current algorithm was robust to the peculiarities of AMD, as it was able to detect shadows successfully in scans with drusen and in areas surrounded by RPE dystrophy.

Effect of MCT registration on shadows
As mentioned above, the angiographic image produced by the AngioVue instrument is generated by MCT, a software that performs the 3D registration and merging of two separate OCTA images acquired in the horizontal and vertical priority directions. While the purpose of MCT is to remove bright lines caused by microsaccadic eye motion during scanning, a side advantage is the retrieval of some OCTA data missing underneath anterior opacities (Fig. 13). Vitreous floaters moved between the x-priority and y-priority scans owing to blinks and saccades, evidenced by the duplicated appearance of their shadows in the en face OCT image after MCT. Some OCT and OCTA signal lost in one scan (either x-fast or y-fast) could consequently be retrieved from the other if shadows did not overlap between the two scans.

Discussion and conclusions
In the past years, numerous clinical trials have started to exploit the potential of OCTA in detecting early changes in the diseased retina. These clinical trials rely greatly on the possibility of quantifying retinal perfusion changes by metrics such as avascular area, vessel density, flow index, FAZ acircularity, fractal dimension, among others. Artefactual shadows could obviously affect the interpretation of OCTA quantification, resulting in false diagnosis of perfusion defects or reduced capillary density. Since the flow signal cannot be computed on shadow regions, there is no way to compensate this effect; thus, these regions should be objectively detected and excluded from the quantitative measurements.
We have proposed an algorithm to detect shadows cast by vitreous floaters or pupil vignetting onto OCTA of the retina and thereby causing artefactual appearance of perfusion loss. This shadow detection algorithm is most valuable when used in conjunction with rb-BMS algorithm, which recovers vessel information in areas where shadows are not too severe. It would improve the confidence with which OCTA could be used to diagnose and evaluate a wide variety of diseases that affect the retinal circulation in the general population such as DR, AMD, glaucoma or inflammatory diseases such as uveitis. This is important as the older patient who might have these diseases also often have cataracts, vitreous opacities, small pupil, dry eye -conditions that could produce shadow artifacts that confound the real perfusion loss on OCTA in retinal and optic nerve diseases.
Our software relies on detecting the areas where shadows overlap on OCT reflectance and OCTA signals. The OCT reflectance features selected here allowed tracking areas that are dark at all retinal depths, which is rarely a manifestation of pathologies and an essential attribute of shadows. It thus helped to make the software robust to different types of retinal degenerations. They were successful in cases where the disease attacked the ganglion cell complex such as glaucoma (Fig. 14(A1-D1)) as well as in those where the outer retina and choriocapillaris are compromised, such as AMD (Fig. 14 (A2-D2)). In addition to floaters and vignetting, cataracts are also a significant source of signal loss in the aging population. The NDF experiment is a simulation of the effect of cataracts on signal quality. We observed that valid areas used for vessel density measurement decreased along with the increase of the signal attenuation. This can be explained by the progressive loss of flow signal in the voxels with very low reflectance. Since all OCTA algorithms necessarily impose a reflectance threshold before generating the flow signal, the signal loss in the NDF experiment could not be entirely retrieved by rb-BMS. In cases of extreme attenuation, only the faster flow (higher decorrelation values in the nasal side of the scan) could be retrieved. Although some signal appeared to be reliable in those extreme cases, if the area excluded was too big, the analytic area might not be enough to draw useful information from the scan and it should be discarded entirely. Our results in Fig. 8(D) seem to agree with the generally accepted signal strength standard using the SSI metric.
One limitation of the method's evaluation was the small number of subjects participating in it. Only three healthy subjects with natural floater shadows could be recruited. A second limitation was that vignetting artifacts at the corner of OCTA images were very rare in 3 × 3 mm 2 scans and only vitreous floater shadows could be studied within this field of view.
In summary, we have developed an algorithm to detect shadowed areas by anterior opacities in OCTA of the retina. The software showed good performance on 3 × 3 and 6 × 6 mm 2 scans of healthy, DR, AMD and uveitis cases by objectively identify shadows from vitreous floaters as well as pupil vignetting. Although these artifacts are very difficult to prevent in clinic, this software can be potentially useful to improve the reliability of OCTA parameters by excluding shadow areas from the analysis. As the field of view available for OCTA increases over time, these shadow artifacts are expected to become more prevalent in en face images and their detection and subsequent exclusion should become even more critical.

Funding
This work was supported by grants R01EY027833, DP3 DK104397, R01 EY024544, P30 EY010572 from the National Institutes of Health (Bethesda, MD) and an unrestricted departmental funding grant and William & Mary Greve Special Scholar Award from Research to Prevent Blindness (New York, NY).