Package: oct-converter
OCT ConverterPython-based tools for reading OCT and fundus data.DescriptionIn 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).dcmInstallationRequires python 3.7 or higher.pipinstalloct-converterUsageA number of example usage scripts are included inexamples/.Here is an example of reading a .fds file:fromoct_converter.readersimportFDS# An example .fds file can be downloaded from the Biobank website:# https://biobank.ndph.ox.ac.uk/showcase/refer.cgi?id=30filepath='/home/mark/Downloads/eg_oct_fds.fds'fds=FDS(filepath)oct_volume=fds.read_oct_volume()# returns an OCT volume with additional metadata if availableoct_volume.peek(show_contours=True)# plots a montage of the volume, with layer segmentations is availableoct_volume.save('fds_testing.avi')# save volume as a movieoct_volume.save('fds_testing.png')# save volume as a set of sequential images, fds_testing_[1...N].pngoct_volume.save_projection('projection.png')# save 2D projectionfundus_image=fds.read_fundus_image()# returns a  Fundus image with additional metadata if availablefundus_image.save('fds_testing_fundus.jpg')metadata=fds.read_all_metadata(verbose=True)# extracts all other metadatawithopen("fds_metadata.json","w")asoutfile:outfile.write(json.dumps(metadata,indent=4))# create and save a DICOMdcm=create_dicom_from_oct(filepath)ContributionsAre welcome! Here is adevelopment roadmap, including some easy first issues. Please open anew issueto discuss any potential contributions.Updates9 November 2023Can now save .e2e, .img, .oct, and .OCT files as DICOMs with correct headers.22 September 2023DICOM support: can now save .fda/.fds files as DICOMs with correct headers.Much more complete extraction of .fda/.fds metadata.28 March 2023Metadata extraction for .fds expanded to match that of .fda file.31 January 2023Greatly extended support for extracting metadata from .fda files.7 August 2022Contours (layer segmentations) are now extracted from .e2e files.Acquisition date is now extracted from .e2e files.16 June 2022Initial 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 2021Reading the Bioptigen .OCT format is now supported.11 June 2021Can now specify whether Zeiss .img data needs to be de-interlaced during reading.14 May 2021Can save 2D projections of OCT volumes.30 October 2020Extract fundus and laterality data from .e2eNow attempts to extract additional volumetric data from .e2e files that was previously missed.22 August 2020Experimental support for reading OCT data from .fda files.14 July 2020Can now read fundus data from .fda files.Related projectsuocteinspired and enabled this projectLibE2EandLibOctDataprovided some additional descriptions of the .e2e file speceyepyfor python-based import, visualisation, and analysis of OCT dataeyelabis a tool for annotating this dataClinical useWe can't guarantee images extracted with OCT-Converter will match those extracted or viewed with the manufacturer's software. Any use in clinical settings is at the user's own risk.