Image-pyramid source
Discover dimensions, then request a view.
OME-Zarr describes channels, dimensions, scales, and image groups separately from the chunks that store pixels. The source keeps those choices explicit in the metadata and raster request.
Discover
Read OME metadata, dimensions, channels, and pyramid levels.
Select
Choose level, time, depth, channels, and output size.
Read
Fetch only the chunks covering the requested raster.
Render
Return typed raster data for the application or visualization layer.
Detailed guide
OME-Zarr source reference
The detailed reference covers store discovery, metadata options, dimension selection, channel handling, and raster output.
OMEZarrLoader creates a non-geospatial source for OME-Zarr v2 and v3 image pyramids.
| Property | Value |
|---|---|
| Data source | OMEZarrImageSource |
Usage
import {createDataSourceSync} from '@loaders.gl/core';
import {OMEZarrLoader} from '@loaders.gl/scientific/zarr';
const source = createDataSourceSync('https://example.com/spatialdata.zarr', [OMEZarrLoader], {
zarr: {
path: 'images/example-image',
requireConsolidatedMetadata: true
},
omezarr: {
interleaved: false,
defaultChannels: [0, 1, 2]
}
});
const metadata = await source.getMetadata();
const raster = await source.getRaster({level: 'auto', width: 1024, height: 768, t: 0, z: 0});
Source options
zarr
path?: string | nullselects an image group below the store root.metadataPath?: 'auto' | '.zmetadata' | 'zmetadata' | 'zarr.json'controls consolidated metadata discovery.autoprobes Zarr v3 and v2 names.labels?: string[]overrides dimension labels when the array and OME metadata do not provide them.requireConsolidatedMetadata?: booleanrequires a consolidated metadata document before the image group is opened. Defaults totrue.
omezarr
interleaved?: booleancontrols whether multi-channel results default to one interleaved typed array. Defaults tofalse.defaultChannels?: number[]selects channels when a request omitschannels.
API
getMetadata(signal?: AbortSignal): Promise<OMEZarrSourceLoaderMetadata>
Returns image dimensions, dtype, dimension labels, time/z/channel sizes and defaults, native chunk dimensions, channel display metadata, and available pyramid levels. Each level retains its OME coordinate transformations when present.
getRaster(parameters?: GetOMEZarrParameters): Promise<RasterData>
Loads one complete 2D plane from a pyramid level. OME-Zarr multiscale metadata is also exposed
through the common ScanQueryMetadataProvider interface (source.getQueryMetadata()), allowing
source-neutral scan UIs to discover the available levels without reading pixel chunks.
level?: number | 'auto'selects a level explicitly, or chooses the smallest level that still covers the requestedwidthandheight.width?: numberandheight?: numberprovide target display dimensions forlevel: 'auto'.t?: numberselects the time index.z?: numberselects the z index.channels?: number[]selects one or more channel indices.interleaved?: booleanoverrides the source-level output layout.signal?: AbortSignalcancels in-flight metadata or chunk requests.
Planar multi-channel results contain one typed array per channel. Interleaved results contain one
typed array with bandCount samples per pixel.
When level is omitted, level 0 is used for backwards compatibility. getMetadata().levels
contains each level's pixel dimensions, dataset path, coordinate transformations, and scale
relative to the full-resolution level.
Consolidated root discovery
loadZarrConsolidatedMetadata(url, options?) loads and normalizes a Zarr v2 or v3 consolidated
metadata document. The result includes topLevelGroups and topLevelArrays, which applications
can use to browse SpatialData-style roots before opening a specific image group.
Current scope
The source reads numeric OME-Zarr image planes and pyramids. It does not yet normalize SpatialData tables, points, shapes, or coordinate systems into loaders.gl data sources.
TileMatrix compatibility
OME spatial axes and physical units alone do not establish a geographic CRS. The OME source
retains native level and channel/time/depth metadata rather than inventing a TileMatrixSet.
Explicitly georeferenced generic Zarr multiscales are supported by
GeoZarrLoader.