File Exchange

image thumbnail

OCTSEG (Optical Coherence Tomography Segmentation and Evaluation GUI)

version (222 KB) by Markus Mayer
OCTSEG is a GUI and function collection to segment and visualize retinal layers on OCT data.


Updated 11 Apr 2018

View License

OCTSEG (Optical Coherence Tomography Segmentation and Evaluation GUI) is a graphical user interface (GUI) written in MATLAB for research purpose. The retinal layers and the blood vessels of retinal OCT scans can be segmented. Tools for the manual correction of the automated segmentations are provided. The segmentations or resulting thickness measurements on the retinal layers may be exported as a CSV file, which is readable by many standard software programms (e.g. Excel).
Current Features:
- Heidelberg Engineering Spectralis OCT RAW data (.vol ending): Circular scans and Optic Nerve Head centered volumes are supported
- Image file (.tif, .pgm, .jpg) support. Multiple images can be read in as volumes using user generated .list files (a text file format). Note: The algorithms have never been tested on other data then from the Spectralis system. Parameter adaption will for sure be necessary.
- Automated segmentation of 6 prominent retinal layers (including the inner limiting membrane, outer nerve fiber layer boundary, and retinal pigment epithelium)
- Automated segmentation of the blood vessel positions on circular scans
- Batch processing of circular scans
- Manual correction of possible segmentation errors
- Visualization of the data and the segmentation results, including enface views and thickness maps
Export of the segmentation results to CSV text files

Cite As

Markus Mayer (2020). OCTSEG (Optical Coherence Tomography Segmentation and Evaluation GUI) (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (5)

Aisu Yang

Hello! Seems that I can't add files to the Project anymore...

Anyway: I forgot to add the openPlain function (as it was a "special" function I only used seldomly). Here it is, sorry for the inconvenience:

function octimg = openPlain(filename, mode)

% Open Plain RAW-Data, which is stored as 32bit float, and the size of the
% OCT image in an additional File (name the same, with .meta ending).

if nargin < 2
mode = 'oct';

if strcmp(mode, 'oct')
fidData = fopen(strcat(filename, '.oct'), 'r');
fidSize = readOctMeta(filename, 'Octsize');

raw = fread(fidData, inf, 'float32')';
temp = reshape(raw, fidSize);

%if fidSize(3) == 1
for i = 1:fidSize(3)
octimg(:,:,i) = temp(:,:,i)';
% for i = 1:fidSize(3)
% octimg(:,:,i) = temp(:,:,i);
% end

elseif strcmp(mode, 'slo')
fidData = fopen(strcat(filename, '.slo'), 'r');
fidSize = readOctMeta(strcat(filename), 'Slosize');
raw = fread(fidData, inf, 'uchar')';
octimg = reshape(raw, fidSize);



I must say that I don't have private access to Matlab anymore and therefore can't provide any maintenance for the code other than answering questions. Best regards!

Aisu Yang

Excuse me! There is a problem when I run the GUI to open the oct file.
The error information ...

Undefined function or variable 'openPlain'.

Error in octsegMain/loadDispFile (line 1098)
[ActDataDescriptors.Header, ActDataDescriptors.BScanHeader, ActData.slo, ActData.bScans] = openFuncHandle([ActDataDescriptors.pathname

Error in octsegMain/hMenFileOpenFileCallback (line 265)

Error while evaluating Menu Callback.

How to fix it? It seems that there is not a function named "openPlain".

Da Ma

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