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
193 stars 70 forks source link

fundus jpg looks wrong; the .avi is just "static noise" and the dicom function doesn't work from the example #145

Open skirsch opened 1 month ago

skirsch commented 1 month ago

I did everything by the book for the demo. I downloaded the exact sample image file and ran the sample code.

There were 3 big problems:

  1. the .avi movie was just "static noise"
  2. the fundus image was largely black, not like the sample image at all fds_testing_fundus

And the dcm version was unreadable: image

  1. Output from last part of the example script:
    >>> metadata = fds.read_all_metadata(verbose=True)
    b'@IMG_SCAN_03' there is no method for getting info from this chunk.
    b'@PARAM_TRC_02' there is no method for getting info from this chunk.
    >>> with open("fds_metadata.json", "w") as outfile:
    ...     outfile.write(json.dumps(metadata, indent=4))
    ...
    Traceback (most recent call last):
    File "<stdin>", line 2, in <module>
    NameError: name 'json' is not defined
    >>> dcm = create_dicom_from_oct(filepath)
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    NameError: name 'create_dicom_from_oct' is not defined

    everything else worked.

It appears there was a missing:

from oct_converter.dicom import create_dicom_from_oct

from the example script?

marksgraham commented 3 weeks ago

I think the fundus might just be that bad quality

Can you try export as a series of .png rather than .avi by changing the extension type and see if it still just looks like noise?

The import was missing from the README script, thanks for spotting, you can find the fuller example here: https://github.com/marksgraham/OCT-Converter/blob/main/examples/demo_fds_extraction.py