Skip to content

Tools for extracting the raw optical coherence tomography (OCT) and fundus data from proprietary file formats.

License

Notifications You must be signed in to change notification settings

wx-guyue/OCT-Converter

 
 

Repository files navigation

OCT Converter

In ophthalmology, data acquired from the scanner is often exported in the manufacturer's proprietary file format. OCT-Converter provides python-based tools for extracting images (optical coherence tomography and fundus), as well as associated metadata, from these files.

Supported file formats

  • .fds (Topcon)
  • .fda (Topcon)
  • .e2e (Heidelberg)
  • .img (Zeiss)
  • .oct (Bioptigen)
  • .OCT (Optovue)
  • .dcm (both the standard kind, see Dicom, and Zeiss' obfuscated version, see ZEISSDicom)

Installation

Requires python 3.7 or higher.

pip install oct-converter

Usage

A number of example usage scripts are included in examples/.

Here is an example of reading a .fds file:

from oct_converter.readers import FDS

# An example .fds file can be downloaded from the Biobank website:
# https://biobank.ndph.ox.ac.uk/showcase/refer.cgi?id=30
filepath = '/home/mark/Downloads/eg_oct_fds.fds'
fds = FDS(filepath)

oct_volume = fds.read_oct_volume()  # returns an OCT volume with additional metadata if available
oct_volume.peek() # plots a montage of the volume
oct_volume.save('fds_testing.avi')  # save volume as a movie
oct_volume.save('fds_testing.png')  # save volume as a set of sequential images, fds_testing_[1...N].png
oct_volume.save_projection('projection.png') # save 2D projection

fundus_image = fds.read_fundus_image()  # returns a  Fundus image with additional metadata if available
fundus_image.save('fds_testing_fundus.jpg')

Contributions

Are welcome! Please open a new issue to discuss any potential contributions.

Updates

18 November 2022

  • Initial supported for reading the Zeiss Dicom format.

7 August 2022

  • Contours (layer segmentations) are now extracted from .e2e files.
  • Acquisition date is now extracted from .e2e files.

16 June 2022

  • Initial support for reading Optovue OCTs
  • Laterality is now extracted separately for each OCT/fundus image for .e2e files.
  • More patient info extracted from .e2e files (name, sex, birthdate, patient ID)

24 Aug 2021

  • Reading the Bioptigen .OCT format is now supported

11 June 2021

  • Can now specify whether Zeiss .img data needs to be de-interlaced during reading.

14 May 2021

  • Can save 2D projections of OCT volumes.

30 October 2020

  • Extract fundus and laterality data from .e2e
  • Now attempts to extract additional volumetric data from .e2e files that was previously missed

22 August 2020

  • Experimental support for reading OCT data from .fda files.

14 July 2020

  • Can now read fundus data from .fda files.

Related projects

  • uocte inspired and enabled this project
  • LibE2E and LibOctData provided some additional descriptions of the .e2e file spec
  • eyepy can read HEYEY XML and VOL formats, and eyelab is a tool for annotating this data

Clinical use

This is research software and any data extracted using it should not be used for clinical decision-making.

About

Tools for extracting the raw optical coherence tomography (OCT) and fundus data from proprietary file formats.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%