Skip to content

Bug with large 2D images #50

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

Open
amirDahari1 opened this issue Nov 7, 2024 · 3 comments
Open

Bug with large 2D images #50

amirDahari1 opened this issue Nov 7, 2024 · 3 comments
Labels
bug Something isn't working website frontend web-app

Comments

@amirDahari1
Copy link
Member

For some reason after pressing "confirm" there's a white screen. For example this nice image from René Rekers:

220810_BM10new_005_BSE_SE

@amirDahari1 amirDahari1 added bug Something isn't working website frontend web-app labels Nov 7, 2024
@rmdocherty
Copy link
Collaborator

Canvas.tsx, line 205 - add non null assertion for canvasRef before resizing

@rmdocherty
Copy link
Collaborator

Think I have addressed the root of this problem with commit in bug-fixes. There were two problems:

  1. I assumed any RGB image was actually greyscale (i.e had same values for all 3 channels). To convert RGB images -> greyscale I used PIL's convert, which averages over the 3 channels - not a problem if all channels the same, but if they are different then the result of this conversion will be different to my frontend conversion, which only chooses the R channel of the image. This means the phase values are out of sync and causes indexing problems
  2. My array preprocessing code on the backend only checked for (and therefore processed) RGB i.e 3 channel images. 4 channel images were ignored/treated as volumes

Still need to merge this to dev and then deploy onto app

@amirDahari1
Copy link
Member Author

This makes a lot of sense, thanks for clarifying!

@amirDahari1 amirDahari1 mentioned this issue Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working website frontend web-app
Projects
None yet
Development

No branches or pull requests

2 participants