File Exchange

image thumbnail

Graph-based segmentation of retinal layers in oct images

version (3.07 KB) by pangyuteng
Demonstration of graph-based segmentation of retinal layers in an optical coherence tomography image


Updated 16 Mar 2017

View Version History

View License

This script demonstrates how graph theory can be used to segment retinal layers in optical coherence tomography images.
run the script by pressing F5.
I am working on a more comprehensive open source software package for computer-aided segmentation of retinal layers in optical coherence tomography images, which currently includes 1. automated segmentation of 6 reitnal layers and 2. GUI for examination and manual correction of the automated segmentation. It can be downloaded at my github page.
Chiu, Stephanie J., et al. "Automatic segmentation of seven retinal layers in SDOCT images congruent with expert manual segmentation." Optics express 18.18 (2010): 19413-19428.
Teng, Pang-yu. (2013). Caserel - An Open Source Software for Computer-aided Segmentation of Retinal Layers in Optical Coherence Tomography Images. Zenodo. 10.5281/zenodo.17893

Cite As

pangyuteng (2021). Graph-based segmentation of retinal layers in oct images (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (8)

Leyana Khouri

hi, I would like to know what graph cut method you used here and how did you find neighborIter= [1 1 1 0 0 -1 -1 -1;...
1 0 -1 1 -1 1 0 -1];
I would really appreciate your help


How can we segment the rest of the layers?Like choroid, it's five layer, retina, it's 10 layers and Chorioscleral interface the CSI.

Neha Gour

I am applying the code given at for my own image but finding this error. kindly tell me why.

**Attempt to reference field of non-structure array.

Error in getRetinalLayersCore (line 114)
indPathX = find(rPaths(strcmp('ilm',{})).pathY==k);

Error in getRetinalLayers (line 129)
[retinalLayers, ~] = getRetinalLayersCore(retinalLayerSegmentationOrder{layerInd},imgNew,params,retinalLayers);

Error in getRetinalLayersExample (line 107)
[retinalLayers, params] = getRetinalLayers(img);**

wang wang



@Bashir Isa Dodo, this code does not support opening of zip files, try unzipping the zip file and using the files within the zip file.

Bashir Isa Dodo

Hello, I tried running the code, by entering the folder path of the images, but I always get this error
>> updatedGTherorySimplified
Error using load
Unable to read file 'D:\Matlab'. No such file or directory.

Error in updatedGTherorySimplified (line 35)
load([folderPath imageDir(1).name]);
and I am sure the images are in the directory, I tried copying the images to separate directory, and still no change
Hope to get a feedback thanks

KalviKumar J

MATLAB Release Compatibility
Created with R2012b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!