feat: Add catmaid spatially indexed skeletons#122
Draft
afonsobspinto wants to merge 353 commits into
Draft
Conversation
35717cb to
ecccda9
Compare
8cf3a18 to
141044d
Compare
07e8130 to
99925a7
Compare
feat: Tight boundaries between generic spatial skeleton and catmaid; Use generic arrays over fixed x,y,z ; Update spatial skeleton metadata format
The overlay memory had a bit of churn in how often we were creating memory to then immediately send it to the GPU and recreate all that memory again on the next build. Instead we build a monotically increasing scratch buffer. This buffer can be reused across sources also because it's not running in parallel. We later might want to look at removing elements from the scratch, but as a first step it should help. For uploading the textures, we packed them, then unpacked them. So introduces new utility to upload these unpacked versions to avoid this. For rebuilding the overlay, we don't keep "selected" as part of the cache key anymore. So now we just cache the geoemtry, and handle the selection updating as a separate update to the geometry.
also revert back to master branch style on these
Replace the loose `dynamicSegmentAppearance` boolean on `SkeletonShaderContext` with a typed `SkeletonShaderParameters` interface passed as `extraParameters` to `parameterizedEmitterDependentShaderGetter`. `hasSegmentStatedColors` and `hasSegmentDefaultColor` now participate in shader memoization rather than being toggled via runtime uniforms (`uUseSegmentStatedColors`, `uUseSegmentDefaultColor`), so shaders are only recompiled when color state changes and the branches are resolved at compile time. GPU hash tables for visible segments, excluded segments, and stated colors are now cached on `RenderHelper` and recreated only when the underlying hash table changes, matching the pattern in `segmentation_render_layer.ts` and fixing repeated GPU allocations on every draw call. `RenderHelper.disposed()` is extended to cover all three tables (previously only stated colors were disposed), and `endLayerSeenTextureUnits` is promoted to a reused field to avoid a per-call Set allocation. `SkeletonLayer` explicitly implements `SkeletonShaderContext` with a static `skeletonShaderParameters` value (all false), since non-spatial skeletons resolve color upstream and pass it via uniforms.
these were posing a bit like the custom user attrs, but they are not. Could use a further refactor in the future along with the seg ID fix, but another card about that
we made a general change which doesn't need to be in place. For our own attrs, we know the type and don't need to handle them in the general loop. For user types, they are fixed to being float only
Refactor/skeleton frontend
feat: Keep selection when activating edit tools
feat: Target affect chunks only for invalidation after edit operations
refactor: more baseline code between node and edge shader getters, and create common attach for the 2d/3d skeleton render layers
accidentally read the selected node after drawing the circle
fix: correct node highlight not showing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
regression_test.zip