scverse / scverse/spatialdata-io

Feature request: lazy parsing of the pyramidal OME-TIFF morphology focus in Xenium

Open
#407 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

xenium
Dominant language
Python
Stars
103
Forks
65
Avg merge
1h 8m
Merged PRs (30d)
3

Description

See context:

Saving and reloading is the general recommendation for SpatialData objects coming from spatialdata-io. Nevertheless there is more to say here. In the case of Xenium >= 2.x.x and the morphology_focus image, we could actually take advantage of the pyramidal OME-TIFF format and construct the multiscale image directly from each scale and chunk (instead of lazily loading the large image and downscaling to a custom chunk size). This is currently not done as the spatialdata.models.Image2DModel.parse() method does not accept a DataTree object, but only a DataArray. If we extend this we can then also add this feature to spatialdata-io. Saving and reloading the object would still be preferable, but it would not be necessary for the case you reported.

Originally posted by @LucaMarconato in #1161

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 with spatialdata.models.Image2DModel.parse() and inspect how it currently handles DataArray inputs. Then trace the Xenium morphology_focus path in spatialdata-io and the pyramidal OME-TIFF loading entry point. Done means DataTree input is supported and morphology_focus can be constructed lazily from its scales and chunks without requiring save-and-reload.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.