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

E2E slice ordering adjustment #149

Closed sustrev closed 3 weeks ago

sustrev commented 1 month ago

It was pointed out to me on a few test files that the converted output had the first slice as last within each volume, and I noticed that the logic utilized for slice ordering int(chunk.slice_id / 2) - 1 becomes -1 if chunk.slice_id is 0, which was happening with the test E2E files.

Are there other files that you've encountered where the - 1 is needed? Removing it seems like a simple solution, but if some files need that last bit of the equation, then there might need to be more logic around whether or not to do the subtraction...

marksgraham commented 3 weeks ago

I think this is jsut a bug, thanks for spotting. I do recall an issue about e2e slice ordering, can't find it now but it seems like this may be the solution :)