Skip to content

feat: Add catmaid spatially indexed skeletons#122

Draft
afonsobspinto wants to merge 353 commits into
masterfrom
feature/edit-mode
Draft

feat: Add catmaid spatially indexed skeletons#122
afonsobspinto wants to merge 353 commits into
masterfrom
feature/edit-mode

Conversation

@afonsobspinto
Copy link
Copy Markdown
Member

@afonsobspinto afonsobspinto commented Mar 13, 2026

@afonsobspinto afonsobspinto force-pushed the feature/edit-mode branch 4 times, most recently from 35717cb to ecccda9 Compare March 16, 2026 19:59
seankmartin and others added 30 commits May 7, 2026 16:34
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
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
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.

2 participants