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

Segment to Bucket Index for Volume Annotations #7063

Merged
merged 36 commits into from
Jun 13, 2023
Merged

Segment to Bucket Index for Volume Annotations #7063

merged 36 commits into from
Jun 13, 2023

Conversation

fm3
Copy link
Member

@fm3 fm3 commented May 9, 2023

Creates an index structure for volume annotations. For every segment id, the list of buckets that contain this segment is stored. This is stored separately in the fossildb and updated on volume annotation mutation.

This lays the basis for new routes calculating properties of the segment volumes, e.g. the volume in voxels. A new route already provides that one. More complex metrics (surface area, sphericity, connected components) may be added later

TODO

  • create data structure (proto vec3int list)
  • add column family, put and get in fossildb
  • on bucket save, get id set
  • on bucket save, load previous bucket (either from fallback layer or volume), get id set
  • get segment index for affected segments, mutate it, write back
  • add route to compute total segment volume
  • duplicate should update this index too
  • downsampling should update this index too
  • revert to version should update this index too (?)
  • how to handle legacy volume annotations with no segment index? hasSegmentIndex → set to true in duplicate (if no fallback layer)
  • perf optimization: skip previous bucket check for “duplicate”
  • perf optimization: process multiple buckets at once (use local buffer + flush)
  • perf optimization: avoid UnsignedInteger conversion of every voxel
    • for uint32
    • for the other types (ShortStream, ByteStream are not available)
  • remove logging, clean up code
  • merging volume tracings should update this index too
  • add some explaining comments (e.g. to buffer)
  • test some more (including merge)
  • CI

Follow-up

Steps to test:

  • Create volume annotation without fallback layer
  • brush some, with several ids
  • go to route /tracings/volume/<tracingId>/segmentStatistics/volume?segmentId=1&mag=1&token=<token>
  • should get segment volume in vx
  • merging annotations should still work (and create merged segment index if all source tracings have segment index)
  • saving volume updates should not be unbearably slow (slower than before, though. I had about 100ms for 32 buckets, which is about thrice the old value)

Issues:


@fm3 fm3 changed the title WIP: Segment to Bucket Index for Volume Annotations Segment to Bucket Index for Volume Annotations Jun 12, 2023
@fm3 fm3 marked this pull request as ready for review June 12, 2023 09:11
@fm3 fm3 requested a review from frcroth June 12, 2023 09:11
@fm3 fm3 requested a review from frcroth June 12, 2023 14:34
@fm3 fm3 merged commit 7602034 into master Jun 13, 2023
2 checks passed
@fm3 fm3 deleted the segment-index branch June 13, 2023 08:00
hotzenklotz added a commit that referenced this pull request Jun 14, 2023
…esign-right-sidebar

* 'master' of github.com:scalableminds/webknossos:
  Layer actions overflow menu (#7123)
  Unify DatasetPath and VaultPath, cleaner ChunkReader creation (#7134)
  Segment to Bucket Index for Volume Annotations (#7063)
  Reverse compression on sharded neuroglancer datasets (#7135)
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.

Segments-to-chunk index
2 participants