Skip to content

Enable remote image reading#53

Merged
TimMonko merged 6 commits intondev-kit:mainfrom
TimMonko:feat/remote-images
Feb 19, 2026
Merged

Enable remote image reading#53
TimMonko merged 6 commits intondev-kit:mainfrom
TimMonko:feat/remote-images

Conversation

@TimMonko
Copy link
Member

Description

While investigating #50 and napari/docs#907, I realized that remote image reading is not possible with nImage properly.
BioImage accepts uri's, and reader plugins can implement remote file reading, such as bioio-ome-zarr. However, my memory check in nImage.layer_data does not work for remote file systems, so instead this adds a property for knowing if the file is remote. It also interprets the filepath/uri stem for local and remote systems now.

you can try out a really small remote with viewer.open('https://uk1s3.embassy.ebi.ac.uk/ebi-ngff-challenge-2024/4ffaeed2-fa70-4907-820f-8a96ef683095.zarr', plugin='ndevio')

image

@codecov
Copy link

codecov bot commented Feb 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enables nImage/napari reader support for remote image URIs (e.g. HTTP/S3 Zarr) by detecting remote filesystems and avoiding local-only in-memory heuristics, plus adds tests to exercise remote reads.

Changes:

  • Add nImage.is_remote and use it to select dask-backed reading for remote sources.
  • Add nImage.path_stem to derive layer-name stems from both local paths and URIs.
  • Add tests that open a remote OME-Zarr via nImage and via viewer.open(..., plugin="ndevio").

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
src/ndevio/nimage.py Introduces remote detection (is_remote), URI-aware naming (path_stem), and updates layer_data loading strategy.
src/ndevio/utils/_layer_utils.py Broadens determine_in_memory typing/docs to accept str paths/URIs.
tests/test_nimage.py Adds a remote Zarr read test for nImage.
tests/test_napari_reader.py Adds a napari viewer test that opens a remote Zarr through the plugin.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@TimMonko TimMonko merged commit 0a82e75 into ndev-kit:main Feb 19, 2026
12 checks passed
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.

2 participants