Skip to content

linkmodo/oct-extractor

Repository files navigation

OCT Image Extraction Tool

A Windows application for extracting and processing images from various OCT (Optical Coherence Tomography) file formats used in ophthalmology.

Version 2.2

What's New in 2.2

  • DICOM Export: Export OCT files to DICOM format with proper OPT modality headers
  • Layer Segmentation: Export Heidelberg E2E files with layer segmentation overlay
  • Segmentation JSON: Export layer boundary coordinates as JSON for analysis
  • Improved Image Quality: Empty/background areas now render as pure black
  • Bug Fixes: Fixed duplicate DICOM exports, improved error handling

Features

Multi-format Support

Import from various OCT file formats:

  • Heidelberg Engineering (.e2e)
  • Zeiss Cirrus (.img)
  • Topcon (.fds, .fda)
  • Bioptigen (.oct)
  • Optovue (.OCT)
  • DICOM (.dcm)

Export Options

  • Image Formats: PNG, JPEG, TIFF
  • DICOM Export: Full DICOM conversion with correct metadata headers
  • Layer Segmentation Overlay: Visualize retinal layer boundaries on OCT slices
  • Segmentation JSON: Export layer coordinates for external analysis

Image Processing

  • Rotation (0°, 90°, 180°, 270°)
  • Cropping with customizable parameters
  • Contrast enhancement
  • Brightness adjustment

Batch Processing

  • Process multiple files simultaneously
  • Configurable export settings
  • Progress tracking with cancellation support

User Interface

  • Intuitive file browser
  • Image preview with navigation
  • Detailed metadata display
  • Frame selection with select all/invert options

Installation

Prerequisites

  • Windows 10/11
  • Python 3.8+ (for source installation)
  • 4GB RAM minimum (8GB recommended)
  • 500MB free disk space

Option 1: Pre-built Executable

  1. Download the latest release from Releases
  2. Extract the ZIP file
  3. Run OCT Extractor.exe

Option 2: From Source

# Clone the repository
git clone https://github.com/linkmodo/oct-extractor.git
cd oct-extractor

# Install dependencies
pip install -r requirements.txt

# Run the application
cd src
python main.py

Usage

Basic Workflow

  1. Click Import... to load OCT files
  2. Select a file from the list to view its contents
  3. Use the preview panel to examine OCT scans and fundus images
  4. Select frames to export using checkboxes
  5. Configure export settings (format, rotation, etc.)
  6. Click Export to save images

DICOM Export

  1. Load OCT files (supports .e2e, .img, .fds, .fda, .oct)
  2. Click Export to DICOM... in the menu bar
  3. Select files to export
  4. Configure options (extract scan repeats, etc.)
  5. Choose output directory and export

Layer Segmentation (Heidelberg E2E)

When exporting E2E files with layer segmentation data:

  • Enable Export with segmentation overlay for visual layer boundaries
  • Enable Export segmentation as JSON for coordinate data

Project Structure

oct-extractor/
├── src/
│   ├── main.py              # Application entry point
│   ├── controller/          # Application controllers
│   │   ├── export_controller.py
│   │   ├── file_controller.py
│   │   ├── frame_controller.py
│   │   └── image_controller.py
│   ├── model/               # Data models and processing
│   │   ├── oct_file_reader.py
│   │   ├── file_manager.py
│   │   └── image_processor.py
│   └── view/                # UI components
│       ├── export_dialog.py
│       ├── dicom_export_dialog.py
│       ├── batch_dialog.py
│       └── ...
├── requirements.txt         # Python dependencies
└── README.md

Dependencies

  • OCT-Converter - OCT file format parsing
  • PyQt5 - User interface
  • NumPy - Numerical operations
  • Pillow - Image processing
  • h5py - HDF5 file support
  • Matplotlib - Visualization

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • OCT-Converter by Mark Graham for OCT file format support
  • Windsurf for AI-assisted development
  • The Python community for excellent open-source tools

Author

Created by Li Fan

Repository: https://github.com/linkmodo/oct-extractor

About

A tool to extract OCT images from various ophthalmology OCT device software.

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors