Skip to content

feat: Add zarr v3 support to tensorstore backend#127

Merged
sameeul merged 3 commits intoPolusAI:masterfrom
sameeul:feat/zarrv3-via-tensorstore
Feb 17, 2026
Merged

feat: Add zarr v3 support to tensorstore backend#127
sameeul merged 3 commits intoPolusAI:masterfrom
sameeul:feat/zarrv3-via-tensorstore

Conversation

@sameeul
Copy link
Member

@sameeul sameeul commented Feb 13, 2026

Implement automatic zarr format detection (v2 vs v3) in the tensorstore backend. The backend now correctly handles both zarr v2 and v3 stores by:

  • Detecting zarr format using detect_zarr_format() utility
  • Setting appropriate FileType (OmeZarrV2 or OmeZarrV3) for TSReader/TSWriter
  • Using format-specific child enumeration:
    • v2: filesystem fallback (_list_zarr_children) for reliability
    • v3: native zarr-python array_keys()/group_keys() methods
  • Parsing metadata from both v2 (attrs["multiscales"]) and v3 (attrs["ome"]["multiscales"]) locations per NGFF 0.5 spec

Writer maintains backward compatibility by defaulting to v2 format.

Added comprehensive test coverage:

  • test_read_zarr_v3: Basic v3 zarr reading with tensorstore backend
  • test_read_zarr_v3_multi_resolution: Multi-resolution v3 zarr support
  • Added ExpD_chicken_embryo_MIP.ome.zarr (v3) to test dataset

sameeul and others added 3 commits February 13, 2026 16:43
Implement automatic zarr format detection (v2 vs v3) in the tensorstore
backend. The backend now correctly handles both zarr v2 and v3 stores by:

- Detecting zarr format using detect_zarr_format() utility
- Setting appropriate FileType (OmeZarrV2 or OmeZarrV3) for TSReader/TSWriter
- Using format-specific child enumeration:
  * v2: filesystem fallback (_list_zarr_children) for reliability
  * v3: native zarr-python array_keys()/group_keys() methods
- Parsing metadata from both v2 (attrs["multiscales"]) and v3
  (attrs["ome"]["multiscales"]) locations per NGFF 0.5 spec

Writer maintains backward compatibility by defaulting to v2 format.

Added comprehensive test coverage:
- test_read_zarr_v3: Basic v3 zarr reading with tensorstore backend
- test_read_zarr_v3_multi_resolution: Multi-resolution v3 zarr support
- Added ExpD_chicken_embryo_MIP.ome.zarr (v3) to test dataset

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@sameeul sameeul merged commit 0cbf177 into PolusAI:master Feb 17, 2026
6 of 10 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.

1 participant