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

Extract individual plots as images. #1

Open
IsmailM opened this issue May 5, 2022 · 3 comments
Open

Extract individual plots as images. #1

IsmailM opened this issue May 5, 2022 · 3 comments

Comments

@IsmailM
Copy link

IsmailM commented May 5, 2022

Hi,

Many thanks for building this - it has been extremely useful.

I was wondering if it was possible to extract the individual plots (particularly the percentile plots) as images?

Many thanks,
Ismail

@msaifee786
Copy link
Owner

msaifee786 commented May 6, 2022 via email

@IsmailM
Copy link
Author

IsmailM commented May 7, 2022

Hi Murtaza,

Many thanks for the swift reply.

We are using the script as part of our pipeline for VF data uploaded to a grading platform at Moorfields. Specifically, we use the script to ensure that users are uploading data with the correct strategy and then finally display the VF data in a custom format within a webpage.

I am able to extract the original plot images as follows:

from PIL import Image
Image.fromarray(hvf_obj.image).save("tmp/out/orig.jpeg")
Image.fromarray(hvf_obj.raw_value_array.plot_image).save("tmp/out/raw_value_array.jpeg")
Image.fromarray(hvf_obj.abs_dev_value_array.plot_image).save("tmp/out/abs_dev_value_array.jpeg")
Image.fromarray(hvf_obj.pat_dev_value_array.plot_image).save("tmp/out/pat_dev_value_array.jpeg")
Image.fromarray(hvf_obj.abs_dev_percentile_array.plot_image).save("tmp/out/abs_dev_percentile_array.jpeg")
Image.fromarray(hvf_obj.pat_dev_percentile_array.plot_image).save("tmp/out/pat_dev_percentile_array.jpeg")

I noticed that the hvf_object does not include the pattern sensitivity plots (i.e. the plot on the right below). Is this by design, or am I missing something?

image

@msaifee786
Copy link
Owner

msaifee786 commented May 7, 2022 via email

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