multiscale-spatial-image
Generate a multiscale, chunked, multi-dimensional spatial image data structure that can be serialized to OME-NGFF.
What it is and what it does
multiscale-spatial-image builds multiscale image pyramids—progressively downsampled versions of an image—and organizes them into an Xarray Datatree structure where each scale level is a separate node. Each scale is a chunked Dask array, enabling lazy evaluation and out-of-core processing. The package preserves spatial metadata (coordinates, dimensions) across all scales and can serialize the entire pyramid to OME-NGFF (Open Microscopy Environment Next Generation File Format) via Zarr, making it suitable for scientific imaging workflows that need efficient storage and access to multiscale data.
The package is built on top of spatial-image, xarray, and Dask, and provides convenience methods like transpose, reindex, and assign_coords that operate across all scales while skipping non-dimensional nodes. It targets scientific Python users working with microscopy, medical imaging, or other multidimensional spatial data who need to generate and store image hierarchies in a standard, interoperable format.
Use it for:
- Generate multiscale pyramids from microscopy images for efficient zoom-and-pan visualization in web or desktop viewers
- Prepare large volumetric datasets for hierarchical processing pipelines that operate at different resolutions
- Convert single-scale images to OME-NGFF Zarr stores for archival and sharing with other imaging software
- Apply transformations (transpose, reindex) uniformly across all scales of a multiscale dataset
- Build image analysis workflows that downsample data for preview or coarse-to-fine processing strategies
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Generates multiscale image pyramids organized as Xarray Datatrees, with built-in support for chunked Dask arrays and serialization to OME-NGFF/Zarr formats.
Yes, if you work with multidimensional spatial imaging data and need to generate and store multiscale pyramids in a standard format. The package has low install friction, permissive licensing, and no known vulnerabilities. Maintenance is aging but not abandoned; the API is explicitly pre-1.0 and subject to change, so pin versions carefully in production. Best suited for scientific and research use cases rather than production services.
Install
multiscale-spatial-image on PyPI
pip
pip install multiscale-spatial-imageuv
uv add multiscale-spatial-imagepoetry
poetry add multiscale-spatial-imageInstalling multiscale-spatial-image
Before you install
Low friction: pure Python wheel with no compiled dependencies. Maintenance status is aging—274 days since last release—but the repository remains active with recent commits and no archived status.
License in practice
Apache 2.0 permissive license allows commercial and derivative use with minimal restrictions; attribution and license notice required in distributions.
Quickstart
pip install multiscale_spatial_image
import numpy as np
from spatial_image import to_spatial_image
from multiscale_spatial_image import to_multiscale
array = np.random.randint(0, 256, size=(128, 128), dtype=np.uint8)
image = to_spatial_image(array)
multiscale = to_multiscale(image, [2, 4])
Requires Python 3.11 or later; spatial-image dependency must be installed first to create the base spatial image object.
Verify before relying
- Performance characteristics and memory efficiency when handling very large image datasets
- Supported downsampling methods beyond the examples shown (coarsen, resampling strategies)
- Compatibility with specific OME-NGFF versions and zarr store configurations
Package facts
| License | Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 8 — dask, ngff-zarr, numpy, python-dateutil, spatial-image, xarray-dataclass, xarray, zarr |
| Maintenance | aging — 274 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 95,614/month — #13,260 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: multiscale_spatial_image-2.1.0-py3-none-any.whl
Keywords: dask, imaging, itk, ngff, ome, visualization, zarr
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
ome-zarrReads and writes multi-resolution images stored…
permissive · top 15,000 on PyPI
spatial_imagespatial-image provides an N-dimensional spatial…
permissive · top 15,000 on PyPI
tiledTiled is a service for secure, structured…
permissive · top 15,000 on PyPI
spatialdataSpatialData is a data framework and…
permissive · top 15,000 on PyPI
odc-loaderConstructs xarray objects from parsed…
permissive · top 15,000 on PyPI
xarrayxarray adds dimension, coordinate, and…
permissive · top 5,000 on PyPI
tensorstoreTensorStore reads and writes large…
permissive · top 5,000 on PyPI
xarray-dataclassDefines typed xarray DataArray and Dataset…
permissive · top 15,000 on PyPI
odc-stacConverts STAC (SpatialTemporal Asset Catalog)…
unclear · top 15,000 on PyPI