MedVisBonn / eyepy

A python package to read, analyse and visualize OCT and fundus data from various sources.
https://medvisbonn.github.io/eyepy/
MIT License
45 stars 8 forks source link

Loading not equally spaced OCT volumes #4

Closed yiqian-wang closed 2 years ago

yiqian-wang commented 2 years ago

Hi Olivier,

I'm working with a dataset that has a lot of not equally spaced OCTs. The current eyepy verson does not seem to support loading such volumes (in line 167 in eyepy/io/utils.py)

msg = "B-scans are not equally spaced. Data can not be imported."
raise ValueError(msg)

Is it possible to just set the spacing to a default number and still load the volume? BTW, I've also been using the eyelab for segmentation, it works so well! It would also be great if you could provide an exe build that supports loading non-uniformly spaced volumes.

Thanks!

Oli4 commented 2 years ago

Dear yiqian-wang,

B-scans need to be equally spaced for the projection of B-scan annotations to the enface using an affine transformation. As a quick fix you can simply comment out the check for equal distance and use the distance between the first two B-scans as an estimate, but be aware that this breaks the mapping to the enface.

I am thinking about adding a parameter which enables this behaviour as a short term solution and add non-linear mappings in the future to enable the enface visualization

yiqian-wang commented 2 years ago

Hi Olivier,

Thanks for your response, it would be great to have the non-linear mappings in the future. I'll go with the temporary work around for now .

Thanks, Yiqian

Oli4 commented 2 years ago

@yiqian-wang

With the current version of eyepy 0.6.5 I replaced the Error with a warning. The next version of EyeLab is going to do the same. Thanks a lot for your feedback :)

Best Olivier

Oli4 commented 2 years ago

@yiqian-wang

A new version of EyeLab is now available which can load B-scans that are not equally spaced:

https://github.com/MedVisBonn/eyelab/releases/latest