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

[BUG] Cellfinder 2D viewer not working on windows #26

Closed
FedeClaudi opened this issue Jan 29, 2020 · 11 comments
Closed

[BUG] Cellfinder 2D viewer not working on windows #26

FedeClaudi opened this issue Jan 29, 2020 · 11 comments
Assignees
Labels
bug Something isn't working HIGH PRIORITY

Comments

@FedeClaudi
Copy link

Describe the bug
The 2D viewer to inspect the results of cellfinder doesn't start on windows [gets stuck while loading the data].

@FedeClaudi FedeClaudi added the bug Something isn't working label Jan 29, 2020
@adamltyson
Copy link
Member

Thanks to @FedeClaudi, this seems to be related to napari/napari#733. Should be an easy workaround.

@FedeClaudi
Copy link
Author

As per the issue above:

Calling v.add_image(images, contrast_limits =[0.0, 1000.0]) works,
The upper bound of the contrast limits should be computed for each dataset though.

@adamltyson
Copy link
Member

Thanks.
Temporary fix could be:

  • Compute histogram on "some" images (e.g. every nth, or the middle n)
  • Calculate a "liberal" limit (e.g. 0->max*2)
  • v.add_image with these contrast limits

@adamltyson
Copy link
Member

Alternatively, just pass the "theoretical" max from dtype and allow the user to change the limits. This is probably not ideal though.

@adamltyson
Copy link
Member

N.B. If this issue persists, it will need fixing for the curation interface too.

@FedeClaudi
Copy link
Author

Can confirm that the same problem comes up with curation interface.

@adamltyson
Copy link
Member

Fixed in a627661.

Not sure if this should be made smarter though. Currently it just takes 2x max of the middle slice.

@sofroniewn
Copy link

@FedeClaudi @adamltyson I'm trying to chase down and eliminate any remaining contrast limit estimation bugs so that if users don't explicitly pass contrast_limits we don't choke. Can you confirm if you're still having any issues if you don't pass contrast_limits with the 0.2.12 napari release.

@sofroniewn
Copy link

sofroniewn commented Mar 14, 2020

Compute histogram on "some" images (e.g. every nth, or the middle n)

This is now the approach napari employs - see https://github.com/napari/napari/blob/dec5b9965d4a3fcea2d8314064465af14a97fec7/napari/layers/layer_utils.py#L25-L65 - it would be good to know if we are failing still

@adamltyson
Copy link
Member

@sofroniewn I couldn't replicate this issue, @FedeClaudi is this something you can test? Perhaps by loading raw data into the amap viewer (assuming you can actually access your data currently)?

I'd like to remove my hacky fix and rely on napari dealing with this more gracefully if possible.

@adamltyson adamltyson reopened this Mar 14, 2020
@adamltyson
Copy link
Member

Looks to be working (eda3c10), but I could never fully reproduce this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working HIGH PRIORITY
Projects
None yet
Development

No branches or pull requests

3 participants