-
Notifications
You must be signed in to change notification settings - Fork 72
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
e2e file reading quantity problem #126
Comments
Hi there, How many fundus/en-face images do you expect to be in the file? It looks like 6 are extracted. BTW, I edited your post to remove the link to data in case the data is non-anonymised and shouldn't be in the public domain, but I have the link now so can take a look if needs be. |
Hi mark, Nice to see your reply I tried again a few times and found that this code didn't work. The bold part I added。 for volume in oct_volumes: fundus_images = ( metadata = file.read_all_metadata() But in fact, there is relevant data, about 40-50 sheets. Can you use the data I uploaded last time to try and obtain the data in this file, and ultimately, how much data can be output? I mainly want to obtain this part of data, not just fundus data |
Sorry I've actually not got the link anyone - could you email it to me? (my email is on my github profile) |
It might be possible to read such an e2e file with eyepy. This section in the documentation might help: https://medvisbonn.github.io/eyepy/formats/he_e2e/#access-other-data-stored-in-e2e-files I could also have look myself. |
I have sent the data file via email to the address [email protected], please check it. Thanks |
It looks like there are some repeat scans in the file that get overwritten. I have added an option to not overwrite them. To access you will need to clone the repository and install by changing into the cloned directory and installing with you can then use the new arg: fundus_images = (
file.read_fundus_image(extract_scan_repeats=True)
) Curious if you've come accross this before @Oli4 ? |
Continue using this instruction to obtain the latest code? |
Yes that should work |
Hi @marksgraham, thank you for the mention, I am aware that E2E files can contain multiple volumes or enfaces images. The Reader in eyepy should make them accessible. It also has an inspect method to give an overview of the files contents. from eyepy.io import HeE2eReader
with HeE2eReader("filename.E2E") as e2e_reader:
print(e2e_reader.inspect(iterative=True)) # |
Hi Mark, Firstly, thank you for your support. After running the code you corrected, I can read and retrieve all the data. This project, through my personal use these days, I believe it is a very good and valuable project in the field of ophthalmology. At the same time, it also provided me with a lot of help, such as reading files in formats such as e2e and fds. I will use this project for a long time. If I encounter any problems in the future, I will communicate with you in a timely manner. I sincerely hope that this project can become better and better. Yesterday, through my own use, I encountered several problems. 2、About outputting dicom file label information. Regarding the label pixel spacing, it should appear in the level 1 directory, currently at level 3 Correct exampleHow is the content of this field generated?? At present, if measurements are made based on this parameter, the data is clearly incorrect! 300mm should be bigger than one eye This is my own data, and the dicom tags comply with the specifications and the values are normal. The following figure shows the measurement results 3、 About dicom tag The above is my feedback content |
Hi, Thanks for the feedback for the new dicom save feature. Could I ask you re-post these dicom issues on a new issue so its easier to keep track of? |
ok |
hi mark
I am not a pure software engineer, so it is relatively difficult to solve these problems. I hope you can help me.
I used this command(pip install git+https://github.com/marksgraham/OCT-Converter) to obtain the latest code
But when I read the e2e file, I found that the number of files was incorrect, and the actual number obtained was less than the expected number。
I uploaded the files I used.
My code content is as follows:
`import json
from oct_converter.readers import E2E
filepath = "data/01003-od.e2e"
file = E2E(filepath)
oct_volumes = file.read_oct_volume()
for volume in oct_volumes:
volume.peek(show_contours=True) # plots a montage of the volume
volume.save("{}_{}.png".format(volume.volume_id, volume.laterality))
print(volume.sex)
volume.sex = 'U'
print(volume.sex)
fundus_images = (
file.read_fundus_image()
) # returns a list of all fundus images with additional metadata if available
for image in fundus_images:
#plt.imshow(image.image)
#plt.show()
image.save("{}+{}.jpg".format(image.image_id, image.laterality))
metadata = file.read_all_metadata()
with open("metadata.json", "w") as outfile:
outfile.write(json.dumps(metadata, indent=4))`
I obtained data:
The text was updated successfully, but these errors were encountered: