Update precomputed annotation-data at run-time?
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 389
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 3
Description
We are rendering ~100k cell centers as point annotations. This work great. (Precomputed format, only one spacial index. The comments in #227 helped a lot to set it up.)
Now we would like to visualize run-time information that we maintain external of neuroglancer (still in javascript). Basically a integer per cell. (More concrete: For visualizing multiple external selection states via point annotation shader.)
Conceptually, I think a Uint64Map (Annotation-ID --> Uint64) would work. The data is updated only infrequently (not per-frame), so I don't think it needs to be in the shader. A callback with the AnnotationID for each to-be-rendered annotation would probably work, too, as an API.
To see where this goes, we have added a uint32 property to the precomputed annotations. We can use that in the shader, and we have made an ugly hack (in neuroglancer/annotation/renderlayer.ts, _drawGeometryChunkData_) to overwrite the already fetched precomputed data at run-time and trigger _redrawNeeded_. This works.
Are there maybe alternatives approaches for this that I've overlooked, or even existing features that could serve this use-case?
(We first tried just to link via segmentation layer / relationship. But it seems that for 90k selected segments we would get 90k http range-requests, which I'm pretty sure will have very bad performance.)
Contributor guide
Assessment
This issue has not been assessed yet.