marksgraham / OCT-Converter

Tools for extracting the raw optical coherence tomography (OCT) and fundus data from proprietary file formats.
https://pypi.org/project/oct-converter/
MIT License
200 stars 72 forks source link

error when importing function create_dicom_from_oct #127

Closed ColaWithIce closed 1 year ago

ColaWithIce commented 1 year ago

Hi,

I found an error when using from oct_converter.dicom import create_dicom_from_oct

File "/envs/lib/python3.8/site-packages/oct_converter/dicom/__init__.py", line 3, in <module>
    from .dicom import create_dicom_from_oct
  File "/envs/lib/python3.8/site-packages/oct_converter/dicom/dicom.py", line 15, in <module>
    from oct_converter.dicom.boct_meta import boct_dicom_metadata
  File "/envs/cscr/lib/python3.8/site-packages/oct_converter/dicom/boct_meta.py", line 1, in <module>
    from oct_converter.dicom.metadata import (
  File "/envs/cscr/lib/python3.8/site-packages/oct_converter/dicom/metadata.py", line 109, in <module>
    class ImageGeometry:
  File "/envs/cscr/lib/python3.8/site-packages/oct_converter/dicom/metadata.py", line 111, in ImageGeometry
    pixel_spacing: list[float] = field(default_factory=list)
TypeError: 'type' object is not subscriptable

Could you take a look what happens here.

marksgraham commented 1 year ago

Hi,

I'll take a look soon, should be an easy fix. In the meantime I think you'll be able to get around this by using Python version >=3.9

marksgraham commented 1 year ago

Ok i've fixed it, you'll have to get the fixed version by running pip install git+https://github.com/marksgraham/OCT-Converter