1 Vol.:(0123456789) Scientifc Reports | (2021) 11:13794 | https://doi.org/10.1038/s41598-021-92713-y www.nature.com/scientificreports Livelayer: a semi‑automatic software program for segmentation of layers and diabetic macular edema in optical coherence tomography images Mansooreh Montazerin 1 , Zahra Sajjadifar 1 , Elias Khalili Pour 2 , Hamid Riazi‑Esfahani 2 , Tahereh Mahmoudi 3 , Hossein Rabbani 4 , Hossein Movahedian 5 , Alireza Dehghani 5 , Mohammadreza Akhlaghi 5 & Rahele Kafeh 4* Given the capacity of Optical Coherence Tomography (OCT) imaging to display structural changes in a wide variety of eye diseases and neurological disorders, the need for OCT image segmentation and the corresponding data interpretation is latterly felt more than ever before. In this paper, we wish to address this need by designing a semi‑automatic software program for applying reliable segmentation of 8 diferent macular layers as well as outlining retinal pathologies such as diabetic macular edema. The software accommodates a novel graph‑based semi‑automatic method, called “Livelayer” which is designed for straightforward segmentation of retinal layers and fuids. This method is chiefy based on Dijkstra’s Shortest Path First (SPF) algorithm and the Live‑wire function together with some preprocessing operations on the to‑be‑segmented images. The software is indeed suitable for obtaining detailed segmentation of layers, exact localization of clear or unclear fuid objects and the ground truth, demanding far less endeavor in comparison to a common manual segmentation method. It is also valuable as a tool for calculating the irregularity index in deformed OCT images. The amount of time (seconds) that Livelayer required for segmentation of Inner Limiting Membrane, Inner Plexiform Layer–Inner Nuclear Layer, Outer Plexiform Layer–Outer Nuclear Layer was much less than that for the manual segmentation, 5 s for the ILM (minimum) and 15.57 s for the OPL–ONL (maximum). The unsigned errors (pixels) between the semi‑automatically labeled and gold standard data was on average 2.7, 1.9, 2.1 for ILM, IPL–INL, OPL–ONL, respectively. The Bland–Altman plots indicated perfect concordance between the Livelayer and the manual algorithm and that they could be used interchangeably. The repeatability error was around one pixel for the OPL–ONL and < 1 for the other two. The unsigned errors between the Livelayer and the manual algorithm was 1.33 for ILM and 1.53 for Nerve Fiber Layer–Ganglion Cell Layer in peripapillary B‑Scans. The Dice scores for comparing the two algorithms and for obtaining the repeatability on segmentation of fuid objects were at acceptable levels. Optical Coherence Tomography (OCT) is a non-invasive, relatively inexpensive imaging technique which is based on low-coherence interferometry and captures high-resolution multi-dimensional images from biologi- cal tissue especially the retina 1 . Macular OCT images are widely used to assist ophthalmologists in diagnosing OPEN 1 Department of Electrical and Computer Engineering, Isfahan University of Technology, Isfahan, Iran. 2 Retina Service, Farabi Eye Hospital, Tehran University of Medical Sciences, Tehran, Iran. 3 Department of Biomedical Systems and Medical Physics, Tehran University of Medical Sciences, Tehran, Iran. 4 School of Advanced Technologies in Medicine, Medical Image and Signal Processing Research Center, Isfahan University of Medical Sciences, Isfahan, Iran. 5 Isfahan Eye Research Center, Department of Ophthalmology, Isfahan University of Medical Sciences, Isfahan, Iran. * email: rkafeh@gmail.com