Extract OCT and fundus data from proprietary file formats.
Project description
OCT file converter
This repository contains code for extracting the raw optical coherence tomography (OCT) and fundus data from manufacturer's proprietary file formats.
Motivation
Research in ophthalmology is often hindered by manufacturer's usage of proprietary data formats for storing their data. For example, until recently, the ~200,000 OCT scans in the UK Biobank project was only available in Topcon's .fds file format, which prevented bulk processing and analysis. The only freely available software that allows these scans to be accessed is uocte, which is written in C++ and is no longer maintained. This repository aims to make available python-based tools for reading these proprietary formats.
Supported file formats
- .fds (Topcon)
- .fda (Topcon)
- .e2e (Heidelberg)
- .img (Zeiss)
- .oct (Bioptigen)
- .dcm
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!
Updates
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file oct_converter-0.2.1.tar.gz
.
File metadata
- Download URL: oct_converter-0.2.1.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d1fd2b11946ba5924075336f00043f9d69ea7c3eebcb08bcc3c6f530f284203 |
|
MD5 | b6bd3b071a151e1613754abfbf2ac330 |
|
BLAKE2b-256 | 4dde92191f89a0338827f189886c32d75125fd3f69f67e71421031dad591a983 |
File details
Details for the file oct_converter-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: oct_converter-0.2.1-py3-none-any.whl
- Upload date:
- Size: 16.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a576a0f6bf34cd4339f34c3e43b6e46e19f90207c4f5e151790fb08a11bc167 |
|
MD5 | 2055dc90155a8fee6d0e9c9f300c65ba |
|
BLAKE2b-256 | c8c90fe0e0e82d4fb04202cf7f3cfb4739355bae699a835c6768cfdb116fa28d |