-
Notifications
You must be signed in to change notification settings - Fork 3
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
Comments
Hi Ismail, thanks for your email. Glad to hear its been of use. I'm happy
to help anyway I can.
I'm curious - what application are you using the script for?
It likely is possible to extract the plots as images, but let me confirm
with you to ensure I'm understanding correctly. Are you looking to extract
the entire 10x10 grid (eg, the total dev or pattern dev percentile plots as
a whole) or the individual plot element icons? Either one should be doable
but would require a little modification of the code.
Thanks,
Murtaza Saifee
…On Thu, May 5, 2022 at 12:41 PM Ismail Moghul ***@***.***> wrote:
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
—
Reply to this email directly, view it on GitHub
<#1>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHFGLBZG7I43J2J3ZJITMTVIQP47ANCNFSM5VGCITBQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
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? |
Hi Ismail, thanks for the info - very interesting! I've wanted to make a
custom HVF viewer using this extraction tool; its nice to hear you are
doing it at Moorfields.
Regarding the grayscale image, unfortunately the extraction script is not
currently designed to extract it out separately. That being said, its
shouldn't be that difficult (all the code is there). I am happy to help
code this and include it in the extraction script for you but unfortunately
it may need to wait a few months as my clinical schedule is quite busy at
the moment.
Thanks,
Murtaza
…On Sat, May 7, 2022 at 6:16 AM Ismail Moghul ***@***.***> wrote:
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 ImageImage.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: image]
<https://user-images.githubusercontent.com/5578375/167255532-c373ae07-a6d2-4c14-a06c-c4e701d4b026.png>
—
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHFGLA7BPSBHS2XOYHJZ5TVIZUMVANCNFSM5VGCITBQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
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
The text was updated successfully, but these errors were encountered: