scverse / scverse/spatialdata-plot

Reproduce Napari visualizations

Open
#189 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
86
Forks
21
Avg merge
14h 50m
Merged PRs (30d)
3

Description

I would like to generate static images files from NGFF/SpatialData datasets and presets stored in their NGFF Omero metadata, so that one can preview datasets without opening them interactively in Napari.

This combines the idea that SpatialData's data model resembles Napari's, and that datasets can store visualization presets for a reasonable default visualization.

For this, we still need some basic rendering properties:

  • blending: additive | opaque
    Typically, images contain multiple channel, and their visualization is different depending on the microscopy illumination type. Several fluorescence channels can be visualized in a single image by additive blending. However, currently spatialdata-plot "overwrites" pixels of channels underneath.
  • color:
    Napari allows to provide a color name for maximum intensity values and generates a corresponding color map.
  • contrast_limits (Napari) or window (Omero):
    Typically, the value range of images can differ greatly, and in order to avoid reading all pixels to compute limits, Omero stores absolute limits in the metadata. However, spatialdata-plot currently supports only Matplotlib's relative limits pmin/pmax (as quantiles_for_norm).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing spatialdata-plot rendering path and the NGFF Omero metadata described in the issue. Determine how visualization presets are currently read, then define acceptance checks for additive or opaque blending, Napari-style colors, and absolute contrast limits or windows. Done means static previews reproduce the requested preset properties without opening Napari interactively.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.