Semi-automated algorithm using directional filter for the precise quantification of non-perfusion area on widefield swept-source optical coherence tomography angiograms
Original Article

Semi-automated algorithm using directional filter for the precise quantification of non-perfusion area on widefield swept-source optical coherence tomography angiograms

Itika Garg1,2^, John B. Miller1,2^

1Retina Service, Massachusetts Eye and Ear, Department of Ophthalmology, Harvard Medical School, Boston, MA, USA; 2Harvard Retinal Imaging Lab, Boston, MA, USA

Contributions: (I) Conception and design: Both authors; (II) Administrative support: JB Miller; (III) Provision of study materials or patients: JB Miller; (IV) Collection and assembly of data: I Garg; (V) Data analysis and interpretation: I Garg; (VI) Manuscript writing: Both authors; (VII) Final approval of manuscript: Both authors.

^ORCID: Itika Garg, 0000-0002-9537-8561; John B. Miller, 0000-0003-0109-9738.

Correspondence to: John B. Miller, MD. Retina Service Massachusetts Eye and Ear, Department of Ophthalmology, Harvard Medical School, Harvard Retinal Imaging Lab, 243 Charles St., Boston, MA 02114, USA. Email:

Background: The clinical application of optical coherence tomography angiography (OCTA) has been well documented in literature with its promising potential in dye-less evaluation of various retinal vascular pathologies. Recent advances in OCTA help us gather wider field of view with 12 mm × 12 mm and montage compared to the standard dye-based scans, which has a higher accuracy and sensitivity in detection of peripheral pathologies. The aim of this study is to build a semi-automated algorithm to precisely quantify the non-perfusion areas (NPAs) on widefield swept-source optical coherence tomography angiography (WF SS-OCTA).

Methods: All subjects underwent imaging on 100 kHz SS-OCTA device acquiring 12 mm × 12 mm angiograms centered on fovea and optic disc. After a comprehensive literature review, a novel algorithm using FIJI (ImageJ) was designed to calculate the NPAs (mm2) after excluding the threshold and segmentation artifact areas from the total field of view. Segmentation and threshold artifacts were first removed from enface structure images using the spatial variance and mean filter respectively. Vessel enhancement was achieved by using ‘Subtract Background’ followed by directional filter. The cut off for Huang’s fuzzy black and white thresholding was defined from the pixel values based of the foveal avascular zone. Then, the NPAs were calculated using the ‘Analyze Particles’ command with a minimum size of ~0.15 mm2. Finally, the artifact area was subtracted from to give the corrected NPAs.

Results: Our cohort had 44 eyes of 30 control patients and 107 eyes of 73 patients with diabetes mellitus (both median age 55 years, P=0.89). Of 107 eyes, 21 eyes had no evidence of diabetic retinopathy (DR), 50 eyes had non-proliferative DR and 36 eyes had proliferative DR. The median NPA was 0.20 (0.07–0.40) in controls, 0.28 (0.12–0.72) in no DR, 5.54 (3.12–9.10) in non-proliferative DR and 13.38 (8.73–26.32) in proliferative DR eyes. Using mixed effects-multiple linear regression analysis adjusting for age, there was significant progressive increase in NPA with increasing DR severity.

Conclusions: This is one of the first study to use the directional filter for WFSS-OCTA image processing which is known to be superior to other Hessian based multiscale, linear, and non-linear filters especially for vascular analysis. Our method could greatly refine and streamline the calculation of signal void area proportion, while being much quicker and accurate than manual delineation of NPAs and subsequent estimation. This combined with the wide field of view can have a great prognostic and diagnostic clinical impact for future applications in DR and other ischemic retinal pathologies.

Keywords: Widefield swept-source optical coherence tomography angiography (WF SS-OCTA); non-perfusion areas; diabetic retinopathy (DR); ImageJ algorithm; directional filter

Submitted Dec 05, 2021. Accepted for publication Mar 07, 2023. Published online Mar 20, 2023.

doi: 10.21037/qims-21-1175


Diabetic retinopathy (DR) remains the leading cause of new-onset blindness and visual impairment in working aged adults (20–64 years) (1). It is a chronic and progressive microangiopathic disease which is the most common microvascular complication of diabetes mellitus. Approximately one-third of people with diabetes mellitus (DM) have some form of DR and nearly one in ten have vision threatening DR including proliferative DR (PDR) and diabetic macular edema (DME) (2). Chronic hyperglycemia in DM patients forms the basis of vascular endothelial dysfunction and resultant retinal capillary dropout (3). The resultant retinal ischemia is associated with visual function and can serve as a predictor for DR disease progression. Imaging modalities measuring retinal capillary nonperfusion area (NPA) have been used as a surrogate marker for retinal ischemia and are hence important for DR diagnosis and management (4,5).

Fluorescein angiography (FA) has been used as a method of identification of retinal non-perfusion. However, it is invasive, time consuming, and associated with adverse effects. Also, FA is not sensitive in identifying early changes of DR (6). More recently, the clinical application of optical coherence tomography angiography (OCTA) has been well documented in literature, with its promising potential in dye-less evaluation of various retinal vascular pathologies (7-9). Recent advances in OCTA help in acquiring a wider field of view with 12 mm × 12 mm and montage scan sizes compared to the standard dye-based scans, and hence has a higher accuracy and sensitivity in detection of posterior pole pathologies (10). Despite this advantage, widefield swept-source OCTA (WF SS-OCTA) has certain additional technical challenges that need to be addressed. The wider field of view makes it more prone to artifacts. Also, normative intercapillary space varies significantly between optic disc and the posterior pole (11).

Until now, of studies calculating NPA for quantitative analyses, only very few reports discuss the methodology involved in calculating NPA on WF SS-OCTA (12-16). Of the studies that describe a semi-automated approach, the steps to remove artifacts are not clearly described. Alibhai et al. quantified NPA in WF SS-OCTA using MATLAB software. They employ a texture-based approach using the average spatial variance derived from three different sized sliding square kernels, to define the cut-off for thresholding addressing the variations in OCTA signal with NPA regions. However, this method involves manual estimation of artifacts and requires graders to quality check images before the final NPA calculation (12). With the lack of studies describing NPA calculation comprehensively, there is no consensus on the most accurate method of NPA estimation in WF SS-OCTA imaging. In addition, few reports only describe manual estimation of NPA areas in OCTA (15,16). Also, the use of various visual filtering systems and their advantages are still debated in OCTA imaging (17,18). To better evaluate this, over the last 5 years, deep learning has also been investigated to delineate the true NPA area in such scans (8,11,19-21).

The aim of this study is to devise an easy-to-use and reproducible semi-automated algorithm to calculate the precise percentage of non-perfusion areas (NPAs) in wide-field OCTA scans. In our algorithm, we maintain an emphasis on automating most of the steps, and to develop a macro for the entire algorithm to improve efficiency while maintaining the accuracy of NPA estimation. We present the following article in accordance with the MDAR reporting checklist (22) (available at


Patient selection

This study includes data from a prospectively collected database of patients with diabetes mellitus who presented to the Retina service at Massachusetts Eye and Ear Infirmary, Boston, MA between December 2018 to October 2021. This study was approved by the institutional review board of Massachusetts Eye and Ear (No. 2019P001863). A detailed written informed consent was obtained from all subjects. All procedures adhered to the tenets of the Declaration of Helsinki (as revised in 2013) and Health Insurance Portability and Accountability Act regulations.

We included patients between 18 and 90 years of age, with a clinical diagnosis of type 1 or type 2 diabetes mellitus, and eyes falling into any of the following two groups: non-proliferative DR (NPDR) or PDR. Exclusion criteria included visual acuity <20/200, coexisting ocular diseases (e.g., macular edema, glaucoma, vasculitis, vascular occlusion, retinal dystrophies, trauma, age-related macular degeneration, corneal dystrophies, more than 6D of myopia, etc.) that could potentially confound the retinal assessment, severe media opacities that interfere with image acquisition, and images with poor quality (signal strength ≤7 using the default settings of the instrument).

Imaging protocol

All subjects underwent a complete ophthalmic examination including Snellen’s best corrected visual acuity (BCVA), a slit-lamp examination, intraocular pressure measurement, and a dilated fundus examination along with SPECTRALIS® OCT2 B-scan (Heidelberg Engineering) and color fundus photo (Optos). Additionally, they were imaged with a 100 kHz Swept-Source OCTA (SS-OCTA) imaging instrument (PLEX® Elite 9000, Carl Zeiss Meditech Inc., Dublin, CA) that uses a tunable laser with a center wavelength between 1,040 nm and 1,060 nm with a bandwidth of 100 nm, along with an axial resolution of 6.3 µm, ~20 µm lateral resolution, and an A-scan depth of 3 mm or 6 mm in tissue (depending on scan pattern). 12 mm × 12 mm angiograms centered at fovea and optic disc were acquired by trained ophthalmic photographers and fellows with minimal motion artifacts.

Image processing and analysis

Using the default automatic segmentation, superficial en face OCTA angiograms were used for this study. A thorough literature search using PubMed, Cochrane Library, and EMBASE database, was done in fields of artifact detection and removal in OCTA, noise reduction, morphological filters, techniques of thresholding and binarization, measurement tools and various image manipulation functions of the software FIJI (an expanded version of ImageJ: 2.0.0-rc-69/1.52p; National Institute of Health, Maryland, USA) (23). The scope of literature included all studies ranging from manual to automated and deep learning detection of various retinal pathologies. NPA estimation on WF SS-OCTA was broken down into three parts: (I) artifact estimation, (II) noise removal and improved visualization of retinal vascular networks, and (III) NPA estimation.

Low-OCTA-signal artifact estimation

With increasing fields of view in WF SS-OCTA, there is an increased possibility of low-OCT-signal artifacts (24). There are numerous causes for low-OCTA-signaling in smaller fields of view, including ocular and system aberrations, backscattering, signal run-off, retina out of focus, secondary eye conditions that scatter or absorb the OCTA beam (e.g., cataract, vitreous opacities, etc.), vascular shadowing, and retinal pigment epithelium (25). However, with wider fields of view, vignetting predominates as a cause for low signaling, due to block of incident OCT beam partially or completely by the iris. This is caused due to malalignment between instrument and eye. Such low OCT signals cause either thresholding or segmentation artifacts. Thresholding is due to low signals directly resulting in invalid OCTA data. Low OCT signals can lead to reduced contrast between different retinal layers and resultant segmentation errors can cause artifacts (24).

De Pretto et al. described three methods of calculating these artifacts, namely cross-sectional approach, en face approach and orthoplane approach (24). Cross-sectional approach uses individual b-scans and en face methods comprises using structural en face projections of OCTA data to identify low signal areas. Orthoplane method uses a combination of both. We utilized the en face approach for artifact estimation, as it is quicker than the cross-sectional and combined approaches, because it incorporates a summary of the entire volume of data in a single en face structural image.

The default resolution of the OCTA image is 1,024×1,024 pixels (Figure 1A). The structural en face OCT image is first adjusted to a standard size of 1,024 pixels (width) by 1,024 pixels (height, Figure 1B) and then duplicated. This image is used to calculate segmentation artifacts using spatial variance mask, with a mean radius of 9 pixels (24) (Figure 1C). Then, the image is binarized using empirical minimum thresholding from quantitative observations of a single grader (Figure 1D,1E). Similarly, the second image is filtered by mean filter of 3×3 pixel radius (24) (Figure 1F) followed by thresholding with dark background to the average pixel value of the obvious artifacts (Figure 1G,1H). Finally, both artifact areas are combined into one artifact mask (Figure 1I) which will be used as an overlay on the OCTA image (Figure 1A) for true NPA calculation (Figure 1J).

Figure 1 Low OCTA signal artifact estimation. (A) Superficial en face OCT angiogram; (B) En face structural image is first converted to standard size of 1,024 pixels × 1,024 pixels, duplicated; (C) first image used for estimating segmentation artifacts using spatial variance filter and binarized (D,E) and added as a ROI mask, segmentation artifacts are also shown in (F) B-scan (red arrows) through the corresponding yellow line in image (D); (G) second image used for calculating thresholding artifacts using mean filter and binarized (H,I) and added as a mask similarly; (I,K) both ROI masks are combined using the “OR” function to create the final low signal artifact ROI. OCTA, optical coherence tomography angiography; ROI, region-of-interest.

Motion artifact reduction and improved visualization of retinal microvasculature

In WF SS-OCTA scanning protocols, OCTA motion artifacts degrade image quality, which prevents accurate quantitative estimation of NPA (26). Though averaging multiple OCTA images has shown to decrease this by removing background noise and enhancing vessel continuity (27-30), it is time consuming and requires repeated image acquisition from patients, which may not be efficient. As an alternative, a combination of background subtraction and local contrast enhancement using filters have been used successfully in OCTA imaging (31).

In this study, we first performed background subtraction on the OCTA image (Figure 2A) using the in-built rolling ball algorithm with a radius of 50×50 pixels (Figure 2B). Subsequently, morphological filtering to additionally remove unwanted pixel noise and highlight vessel features was performed. We compared the image outputs of various forms of filters including gaussian, top-hat, Frangi, and directional filters (all default parameters). Directional filtering (opening) was performed using MorphoLibJ Plugin (17,18,32-34) for ImageJ software (Figure 2C), available for download at the link The default settings were used (type: max, operation: median, line length: 20 pixels and direction number: 32).

Figure 2 Motion artifact reduction and improved visualization of retinal microvasculature and identification of NPAs. (A) OCTA image; (B) subtract background function to remove noise from OCTA image; (C) further vessel enhancement and noise removal using directional filter; (D) mean pixel value of three 25×25 pixel circles centered on FAZ to define threshold for NPA; (E) binarization of image using Huang’s thresholding; (F) analyze particle function to identify areas greater than 250 pixels (yellow outline); (G) NPA area calculated with artifacts (blue); (H) artifact area on OCTA image (red); (I) subtract artifact area from NPA area to identify true NPA area (blue). NPAs, non-perfusion areas; OCTA, optical coherence tomography angiography; FAZ, foveal avascular zone.

Identification of NPA areas

For NPA estimation, it is essential to set a threshold for delineating such regions. One previous report used three separate circles in the foveal avascular zone to establish the baseline signal-to-noise ratio for global thresholding (35). A similar study recommended 25×25 pixels for this estimation of threshold for NPA in the FAZ area for 12 mm × 12 mm sizes (36).

In this study, the global thresholding of the OCTA image was performed, taking all pixels below the threshold (mean pixel value of three circles of 25×25 pixel diameter in FAZ, Figure 2D) as non-perfusion areas (black) and all pixels above the threshold as retinal vasculature (white). The cut off for Huang’s fuzzy black and white thresholding was defined from the pixel values based of the FAZ. The image is then binarized, followed by automated quantitative estimation of the NPA using “analyze particles” function in ImageJ software (Figure 2E,2F). This command helps us in ‘counting’ feature on a binarized image i.e., containing values only 0 and 255. As shown in Figure 2F,2G, all non-perfusion areas with pixel value 255 are outlined by this command. To reduce OCTA noise capture, as per prior described algorithms, we only considered NPAs greater than a threshold of ~0.15 mm2 or 250 contiguous pixels (size threshold function of ‘Analyze Particles’). This is due to the fact that modern OCTA imaging has limited sampling density, with ~0.15 mm2 being the smallest estimable NPA area that can be accurately detected (12,24). Also, FAZ cannot be delineated from the non-perfusion areas and needs to be identified and removed from the final value or calculated separately as reported in our results. Some groups also prefer to retain FAZ in non-perfusion quantification because of difficulty in estimating the physiological FAZ from pathological enlargement of FAZ (12). Finally, the combined artifact mask was subtracted from the NPA area to calculate the final true NPA area (Figure 2H,2I). The commands were recorded in separate macros for automated processing of both artifacts and NPA (Supplemental material).

Using the above steps of our algorithm, we were able to accurately calculate NPA areas, after removing low signal and motion artifacts. We first removed the segmentation and threshold artifacts with the use of spatial variance and mean filter respectively on the en face structural scans obtained corresponding to the 12 mm × 12 mm Angio scans. The representative images with segmentation and thresholding artifacts are shown in Figure 1.

Next, background noise was reduced using the ‘subtract background’ function. Since various filters exist that can improve image quality, we employed the most used methods (Gaussian, Frangi vesselness, top hat), along with the novel directional filter (Figure 3). The various filters were clinically assessed by two graders (IG and JBM) to identify the most accurate method. The gaussian filter led to blurring of the vessels and underestimation of the NPA (denoted by red arrows in Figure 3A), whereas the top hat filter tended to remove additional areas with retinal vasculature, hence overestimating the NPA (roughly denoted by red circles in Figures 3C). The Frangi filter further modified vessel characteristics, leading to a segmented appearance of vessels, and erroneous overestimation of NPA (roughly denoted by red circles in Figure 3B). The directional filter seemed to be the most accurate method of estimation compared to other methods with preservation of vessel architecture up to capillary level irrespective of the contouring or direction of vasculature (Figure 3D).

Figure 3 Vessel enhancement and noise reduction using various filters: OCTA image preprocessed through various filters to reduce noise and enhance microvasculature characteristics. (A) Gaussian filter: missed numerous NPAs (red arrows); (B) Frangi vesselness filter: overestimated the NPAs (red circles); (C) top hat filter: overestimated NPAs (red circles); (D) directional filter: most accurate compared to other three filters in delineating NPAs and preserving vessel characteristics. OCTA, optical coherence tomography angiography; NPAs, non-perfusion areas.

Finally, applying Huang’s thresholding to estimate NPAs and after subtraction of low signal artifacts, true NPAs were calculated. The representative images from the cohort are shown in Figure 4.

Figure 4 Representative WF SS-OCTA images from cohort. Five patients with (A) en face structural images; (B) OCTA images; combined threshold and segmentation artifacts (red) superimposed on en face structural images (C); Gaussian filter (D); Frangi vesselness filter (E); top hat filter (F); and directional filter (G) applied to OCTA images; NPA estimated after preprocessing by directional filter (blue) with artifacts included (H); true NPA area (blue) after eliminating low signal artifacts from OCTA image (I). WF SS-OCTA, widefield swept-source optical coherence tomography angiography; NPA, non-perfusion area.

Statistical analysis

Statistical analysis was performed using R version 4.1.3 (R Foundation for Statistical Computing) (37). The level of significance was set to two-sided P value <0.05. The population demographics and ocular characteristics are expressed using standard descriptive methods. Mann-Whitney U test and Kruskal Wallis test were used for variables with non-normal distribution. Chi-square test with Yates’ correction (when applicable) were used to assess the level of significance for categorical variables. Mixed-effects multiple linear regression models fit by restricted maximum likelihood were used to account for the correlation between the two eyes from the same patients. NPA results presented here are from multivariate models adjusting for age (as a continuous linear variable).


The demographic and clinical characteristics are presented in Tables 1,2. We excluded all eyes with diabetic macular edema. Our cohort comprised of 151 eyes of 103 patients, of which 44 eyes of 30 patients from healthy controls. Among 107 eyes from 73 patients with a diagnosis of DM, 21 eyes had no evidence of DR. Of the 86 DR eyes, 50 eyes had NPDR, and 36 eyes had PDR. The NPA and FAZ area for different severity levels are summarized in Table 3. Adjusting for age, NPDR (β=7.74, P<0.001) and PDR (β=17.88, P<0.001) eyes had significantly more NPA measured on 12 mm × 12 mm angiograms relative to control eyes as well as to the previous stage (Table 3). There was no significant difference between controls and diabetic patients with no DR (β=1.71, P=0.51). Adjusting for age, only PDR (β=0.29, P<0.001) eyes had significantly more FAZ area than control eyes as well as to previous stage (Table 3). There was no significant difference between controls and no DR (β=0.08, P=0.24) nor NPDR (β=0.10, P=0.07) eyes.

Table 1

Demographic characteristics of study population

Study parameter Control (n=30) Patients with DM (n=73) P value
Age, years 55 (45 to 62) 55 (36 to 64) 0.89
Sex, female 10 (33.3) 37 (50.7) 0.17
Race 0.02*
   White 23 (76.6) 38 (52.1)
   Black 2 (6.7) 13 (17.8)
   Asian 1 (3.3) 9 (12.3)
   Hispanic 0 (0.0) 9 (12.3)
   Other# 2 (6.7) 1 (1.4)
   Declined 2 (6.7) 3 (4.1)
Smoking 0.84
   Never 16 (53.3) 41 (56.1)
   Former 8 (26.7) 22 (30.1)
   Current 1 (3.3) 5 (6.9)
   Unavailable 5 (16.7) 5 (6.9)
MABP, mmHg 97.7 (88.3 to 103.0) 95.3 (86.0 to 102.3) 0.72
BMI, kg/m2 25.4 (22.2 to 26.5) 29.0 (25.6 to 33.8) 0.002*
HbA1c, % 5.50 (5.35 to 5.60) 8.1 (7.0 to 9.7) <0.001*
Type of diabetes
   1 22 (30.1)
   2 51 (69.9)
Duration of DM, years 19 (10 to 27)
Received treatment with insulin 50 (68.5)

Data are represented as median (IQR) or n (%). *, signify P value <0.05. #, race, other: American Indian, Latino, Middle eastern, Puerto Rico, etc. , based on Mann Whitney U test or Pearson’s Chi-square test of association with Yates’ continuity correction, when applicable. IQR, interquartile range; MABP, mean arterial blood pressure; BMI, body mass index (calculated as weight in kilograms divided by the square of height in meters); HbA1c, glycosylated hemoglobin; DM, diabetes mellitus.

Table 2

Clinical characteristics of eyes, organized by study groups

Study parameter Control (n=44) No DR (n=21) NPDR (n=50) PDR (n=36) P value
IOP, mmHg 16.0 (14.0 to 17.3) 17.0 (15.0 to 19.0) 17.0 (14.3 to 19.0) 15.0 (14.0 to 17.0) 0.28
BCVA (logMAR) 0.00 (0.00 to 0.07); ~20/20 0.02 (0.00 to 0.04); ~20/20-1 0.02 (0.00 to 0.06); ~20/20-1 0.13 (0.04 to 0.27); ~20/25-1 <0.001*
Lens status <0.001*
   Pseudophakia 2 (4.55) 0 (0.0) 2 (4.0) 15 (41.7)
   Phakic 42 (95.45) 21 (100.0) 48 (96.0) 21 (58.3)
   Laterality, OD 25 (56.8) 12 (57.1) 27 (54.0) 23 (63.9) 0.84
Prior history of focal laser 0 (0.0) 3 (6.0) 3 (8.3) 0.43
Prior history of PRP 0 (0.0) 1 (2.0) 27 (75.0) <0.001*
Prior history of receiving anti-VEGF injection 0 (0.0) 5 (10.0) 15 (41.7) <0.001*
Number of anti-VEGF injections, if received 0 (0 to 0) 0 (0 to 1) <0.001*
Prior history of PPV 0 (0.0) 0 (0.0) 6 (16.7) 0.002*

Data are represented as median (IQR) or n (%). *, signify P value <0.05. , based on Kruskal Wallis test or Pearson’s Chi-square test of association with Yates’ continuity correction, when applicable. IQR, interquartile range; DR, diabetic retinopathy; NPDR, non-proliferative DR; PDR, proliferative DR; IOP, intraocular pressure; BCVA, best corrected visual acuity; logMAR, logarithm of minimum angle of resolution; PRP, pan-retinal photocoagulation; VEGF, vascular endothelial growth factor; PPV, pars plana vitrectomy.

Table 3

Mixed-effects multiple linear regression model results by study group, adjusted for age

Study Parameter Control (n=44), median (IQR) No DR (n=21) NPDR (n=50) PDR (n=36)
Median (IQR) vs. control, b (P value) Median (IQR) vs. control, b (P value) vs. no DR, b (P value) Median (IQR) vs. control, b (P value) vs. NPDR, b (P value)
NPA, mm2 0.20 (0.07 to 0.40) 0.28 (0.12 to 0.72) 1.71 (0.51) 5.54 (3.12 to 9.10) 7.74 (<0.001)* 6.03 (0.01)* 13.38 (8.73 to 26.32) 17.88 (<0.001)* 10.14 (<0.001)*
FAZ, mm2 0.26 (0.21 to 0.32) 0.33 (0.23 to 0.46) 0.08 (0.24) 0.33 (0.24 to 0.44) 0.10 (0.07) 0.02 (0.82) 0.43 (0.32 to 0.67) 0.29 (<0.001)* 0.19 (0.001)*

*, signify P value <0.05. IQR, interquartile range; DR, diabetic retinopathy; NPDR, non-proliferative DR; PDR, proliferative DR; NPA, non-perfusion area; FAZ, foveal avascular zone area.


OCTA has been shown to have significant potential in viewing and quantifying numerous vascular metrics. With more widespread use of 12 mm × 12 mm OCTA machines, there is a need for better algorithms to identify vessel metrics including NPA. We provide a novel algorithm using various previously published literature to identify a simple and reproducible semi-automated algorithm for estimation of NPA. To the best of our knowledge, this is the first approach that describes the directional filter for WFSS-OCTA image processing from PLEX® Elite 9000 device, which is known to be superior to other Hessian based multiscale, linear, and non-linear filters especially for vascular image analysis. Our method could greatly refine and streamline the calculation of signal void area proportion, while being much quicker than manual delineation of NPAs and subsequent estimation. Also, this can give better results for vascular parameters like vessel density, vessel skeletonized density, etc. Accurate estimation of WF SS-OCTA images can improve the prognostic and diagnostic value of the device and improve its usefulness as a biomarker for ischemic retinal pathologies.

To achieve an accurate reconstruction of the microcirculation, vessel enhancement is an important preprocessing step. In retinal imaging, numerous filtering methods have been used to reduce the noise and fragmentation of vessels. However limited data exists on the best system for widefield OCTA images with an overall larger resolution and field of view. Poli and Valli first described an algorithm based on a set of linear filters based on Gaussian kernels (38). Yan et al. used Laplacian filter with fuzzy logic as an alternative linear filtering technique, however, this method lacked in capturing the details of smaller sized capillaries (39). Non-linear anisotropic filtering has also been attempted, yet, lacked in detecting capillaries due to fixed scale analysis. Though this can be extended to multiple scales, the overall time required for estimating the same increases significantly (40-47). To better capture a large scale of vessel diameters, Hessian-based multiscale filters have been recently used. Here, the image is convolved with Gaussian filter at multiple scales and the Hessian matrix is analyzed at every pixel to determine the local shape of the structures of that pixel value. Such methods are susceptible to noise and cause discontinuity in the vessels due to suppression of vessel junctions (48-53). Eiho et al. and Zana et al. used morphological filter correction using erosion, dilation and top hat filters to enhance vessel characteristics (54,55). These methods have the disadvantage of not being able to reduce edge and sudden noise and were inherently less suited for capillaries (17). Morphological processing is based on mathematical morphology, where structural elements are added to images. Dilation and erosion are the main morphological operators. Two types of morphological processing algorithms commonly used include top hat and watershed transformation (56). Top-hat filter functions by subtracting the local background area by a morphology opening operation (erosion followed by dilation), thus enhancing the vessel characteristics. However, the main disadvantage of morphological based filters is that they do not take into consideration the cross-sectional shape of vessels. Also, using longer structuring elements may not be suitable for tortuous vessels (33).

To successfully image comparatively thin curvilinear vessels (e.g., retinal microvasculature), common filters may not function properly due to the minute size of the vessels. When using morphological filtering, even with small sized structural elements, the microvasculature might completely disappear. An alternative is to use a directional filter, with the ability of performing morphological operations for various orientations of the structuring element (57-59). To our knowledge, this is the one of the first applications of the direction filter for vessel enhancement in SS-OCTA imaging. In a study by Truc et al. in 2009 (17), Directional filter bank has shown to be better than other filters e.g., Frangi vesselness and Shikata based Hessian filters, for the preprocessing vessel enhancement step on X-ray angiograms, which precedes accurate vessel tree reconstruction. This is true especially for curvilinear structures like blood vessels, especially the retinal blood vessels with arboreal branching pattern. Due to the omni-directional nature of the directional filter, noise is considerably reduced. The decomposition-filtering-recombination of directional filters preserve junctions, and hence preserve characteristics of smaller vessel networks. It has been used in various forms of imaging including magnetic resonance angiography (60) and heart but has not been used widely for retinal images. Chlebiej et al. used elliptical directional elliptical filtering of spectral domain OCT angiography 3-D data sets using a combination of Gaussian, median, and directional filters at numerous sets of images at different axes, combining the output into a single 2-D output image (18). The authors mention that the use of this filter helps reduce the noise and fragmentation by finding the local orientation of vascular paths.

Hyperglycemia induced vascular endothelial damage resulting in capillary dropout is a pivotal mechanism of DR etiopathogenesis. Hence, NPA estimation and quantification is critical. WF SS-OCTA provides a safe, quick, and non-invasive way to measure them compared to dye-based angiography. Recent work from our group in a large cohort of DR eyes have demonstrated the significance of NPA in DR severity and prognostication, which was measured using the methodology described in this paper (61), along with potentially serving as an imaging biomarker for complications of PDR. Hence, the incorporation of this directional-filter based algorithm can lead to a reliable method for quantifying this clinically important metric and hence help in management of DR as well as other pathologies like retinal vein occlusion, retinal artery occlusion, sickle cell anemia, hypertensive retinopathy, etc. by serving as potential check points guiding intravitreal injections (anti VEGF or steroid) or laser photocoagulation. The incorporation of ischemia index as an output metric while imaging on WF SS-OCTA device will also help in patient education and longitudinal monitoring along with guiding clinical decisions.

Our study has certain notable limitations. Our algorithm captures artifacts, yet cannot distinguish retinal areas subjected to laser photocoagulation, which requires a human grader to distinguish NPAs from such areas. Even though threshold artifacts and other segmentation artifacts were addressed in our study, there are other artifacts we could not detect that could possibly affect NPA estimation. Due to the unavailability of the enface structural scans for montage angiograms, this might not be applicable to wider field montage OCTA images. Though we strived for a completely automated algorithm, the process described requires manual thresholding based on FAZ pixel value, as well as thresholding for artifacts. We used this algorithm only for the superficial retinal plexus. Although we attempted to reduce bias by using two graders to evaluate the algorithm, the process is subjective and could lead to some form of bias. We did not use objective criteria to compare the output of different filters for vessel enhancement, however it was clear from observation that directional filter was better at delineating vessels and calculating NPA in WF SS-OCTA.

To conclude, we describe a comprehensive and easily reproducible algorithm to calculate NPA in WF SS-OCTA, while demonstrating the usefulness of the novel directional filter. It enhances the vessels along with alleviating the noise on angiogram due to omnidirectional nature, preserving junctions and small vessel network in the high resolution WF SS-OCT angiograms. By ensuring accurate and streamlined calculation of NPAs, more widespread and clinically applicable OCTA data for interpretation is available, leading to further advancement in diagnosis, prognostication, and management of numerous retinal vascular pathologies.


The authors would like to thank all the members of the Harvard Retinal Imaging Lab and the staff at Retina Service, Massachusetts Eye and Ear for their help and assistance in research and related work.

Funding: The study was supported by Lions International Equipment Fund with matching support from MA Lions International Lions (Nos. 530125 and 530869). The funding organization had no role in the design or conduct of this research.


Reporting Checklist: The authors have completed the MDAR reporting checklist. Available at

Conflicts of Interest: Both authors have completed the ICMJE uniform disclosure form (available at Both authors report that the study was supported by Lions International Equipment Fund with matching support from MA Lions International Lions (Nos. 530125 and 530869). The funding organization had no role in the design or conduct of this research. JBM report that he is a consultant for Alcon, Carl Zeiss, Genentech, Allergan, Topcon and Sunovion. The authors have no other conflicts of interest to declare.

Ethical Statement: The authors are accountable for all aspects of the work in ensuring that questions related to the accuracy and integrity of any part of the work are appropriately investigated and resolved. Our research adhered to the tenets of the Declaration of Helsinki (as revised in 2013) and Health Insurance Portability and Accountability Act regulations. This study was approved by the Institutional Review Board of Massachusetts Eye and Ear (No. 2019P001863). Written detailed informed consent was obtained from all subjects before being imaged on the swept-source optical coherence tomography angiography device.

Open Access Statement: This is an Open Access article distributed in accordance with the Creative Commons Attribution-NonCommercial-NoDerivs 4.0 International License (CC BY-NC-ND 4.0), which permits the non-commercial replication and distribution of the article with the strict proviso that no changes or edits are made and the original work is properly cited (including links to both the formal publication through the relevant DOI and the license). See:


  1. Wong TY, Sabanayagam C. Strategies to Tackle the Global Burden of Diabetic Retinopathy: From Epidemiology to Artificial Intelligence. Ophthalmologica 2020;243:9-20. [Crossref] [PubMed]
  2. Yau JW, Rogers SL, Kawasaki R, Lamoureux EL, Kowalski JW, Bek T, et al. Global prevalence and major risk factors of diabetic retinopathy. Diabetes Care 2012;35:556-64. [Crossref] [PubMed]
  3. Hein TW, Xu W, Xu X, Kuo L. Acute and Chronic Hyperglycemia Elicit JIP1/JNK-Mediated Endothelial Vasodilator Dysfunction of Retinal Arterioles. Invest Ophthalmol Vis Sci 2016;57:4333-40. [Crossref] [PubMed]
  4. Yamana Y, Ohnishi Y, Taniguchi Y, Ikeda M. Early signs of diabetic retinopathy by fluorescein angiography. Jpn J Ophthalmol 1983;27:218-27. [PubMed]
  5. Gass JD, Sever RJ, Sparks D, Goren J. A combined technique of fluorescein funduscopy and angiography of the eye. Arch Ophthalmol 1967;78:455-61. [Crossref] [PubMed]
  6. Weinhaus RS, Burke JM, Delori FC, Snodderly DM. Comparison of fluorescein angiography with microvascular anatomy of macaque retinas. Exp Eye Res 1995;61:1-16. [Crossref] [PubMed]
  7. Salz DA, de Carlo TE, Adhi M, Moult E, Choi W, Baumal CR, Witkin AJ, Duker JS, Fujimoto JG, Waheed NK. Select Features of Diabetic Retinopathy on Swept-Source Optical Coherence Tomographic Angiography Compared With Fluorescein Angiography and Normal Eyes. JAMA Ophthalmol 2016;134:644-50. [Crossref] [PubMed]
  8. Hwang TS, Gao SS, Liu L, Lauer AK, Bailey ST, Flaxel CJ, Wilson DJ, Huang D, Jia Y. Automated Quantification of Capillary Nonperfusion Using Optical Coherence Tomography Angiography in Diabetic Retinopathy. JAMA Ophthalmol 2016;134:367-73. [Crossref] [PubMed]
  9. Schottenhamml J, Moult EM, Ploner S, Lee B, Novais EA, Cole E, Dang S, Lu CD, Husvogt L, Waheed NK, Duker JS, Hornegger J, Fujimoto JG. An automatic, intercapillary area-based algorithm for quantifying diabetes-related capillary dropout using optical coherence tomography angiography. Retina 2016;36:S93-S101. [Crossref] [PubMed]
  10. Zhang Q, Rezaei KA, Saraf SS, Chu Z, Wang F, Wang RK. Ultra-wide optical coherence tomography angiography in diabetic retinopathy. Quant Imaging Med Surg 2018;8:743-53. [Crossref] [PubMed]
  11. Guo Y, Hormel TT, Gao L, You Q, Wang B, Flaxel CJ, Bailey ST, Choi D, Huang D, Hwang TS, Jia Y. Quantification of Nonperfusion Area in Montaged Widefield OCT Angiography Using Deep Learning in Diabetic Retinopathy. Ophthalmol Sci 2021;1:100027. [Crossref] [PubMed]
  12. Alibhai AY, De Pretto LR, Moult EM, Or C, Arya M, McGowan M, Carrasco-Zevallos O, Lee B, Chen S, Baumal CR, Witkin AJ, Reichel E, de Freitas AZ, Duker JS, Fujimoto JG, Waheed NK. Quantification of retinal capillary nonperfusion in diabetics using wide-field optical coherence tomography angiography. Retina 2020;40:412-20. [Crossref] [PubMed]
  13. Toto L, D'Aloisio R, Chiarelli AM, Di Antonio L, Evangelista F, D'Onofrio G, Merla A, Parravano M, Di Marzio G, Mastropasqua R. A Custom-Made Semiautomatic Analysis of Retinal Nonperfusion Areas After Dexamethasone for Diabetic Macular Edema. Transl Vis Sci Technol 2020;9:13. [Crossref] [PubMed]
  14. Ishibazawa A, De Pretto LR, Alibhai AY, Moult EM, Arya M, Sorour O, Mehta N, Baumal CR, Witkin AJ, Yoshida A, Duker JS, Fujimoto JG, Waheed NK. Retinal Nonperfusion Relationship to Arteries or Veins Observed on Widefield Optical Coherence Tomography Angiography in Diabetic Retinopathy. Invest Ophthalmol Vis Sci 2019;60:4310-8. [Crossref] [PubMed]
  15. Podkowinski D, Beka S, Mursch-Edlmayr AS, Strauss RW, Fischer L, Bolz M. A Swept source optical coherence tomography angiography study: Imaging artifacts and comparison of non-perfusion areas with fluorescein angiography in diabetic macular edema. PLoS One 2021;16:e0249918. [Crossref] [PubMed]
  16. Yasukura S, Murakami T, Suzuma K, Yoshitake T, Nakanishi H, Fujimoto M, Oishi M, Tsujikawa A. Diabetic Nonperfused Areas in Macular and Extramacular Regions on Wide-Field Optical Coherence Tomography Angiography. Invest Ophthalmol Vis Sci 2018;59:5893-903. [Crossref] [PubMed]
  17. Truc PTH, Khan MAU, Lee YK, Lee S, Kim TS. Vessel enhancement filter using directional filter bank. Comput Vis Image Underst 2009;113:101-12. [Crossref]
  18. Chlebiej M, Gorczynska I, Rutkowski A, Kluczewski J, Grzona T, Pijewska E, Sikorski BL, Szkulmowska A, Szkulmowski M. Quality improvement of OCT angiograms with elliptical directional filtering. Biomed Opt Express 2019;10:1013-31. [Crossref] [PubMed]
  19. Guo Y, Hormel TT, Xiong H, Wang B, Camino A, Wang J, Huang D, Hwang TS, Jia Y. Development and validation of a deep learning algorithm for distinguishing the nonperfusion area from signal reduction artifacts on OCT angiography. Biomed Opt Express 2019;10:3257-68. [Crossref] [PubMed]
  20. Wang J, Hormel TT, You Q, Guo Y, Wang X, Chen L, Hwang TS, Jia Y. Robust non-perfusion area detection in three retinal plexuses using convolutional neural network in OCT angiography. Biomed Opt Express 2020;11:330-45. [Crossref] [PubMed]
  21. Nagasato D, Tabuchi H, Masumoto H, Enno H, Ishitobi N, Kameoka M, Niki M, Mitamura Y. Automated detection of a nonperfusion area caused by retinal vein occlusion in optical coherence tomography angiography images using deep learning. PLoS One 2019;14:e0223965. [Crossref] [PubMed]
  22. Macleod M, Collings AM, Graf C, Kiermer V, Mellor D, Swaminathan S, Sweet D, Vinson V. The MDAR (Materials Design Analysis Reporting) Framework for transparent reporting in the life sciences. Proc Natl Acad Sci U S A 2021; [Crossref] [PubMed]
  23. Schindelin J, Arganda-Carreras I, Frise E, Kaynig V, Longair M, Pietzsch T, Preibisch S, Rueden C, Saalfeld S, Schmid B, Tinevez JY, White DJ, Hartenstein V, Eliceiri K, Tomancak P, Cardona A. Fiji: an open-source platform for biological-image analysis. Nat Methods 2012;9:676-82. [Crossref] [PubMed]
  24. De Pretto LR, Moult EM, Alibhai AY, Carrasco-Zevallos OM, Chen S, Lee B, Witkin AJ, Baumal CR, Reichel E, de Freitas AZ, Duker JS, Waheed NK, Fujimoto JG. Controlling for Artifacts in Widefield Optical Coherence Tomography Angiography Measurements of Non-Perfusion Area. Sci Rep 2019;9:9096. [Crossref] [PubMed]
  25. Kolb JP, Klein T, Kufner CL, Wieser W, Neubauer AS, Huber R. Ultra-widefield retinal MHz-OCT imaging with up to 100 degrees viewing angle. Biomed Opt Express 2015;6:1534-52. [Crossref] [PubMed]
  26. Lei J, Durbin MK, Shi Y, Uji A, Balasubramanian S, Baghdasaryan E, Al-Sheikh M, Sadda SR. Repeatability and Reproducibility of Superficial Macular Retinal Vessel Density Measurements Using Optical Coherence Tomography Angiography En Face Images. JAMA Ophthalmol 2017;135:1092-8. [Crossref] [PubMed]
  27. Uji A, Balasubramanian S, Lei J, Baghdasaryan E, Al-Sheikh M, Sadda SR. Impact of Multiple En Face Image Averaging on Quantitative Assessment from Optical Coherence Tomography Angiography Images. Ophthalmology 2017;124:944-52. [Crossref] [PubMed]
  28. Uji A, Balasubramanian S, Lei J, Baghdasaryan E, Al-Sheikh M, Borrelli E, Sadda SR. Multiple enface image averaging for enhanced optical coherence tomography angiography imaging. Acta Ophthalmol 2018;96:e820-7. [Crossref] [PubMed]
  29. Uji A, Balasubramanian S, Lei J, Baghdasaryan E, Al-Sheikh M, Sadda SR. Choriocapillaris Imaging Using Multiple En Face Optical Coherence Tomography Angiography Image Averaging. JAMA Ophthalmol 2017;135:1197-204. [Crossref] [PubMed]
  30. Maloca PM, Spaide RF, Rothenbuehler S, Scholl HPN, Heeren T, Ramos de Carvalho JE, Okada M, Hasler PW, Egan C, Tufail A. Enhanced resolution and speckle-free three-dimensional printing of macular optical coherence tomography angiography. Acta Ophthalmol 2019;97:e317-9. [Crossref] [PubMed]
  31. Liu W, Luisi J, Liu H, Motamedi M, Zhang W. OCT-Angiography for Non-Invasive Monitoring of Neuronal and Vascular Structure in Mouse Retina: Implication for Characterization of Retinal Neurovascular Coupling. EC Ophthalmol 2017;5:89-98. [PubMed]
  32. Reif R, Qin J, An L, Zhi Z, Dziennis S, Wang R. Quantifying optical microangiography images obtained from a spectral domain optical coherence tomography system. Int J Biomed Imaging 2012;2012:509783. [Crossref] [PubMed]
  33. Ng EYK, Acharya UR, Suri JS, Campilho A, editors. Image Analysis and Modeling in Ophthalmology. 1st ed. Boca Raton: CRC Press, 2014:409. Available online:
  34. Sigursson EM, Valero S, Benediktsson JA, Chanussot J, Talbot H, Stefánsson E. Automatic retinal vessel extraction based on directional mathematical morphology and fuzzy classification. Pattern Recognit Lett. 2014;47:164-71. [Crossref]
  35. Kim AY, Chu Z, Shahidzadeh A, Wang RK, Puliafito CA, Kashani AH. Quantifying Microvascular Density and Morphology in Diabetic Retinopathy Using Spectral-Domain Optical Coherence Tomography Angiography. Invest Ophthalmol Vis Sci 2016;57:362-70. [Crossref] [PubMed]
  36. Hirano T, Kitahara J, Toriyama Y, Kasamatsu H, Murata T, Sadda S. Quantifying vascular density and morphology using different swept-source optical coherence tomography angiographic scan patterns in diabetic retinopathy. Br J Ophthalmol 2019;103:216-21. [Crossref] [PubMed]
  37. R Core Team. R: A Language and Environment for Statistical Computing. Vienna, Austria: R Foundation for Statistical Computing, 2022.
  38. Poli R, Valli G. An algorithm for real-time vessel enhancement and detection. Comput Methods Programs Biomed 1997;52:1-22. [Crossref] [PubMed]
  39. Yan C, Hirano S, Hata Y. Extraction of blood vessel in CT angiography image aided by fuzzy logic. In: WCC 2000 - ICSP 2000 2000 5th International Conference on Signal Processing Proceedings 16th World Computer Congress, 2000:926-9.
  40. Krissian K. Flux-based anisotropic diffusion applied to enhancement of 3-D angiogram. IEEE Trans Med Imaging 2002;21:1440-2. [Crossref] [PubMed]
  41. Krissian K, Malandain G, Ayache N. Directional anisotropic diffusion applied to segmentation of vessels in 3D images. In: Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), 1997.
  42. Czerwinski RN, Jones DL, O'Brien WD Jr. Detection of lines and boundaries in speckle images--application to medical ultrasound. IEEE Trans Med Imaging 1999;18:126-36. [Crossref] [PubMed]
  43. Czerwinski RN, Jones DL, O’Brien WD. Approach to boundary detection in ultrasound imaging. In: Proceedings of the IEEE Ultrasonics Symposium, 1993.
  44. Kutka R, Stier S. Extraction of line properties based on direction fields. IEEE Trans Med Imaging 1996;15:51-8. [Crossref] [PubMed]
  45. Chen H, Hale J. An algorithm for MR angiography image enhancement. Magn Reson Med 1995;33:534-40. [Crossref] [PubMed]
  46. Du YP, Parker DL. Vessel enhancement filtering in three-dimensional MR angiograms using long-range signal correlation. J Magn Reson Imaging 1997;7:447-50. [Crossref] [PubMed]
  47. Du YP, Parker DL, Davis WL. Vessel enhancement filtering in three-dimensional MR angiography. J Magn Reson Imaging 1995;5:353-9. [Crossref] [PubMed]
  48. Frangi AF, Niessen WJ, Nederkoorn PJ, Bakker J, Mali WP, Viergever MA. Quantitative analysis of vascular morphology from 3D MR angiograms: In vitro and in vivo results. Magn Reson Med 2001;45:311-22. [Crossref] [PubMed]
  49. Frangi AF, Niessen WJ, Hoogeveen RM, van Walsum T, Viergever MA. Model-based quantitation of 3-D magnetic resonance angiographic images. IEEE Trans Med Imaging 1999;18:946-56. [Crossref] [PubMed]
  50. Frangi AF, Niessen WJ, Vincken KL, Viergever MA. Multiscale vessel enhancement filtering. In: Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), 1998.
  51. Sato Y, Nakajima S, Shiraga N, Atsumi H, Yoshida S, Koller T, Gerig G, Kikinis R. Three-dimensional multi-scale line filter for segmentation and visualization of curvilinear structures in medical images. Med Image Anal 1998;2:143-68. [Crossref] [PubMed]
  52. Lorenz C, Carlsen IC, Buzug TM, Fassnacht C, Weese J. A multi-scale line filter with automatic scale selection based on the Hessian matrix for medical image segmentation. In: Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), 1997.
  53. Shikata H, Hoffman EA, Sonka M. Automated segmentation of pulmonary vascular tree from 3D CT images. In: Medical Imaging 2004: Physiology, Function, and Structure from Medical Images, 2004.
  54. Eiho S, Qian Y. Detection of coronary artery tree using morphological operator. In: Computers in Cardiology, 1997.
  55. Zana F, Klein JC. Segmentation of vessel-like patterns using mathematical morphology and curvature evaluation. IEEE Trans Image Process 2001;10:1010-9. [Crossref] [PubMed]
  56. Diggle PJ, Serra J. Image Analysis and Mathematical Morphology. Biometrics 1983;39:536-7. [Crossref]
  57. Luengo Hendriks CL, Van Vliet LJ. Discrete morphology with line structuring elements. Available online:
  58. Soille P, Talbot H. Directional morphological filtering. IEEE Trans Pattern Anal Mach Intell 2001;23:1313-29. [Crossref]
  59. Heneghan C, Flynn J, O'Keefe M, Cahill M. Characterization of changes in blood vessel width and tortuosity in retinopathy of prematurity using image analysis. Med Image Anal 2002;6:407-29. [Crossref] [PubMed]
  60. Orkisz MM, Bresson C, Magnin IE, Champin O, Douek PC. Improved vessel visualization in MR angiography by nonlinear anisotropic filtering. Magn Reson Med 1997;37:914-9. [Crossref] [PubMed]
  61. Garg I, Uwakwe C, Le R, Lu ES, Cui Y, Wai KM, Katz R, Zhu Y, Moon JY, Li CY, Laíns I, Eliott D, Elze T, Kim LA, Wu DM, Miller JW, Husain D, Vavvas DG, Miller JB. Nonperfusion Area and Other Vascular Metrics by Wider Field Swept-Source OCT Angiography as Biomarkers of Diabetic Retinopathy Severity. Ophthalmol Sci 2022;2:100144. [Crossref] [PubMed]
Cite this article as: Garg I, Miller JB. Semi-automated algorithm using directional filter for the precise quantification of non-perfusion area on widefield swept-source optical coherence tomography angiograms. Quant Imaging Med Surg 2023;13(6):3688-3702. doi: 10.21037/qims-21-1175

Download Citation