Skip to content

Add neuroglancer points data type and loader implementation#2420

Merged
keller-mark merged 25 commits intomainfrom
keller-mark/neuroglancer-points-filetype
Mar 10, 2026
Merged

Add neuroglancer points data type and loader implementation#2420
keller-mark merged 25 commits intomainfrom
keller-mark/neuroglancer-points-filetype

Conversation

@keller-mark
Copy link
Copy Markdown
Member

@keller-mark keller-mark commented Feb 18, 2026

Fixes #2153

Fixes #2359

Background

TODO

  • finish loader implementation and register in base-plugins list
  • update the code at
    return useExtractOptionsForNg(loaders, dataset, DataType.OBS_SEGMENTATIONS, matchOn);
    that constructs the initial NG viewerState
    • refactor to use the existing useObsSegmentationsData and useObsPointsData hooks instead. Obtain the URLs returned by these functions, then pass these URLs down to extractDataTypeEntities rather than the manual loader traversal logic

Current demo, with above features: https://legacy.vitessce.io/demos/2026-03-06/405724179/?dataset=neuroglancer-merfish

  • Force the user to specify the name of the featureKey and pointIndex columns as part of the fileType options. (We could get it from the spatialdata_attrs or the parquet schema, but this would require an associated spatialdata.zarr store+points element, which introduces complications of keeping the URLs associated to each other, etc.
  • Resetting the coordinate system upon color / other state changes.
  • Update the selection logic based on the segmentation layer/channel hierarchy
  • Obtain the list of segments from the obsFeatureMatrix.obsIndex when obsSets or an obsSetSelection is absent?
    • Related - ensure that the points AND meshes both render in the merfish config example. I think the issue is that the meshes in this dataset are sharded, but we are using a version of NG that does not support this.
  • Linting and other cleanup.
  • Unit tests for shader generation code

Checklist

  • Have tested PR with one or more demo configurations
  • Documentation added, updated, or not applicable

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 19, 2026

Size Change: +147 kB (+1.97%)

Total Size: 7.59 MB

Filename Size Change
./packages/main/prod/dist/index-C0-lmbLF.js 147 kB +147 kB (new file) 🆕
ℹ️ View Unchanged
Filename Size
./packages/main/prod/dist/blosc-********.js 612 kB
./packages/main/prod/dist/chunk-INHXZS53-********.js 558 B
./packages/main/prod/dist/deflate-********.js 208 B
./packages/main/prod/dist/higlass-********.js 3.57 MB
./packages/main/prod/dist/index-********.js 235 kB
./packages/main/prod/dist/index.min.js 1.38 kB
./packages/main/prod/dist/jpeg-********.js 15.6 kB
./packages/main/prod/dist/lerc-********.js 89.3 kB
./packages/main/prod/dist/lz4-********.js 43.9 kB
./packages/main/prod/dist/lzw-********.js 2.07 kB
./packages/main/prod/dist/OrbitControls-********.js 229 kB
./packages/main/prod/dist/packbits-********.js 541 B
./packages/main/prod/dist/pako.esm-********.js 37.1 kB
./packages/main/prod/dist/raw-********.js 133 B
./packages/main/prod/dist/ReactNeuroglancer-********.js 1.67 MB
./packages/main/prod/dist/troika-three-text.esm-********.js 179 kB
./packages/main/prod/dist/webimage-********.js 801 B
./packages/main/prod/dist/zstd-********.js 754 kB

compressed-size-action

@keller-mark keller-mark marked this pull request as ready for review March 6, 2026 22:15
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 6, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 12.99% 9293 / 71494
🔵 Statements 12.99% 9293 / 71494
🔵 Functions 49.5% 553 / 1117
🔵 Branches 68.42% 1428 / 2087
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
examples/configs/src/index.js 0% 0% 0% 0% 1-256
examples/configs/src/view-configs/3d-maps/melanoma-neuroglancer-filtered.js 0% 100% 100% 0% 2-147
examples/configs/src/view-configs/3d-maps/melanoma-neuroglancer.js 0% 100% 100% 0% 2-159
examples/configs/src/view-configs/3d-maps/neuroglancer-merfish.js 0% 100% 100% 0% 2-170
packages/constants-internal/src/constant-relationships.ts 100% 100% 100% 100%
packages/constants-internal/src/constants.ts 100% 100% 100% 100%
packages/constants-internal/src/coordination.ts 100% 100% 100% 100%
packages/file-types/spatial-zarr/src/neuroglancer-loaders/NgAnnotationPointsDataLoader.js 0% 0% 0% 0% 1-19
packages/file-types/spatial-zarr/src/neuroglancer-loaders/index.js 0% 0% 0% 0% 1-3
packages/main/all/src/base-plugins.ts 99.52% 85.71% 100% 99.52% 246-247
packages/schemas/src/file-def-options.ts 0% 0% 0% 0% 1-452
packages/schemas/src/index.ts 0% 0% 0% 0% 1-68
packages/view-types/neuroglancer/src/NeuroglancerSubscriber.js 0% 100% 100% 0% 3-765
packages/view-types/neuroglancer/src/data-hook-ng-utils.js 0% 0% 0% 0% 1-252
packages/view-types/neuroglancer/src/shader-utils.js 61.56% 93.1% 94.11% 61.56% 486-653
packages/view-types/neuroglancer/src/use-memo-custom-comparison.js 0% 100% 100% 0% 3-189
Generated in workflow #4877 for commit bb69290 by the Vitest Coverage Report Action

@keller-mark keller-mark merged commit 03a0bc9 into main Mar 10, 2026
7 checks passed
@keller-mark keller-mark deleted the keller-mark/neuroglancer-points-filetype branch March 10, 2026 01:23
@github-actions github-actions bot mentioned this pull request Mar 10, 2026
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.

Neuroglancer: shaders for points Neuroglancer view: provide point data URLs via datasets part of Vitessce config

1 participant