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

Bioptigen error loading several frames per scan #120

Closed grodrguez3 closed 1 year ago

grodrguez3 commented 1 year ago

I work with Bioptigen files and I noticed that when there are several frames per scan (i.e. dimensions (FramesPerScan,Scans,Ascan, depth), it does not load all the frames. It ends up returning an array of size (Scans,Ascan, depth). I have not seen any averaging done so far so I was wondering why/how this is happening? Thank you!

marksgraham commented 1 year ago

Hi,

Are you finding several oct volume objects returned? The reader loads a 4-D object with shape (t, z, x, y) and then returns t OCTVolume objects with size (z, x, y). See here: https://github.com/marksgraham/OCT-Converter/blob/56d9283a5a9a931b4a00cdf9b14fc76814161aeb/oct_converter/readers/boct.py#L99-L114

You should be able to access the 4D object through the .vol attribute of the BOCT object.