question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(E2E-Export) .avi not exported properly + images darker

See original GitHub issue

Hi There! First of all, thank you Mark for your work!

I was trying out your implementation for converting Heidelberg’s E2E format to images and videos, respectively. I can execute your example file with my exported E2E-file from HEYEX (v1) but there seem to be 2 problems:

  1. The resulting .avi file seems to consist only of one image, although in the step where all slides get displayed through the volume.peek() code line, the images of the slides are all different.

  2. The converted images of the slides seem to be a bit darker than what I see in the HEYEX software. Therefore, some areas of the slides are not displayed very detailed. However, I’m not sure how significant this problem is as I’m not an ophthalmologist nor do I have any kind of medical background.

Thanks for your help!

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
Oli4commented, Mar 2, 2022

I had a similar problem when working with the HEYEX VOL export, where I found the intensity transformation to be logarithmic. If the E2E data is the same as in the VOL file the following function might help:

def vol_intensity_transform(data):
    selection_0 = data == np.finfo(np.float32).max
    selection_data = data <= 1

    new = np.log(data[selection_data] + 2.44e-04)
    new = (new + 8.3) / 8.285

    data[selection_data] = new
    data[selection_0] = 0
    data = np.clip(data, 0, 1)
    return img_as_ubyte(data)

I found the output to differ by at most +/- 3 when compared with the XML export of the same volume for my small sample dataset. This difference arises from the same intensity in VOL data having multiple intensities in the XML data (See images below). There might be an additional context-sensitive processing step?

Plotted XML intensities(y-axis) againts VOL intensities (x-axis) Blue: intensities scatterplot (the values overlap) Red: function I use for the intensity transform

XML/VOL intensities

Zoom in on the plotted intensities. image

If you are interested in reading the HEYEX VOL or XML export which do not seem to be supported by the OCT-converter, have a look at my package eyepy

1reaction
fabharicommented, Nov 2, 2022

I had a similar problem when working with the HEYEX VOL export, where I found the intensity transformation to be logarithmic. If the E2E data is the same as in the VOL file the following function might help:

def vol_intensity_transform(data):
    selection_0 = data == np.finfo(np.float32).max
    selection_data = data <= 1

    new = np.log(data[selection_data] + 2.44e-04)
    new = (new + 8.3) / 8.285

    data[selection_data] = new
    data[selection_0] = 0
    data = np.clip(data, 0, 1)
    return img_as_ubyte(data)

I found the output to differ by at most +/- 3 when compared with the XML export of the same volume for my small sample dataset. This difference arises from the same intensity in VOL data having multiple intensities in the XML data (See images below). There might be an additional context-sensitive processing step?

Plotted XML intensities(y-axis) againts VOL intensities (x-axis) Blue: intensities scatterplot (the values overlap) Red: function I use for the intensity transform

XML/VOL intensities

Zoom in on the plotted intensities. image

If you are interested in reading the HEYEX VOL or XML export which do not seem to be supported by the OCT-converter, have a look at my package eyepy

This helped me a lot thanks. the results are so promising

Read more comments on GitHub >

github_iconTop Results From Across the Web

Re: Image appears alot darker after export from PS
Yes, you need to view it in a color managed photo viewer/web browser, one that uses your monitor profile to display images correctly...
Read more >
The video that mplay exported is very dark. Please help!
I have two questions here. 1. The exported video was very dark. How do I fix it so I don't need to use...
Read more >
Navisworks Products 2020 | Autodesk Knowledge Network
Animation or image exported from Timeliner is not exported correctly in Navisworks. Products and versions covered.
Read more >
Loss of dark detail - Blackmagic Forum • View topic
The image on the right is from same footage after being exported from Resolve 16 Beta saved as uncompressed AVI - HUYC(PAL).
Read more >
Image Sequence export not working correctly
Export your images, play, close your project, then reopen and try to export your images again. 3.) Can you export a .avi file...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found