Skip to content

New points features for spatial transcriptomics - #796

Draft
aganders3 wants to merge 18 commits into
mainfrom
aganders3/points-world-size
Draft

aganders3 wants to merge 18 commits into
mainfrom
aganders3/points-world-size

Conversation

@aganders3

@aganders3 aganders3 commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Draft because I'm still reviewing this myself

Summary

This adds three features useful for visualization of spatial transcriptomics data:

  1. size points in world space instead of screen pixels so they match the image size as you zoom in
  2. a "depth slab" for a points renderable, such that points may be shown from within a thick slab centered on the image slice; this was previously implemented in a hacky way in the Particles layer in the points example
  3. signed distance functions for the markers - this allows convenient anti-aliasing and styling of markers with outlines, etc.

Unfortunately using GL_POINTS does result in some size aliasing of points when scaled in world space (they can only get so big when you zoom in, then they stop growing). We could someday work around this using instanced billboarded quads instead (see vispy/vispy#2701).

Old behavior (point size specified in pixels, not world units) will continue to work.

Tests & Checks

Updated the existing points example to use the new features added here, inspected visually

Here's a comparison of our points example

main

Screen.Recording.2026-10-29.at.5.11.17.PM.mov

this PR

Screen.Recording.2026-10-30.at.12.50.40.PM.mov

This branch has not been deployed

No deployments
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.

1 participant