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

Prepare multi modality support #6748

Merged
merged 228 commits into from
Mar 20, 2023
Merged

Prepare multi modality support #6748

merged 228 commits into from
Mar 20, 2023

Conversation

philippotto
Copy link
Member

@philippotto philippotto commented Jan 17, 2023

Summary

  • Supports rendering a dataset where layers can be transformed each (with an affine matrix).
  • Transformation can be specified via datasource-properties.json or via JS API (will be ephemeral, then)
  • Rendering was re-architectured to use cuckoo hashing for the dynamic look up of bucket addresses.
  • Progressive rendering is done on the GPU (instead of on the CPU).
  • For performance reasons, the plane geometries are now tessellated and the vertices are mutated by the vertex shader so that they are bucket-aligned. This enables us to precompute the cuckoo lookup in the vertex shader.
  • The pre-computation is disabled when interpolation is enabled (would cause problems at chunk borders, otherwise). Also as a workaround for issues at chunk borders, pre-computation is ignored there, too (independent of interpolation).
  • Transformed layers won't be rendered using the above optimization (since their buckets won't align with the vertices).
  • Since enabling interpolation can incur a performance cost, it's disabled by default (won't affect old preferences) and the user will get a small hint in the left sidebar if it's enabled.
  • As a consequence of the individually transformed layers, it can happen that one layer is rendered in a different magnification than another layer. This used to be uniform, but isn't anymore now (even though, it should still be uniform when no transformations are used).

URL of deployed dev instance (used for testing):

To do:

  • allow to define transforms per layer which are used in the shader
  • adapt bucket picking to respect layer transformations
  • allow to make the active mag dependent on each layer (one layer can be rendered in mag 1 and the other in mag 4)
  • remove anchor point mechanism in favor of hashing to address buckets on the GPU
  • Backend: Store matrix from datasource-properties.json in postgres, include in dataset json sent to frontend
  • Restore old behavior/functionality:
    • progressive rendering
    • data that is still being loaded should be gray instead of black
    • "The currently rendered quality is not optimal due to the available magnifications and the viewport arrangement." shows false positively
    • find my data needs to be adapted.
  • Fix bugs:
    • having more layers in a DS than can be rendered at the same time results in rendering issues
    • rotation from arbitrary mode is not removed when switching back to orthogonal mode
    • deep freeze breaks for transform matrices apparently
    • thin lines at bucket borders (solved by disabling anti aliasing which prevents flat varyings to be interpolated errorenously)
    • data offset by 32vx
    • missing data at border
    • weird triangles at border
    • sometimes bucket strip shows at viewport boundary shows wrong data
    • some transformations cause incorrect data to be rendered (needs investigation)
    • XZ and YZ rendering is corrupt (probably the computation in the vertex shader is not adapted yet)
    • sometimes cross hairs are invisible (probably due to disabled antialiasing)
    • support segmentation layers again
    • fix line artifact when rendering segmentation layer (this is caused by the segmentation patterns which rely on partial derivatives; unfortunately, these seem to be buggy now that there's a special tessellation)
  • Performance (solved by performing bucket look up in vertex shader)
  • clean up UI
    • display correct mag etc
    • fix CI tests
    • fix screenshot tests
    • add warning for performance for interpolation?
    • disable performance optimization when interpolation is enabled
    • change default for interpolation
    • doublecheck bucket loading order for transformed layers
  • go through to do comments in code

Steps to test:

  • test view mode and annotation mode for multiple datasets
  • pay attention to performance and rendering issues

Issues:


(Please delete unneeded items, merge only when none are left open)

@philippotto philippotto self-assigned this Jan 17, 2023
@philippotto
Copy link
Member Author

@daniel-wer I incorporated your remaining feedback and also updated the screenshots. I'll add an additional screenshot test for the transformations in a follow-up PR. If you accept the PR, I'll merge it today :)

Copy link
Member

@daniel-wer daniel-wer left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

frontend/javascripts/oxalis/api/api_latest.ts Outdated Show resolved Hide resolved
@philippotto philippotto enabled auto-merge (squash) March 20, 2023 12:20
@philippotto philippotto merged commit 5f25ca2 into master Mar 20, 2023
@philippotto philippotto deleted the multi-modality branch March 20, 2023 12:37
hotzenklotz added a commit that referenced this pull request Mar 20, 2023
…il-notification

* 'master' of github.com:scalableminds/webknossos:
  Prepare multi modality support (#6748)
  Improvements for terms-of-services modal (#6930)
  Fix creating task types with preferred mode (#6928)
hotzenklotz added a commit that referenced this pull request Mar 20, 2023
…pdown-menu

* 'master' of github.com:scalableminds/webknossos:
  Fix download button for annotations when tiff export is disabled (#6931)
  Update PULL_REQUEST_TEMPLATE.md
  Prepare multi modality support (#6748)
  Improvements for terms-of-services modal (#6930)
  Fix creating task types with preferred mode (#6928)
  Fix styling for login pages for dark mode users (#6916)
  Added members to admin team page (#6915)
  Release 23.03.1 (#6917)
  Redesign Welcome UI (#6904)
  Fix race condition which could disable saving (#6914)
hotzenklotz added a commit that referenced this pull request Mar 22, 2023
…wings

* 'master' of github.com:scalableminds/webknossos:
  Update screenshots (#6934)
  Support rendering negative floats (#6895)
  Fix loading of webworkers in dev mode (#6933)
  Restore cache buster for webworkers (#6932)
  Introduce data vault as storage backend abstraction (#6899)
  Fix download button for annotations when tiff export is disabled (#6931)
  Update PULL_REQUEST_TEMPLATE.md
  Prepare multi modality support (#6748)
  Improvements for terms-of-services modal (#6930)
  Fix creating task types with preferred mode (#6928)
@philippotto philippotto mentioned this pull request Jun 30, 2023
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support multi-modality datasets
3 participants