Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not fully understand scale_x means. #16

Open
big97kai opened this issue Dec 4, 2023 · 3 comments
Open

Not fully understand scale_x means. #16

big97kai opened this issue Dec 4, 2023 · 3 comments

Comments

@big97kai
Copy link

big97kai commented Dec 4, 2023

  • eyepy version:0.12.1
  • Python version:3.8
  • Operating System:win11

Description

I want to get the scale_x of oct image, so that i can get the true size of oct (not in pixels)

I notice that in https://medvisbonn.github.io/eyepy/formats/he_e2e_types/Type10004/ it has scale_x and i tried it into on of my e2e file.
I'm pretty sure it's nothing like scalue_y ,which means pixel size * scale_y can get the true size.

1024 * 0.9146999716758728 is not 5.9 mm

so what's this scale_x means, and is there any chance i can get true x for e2e file.

@Oli4
Copy link
Contributor

Oli4 commented Dec 4, 2023

Hi @big97kai

I once thought I found the x_scale there but figured later that I was wrong and forgot to remove it from the documentation. I'll fix this.

So far I am not aware of anybody who figured out how to extract the x_scale from the E2E files. I am pretty sure that it is not stored in the same form as in the XML or VOL export (x_scale in mm). I have some matching exports and could not find the respective values I got from the XML export in the E2E export. I checked for different encodings and offsets and varying tolerance with respect to the value from the XML.

I assume that E2E only stores measures that allow to derive the x_scale. One of these measures is probably the Scan Focus which is related to the x_scale (here). So I tried to find the Scan Focus in the E2E file but was not successful. Currently, we are stuck here.

If you have any idea what could be stored in the E2E file and want to check for yourself try this to search for arbitrary values in the E2E file:

with ep.io.HeE2eReader(YOURPATH.E2E") as reader:
    hits_float = reader.find_float(0.0039, rtol=0.01, atol=0.0000001, bits=32)
    hits_int = reader.find_int(30, rtol=0.01, atol=0.0000001, bits=32)

The return value is a dictionary

 {"series_id": 
    {foldertype_enum: 
        {"number_encoding": 
            [List of Start bytes in the folder for every hit]
}}}

@Oli4
Copy link
Contributor

Oli4 commented Dec 4, 2023

Let's see if we get an answer: https://x.com/oli4morelle/status/1731688684896841805?s=20

@big97kai
Copy link
Author

big97kai commented Dec 7, 2023

It seems heiderberg doesn't care about researchers. Crying out loud.
I notice that there is scale in eyepy is that correct, I mean if that's given by E2E, we can do detect algorithm instead of finding scale_x....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants