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

last z slice can fail to display #223

Closed
toloudis opened this issue Jul 10, 2024 · 3 comments
Closed

last z slice can fail to display #223

toloudis opened this issue Jul 10, 2024 · 3 comments
Labels
bug Something isn't working priority Is under scheduling constraints. Should be prioritized over other outstanding PRs by reviewers. URGENT Requires immediate attention. For PRs submitters, ping your reviewers directly.

Comments

@toloudis
Copy link
Contributor

toloudis commented Jul 10, 2024

Description

When loading some data sets, and going into XY mode and moving slider to last slice, sometimes the last slice shows up completely black. ( A preliminary debugging shows that the single-slice shader thinks the Z value is out of bounds (greater than 1) in this scenario )

Expected Behavior

Expect to be able to see every Z slice when in XY mode.

Reproduction

https://allen-cell-animated.github.io/website-3d-cell-viewer/viewer?url=https%3A%2F%2Fdev-aics-dtp-001.int.allencell.org%2F%2Fassay-dev%2Fcomputational%2Fdata%2Frelease%2Femt-data%2Fmain%2F3500006256_20X_P12_B10%2Fraw.ome.zarr%2F
Go to XY mode.
move z slider to max value.
Data will never show up.

@toloudis toloudis added bug Something isn't working priority Is under scheduling constraints. Should be prioritized over other outstanding PRs by reviewers. URGENT Requires immediate attention. For PRs submitters, ping your reviewers directly. labels Jul 10, 2024
@toloudis
Copy link
Contributor Author

See this line in the shader:
pos.xyz = (pos.xyz - SUBSET_OFFSET) / SUBSET_SCALE;

We might have some floating point error that pushes this out of bounds when you have a 1x1 atlas
Removing that line makes this data show up again. Haven’t tested on any other images.
For this data, SUBSET_OFFSET.z = 0.9667 and SUBSET_SCALE.z = 0.0333 (approx 29/30 and 1/30)

Confirmed that was pushing pos.z > 1.0
Changing the bounds check in sampleAtlas to have an epsilon also fixes it:
pos[2] >= 0.0 && pos[2] <= 1.0001); // used to be 1.0

@toloudis
Copy link
Contributor Author

(1.0-0.9666)/(0.0333) > 1.0

@frasercl
Copy link
Collaborator

Closed by #224

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority Is under scheduling constraints. Should be prioritized over other outstanding PRs by reviewers. URGENT Requires immediate attention. For PRs submitters, ping your reviewers directly.
Projects
None yet
Development

No branches or pull requests

2 participants