skillfed

multiscale-spatial-image

Generate a multiscale, chunked, multi-dimensional spatial image data structure that can be serialized to OME-NGFF.

multiscale-spatial-image v2.1.0 95.6K downloads/30d#13,260 on PyPI57
Permissive 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) AGING released

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-image

uv

uv add multiscale-spatial-image

poetry

poetry add multiscale-spatial-image

Installing 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

Intended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13

Tags

multiscale image pyramid generationome-ngff zarr serializationxarray spatial image downsamplingdask chunked image processingmultiscale scientific imagingspatial metadata preservationimage coarsening and resampling
imagingmultiscale-pyramidsome-ngff

More Scientific/Engineering packages