OCT-Converter
OCT-Converter copied to clipboard
Get layer positions from bscan metadata
Hi Mark,
You added bscan_metadata
to the e2e reader in the latest commits. I think each slice of layer segment has one corresponding bscan_metadata
. I was wondering how can I use posX1
, posY1
, posX2
, posY2
etc to find the locations of these layers on the fundus image?
Thank you, Hua
Hi Hua,
I'm not sure if the .e2e files contain information about how these coordinates relate to the coordinate frame of the fundus images - do you have any reason to believe they do?
One thing you could do is create an en-face image from the OCT scan using the get_projection() method - the layer coordinates will be in the same coordinate space as this projection. But then you would need to do some image registration between the en-face and a fundus to then project these coordinates into the space of the fundus.
Best, Mark
Mark, I think the E2E file must contain such information. In the heidelberg viewer, each b-scan is directly matched to the corresponding location on the infrared fundus image. This is very helpful to see which OCT feature correspond to which fundus feature. I'm attaching a couple of examples. It would be real nice if we could do the following:
- display the extracted b-scans and the extracted fundus in a way similar to the heidelberg viewer,
- do the same but using a different type of fundus image (eg: color, FAF, etc.). This would required to first manually register that other type of fundus image on top of the extracted fundus
The Heyex VOL and XML exports contains theses positions and I would also expect the E2E to contain these positions. I support VOL and XML in the eyepy Package and also plan to add E2E.
With regard to the visualization, this is already possible with eyepy. You can plot the localizer with arbitrary b-scan positions as an overlay and also the B-scans. You would only have to assemble it into one figure. If you have the registered other modality you could just replace the NIR localizer with it and again plot the b-scan positions. The documentation is still work in progress but if you have any specific questions let me know.
Thanks Olivier. This works nicely. Is there a way in eyepy to also display the green lines in the IR image?
If you have an EyeVolume ev
object you can plot the NIR with bscan positions like ev.plot(bscan_positions=True)
. You can also provide a list of indices to plot only the respective B-scans. Indices start at 0 and the 0th B-scan is the bottom one in the NIR.
I'll try that later today Olivier, thanks! When we're at it, do you have a good way to extract a vast majority of metadata from E2E files without going through XML? I have hundreds of E2E files that I'd like to automatically rename based on name, date of visit, and contents of the E2E (eg: IR, BAF/FAF, OCT, etc)
Maybe we should shift this discussion to the eyepy issues because they seem to be a bit offtopic here. Unfortunatelly my E2E parser isn't ready yet.
Afraid I can't work out atm where to find this information in the E2E files. Maybe if @Oli4 manages to get it into their e2e reader i'll pinch the code :P @panglaoshu you can use my tool to rename based on name and acquistion date but it doesn't currently output contents of the e2e. (e.g. IR, FAF)