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

Fix rendering for intensity range of 0 #5676

Merged
merged 7 commits into from
Aug 23, 2021

Conversation

MichaelBuessemeyer
Copy link
Contributor

@MichaelBuessemeyer MichaelBuessemeyer commented Aug 16, 2021

This PR fixes a bug where having one layer with the intensity range of 0 led to no data at all being rendered.

This problem is tackled by

  1. determining min == max
  2. if min == max add +1 to the divisor of the division to avoid dividing by 0
  3. Later replace the calculated color value with black in the case of min == max.

URL of deployed dev instance (used for testing):

  • https://___.webknossos.xyz

Steps to test:

  • Please do the following steps for a few datasets to ensure this fix works for "all". I tested this on the ROI and l4 sample dataset.
  • Open a dataset in view mode
  • Go to the layer settings and move the slider of a color layer of your choice to the same values (e.g. 100).
  • The data layer should now no longer be rendered but the other active layers should still be visible.
  • Additionally, there should be a warning icon stating that the layer is not rendered and that the user should prefer to disable the layer instead of reducing the intensity range to 0.

Issues:


Copy link
Member

@philippotto philippotto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great fix :)

@philippotto philippotto enabled auto-merge (squash) August 19, 2021 07:56
@philippotto
Copy link
Member

please update the changelog before merging :)

@MichaelBuessemeyer MichaelBuessemeyer enabled auto-merge (squash) August 23, 2021 12:16
@MichaelBuessemeyer MichaelBuessemeyer merged commit 3cf974b into master Aug 23, 2021
@philippotto philippotto deleted the fix-rendering-for-0-historgram-range branch June 14, 2022 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting min and max to same value in histogram "hides" all layers
2 participants