Skip to main content

Class: OMEZarrImageDataProvider

Defined in: @tissuumaps-storage/src/ome-zarr/OMEZarrImageDataProvider.ts:28

Data provider for OME-Zarr images

Opens an OMEZarrImageDataSource as OMEZarrImageData with one tile source and one precomputed value histogram per channel if the image has a channel axis (even one of length one), and with a single tile source otherwise.

Implements​

Constructors​

Constructor​

new OMEZarrImageDataProvider(): OMEZarrImageDataProvider

Returns​

OMEZarrImageDataProvider

Properties​

name​

readonly name: "OME-Zarr" = "OME-Zarr"

Defined in: @tissuumaps-storage/src/ome-zarr/OMEZarrImageDataProvider.ts:41

The name of the data provider

Implementation of​

ImageDataProvider.name


schema​

readonly schema: object

Defined in: @tissuumaps-storage/src/ome-zarr/OMEZarrImageDataProvider.ts:43

The JSON schema for the data source

properties​

properties: object

properties.source​

source: object

properties.source.type​

type: string = "string"

properties.t​

t: object

properties.t.minimum​

minimum: number = 0

properties.t.type​

type: string = "integer"

properties.z​

z: object

properties.z.minimum​

minimum: number = 0

properties.z.type​

type: string = "integer"

required​

required: string[]

type​

type: string = "object"

Implementation of​

ImageDataProvider.schema


uischema​

readonly uischema: object

Defined in: @tissuumaps-storage/src/ome-zarr/OMEZarrImageDataProvider.ts:61

The JSON Forms UI schema for the data source

It must not contain a control for the data source's source, which the application renders itself if the schema declares it, as a string.

elements​

elements: object[]

type​

type: string = "VerticalLayout"

Implementation of​

ImageDataProvider.uischema

Methods​

load()​

load(normalizedDataSource, options?): Promise<OMEZarrImageData>

Defined in: @tissuumaps-storage/src/ome-zarr/OMEZarrImageDataProvider.ts:174

Opens an OME-Zarr image data source and returns the loaded image data

The OME-Zarr image and its arrays are loaded once with openOMEZarr and shared between the tile sources opened for it: one per channel for images with a channel axis, or a single one for images without one. Every tile source renders exactly one channel (c), so that its tile data holds a single tile (see OMEZarrImageData.getTileData) and its resolved omero metadata is that channel's. The z and t of the data source select the plane to open.

For images with a channel axis, the channels are opened concurrently, each computing the value histogram of its plane from a downsampled resolution level as soon as its tile source has opened (see OMEZarrImageDataProvider._computeChannelHistogram), so that OMEZarrImageData.getChannelHistogram can return it without computing anything.

Parameters​

normalizedDataSource​

NormalizedOMEZarrImageDataSource

The normalized data source to open

options?​

DataProviderLoadOptions

See DataProviderLoadOptions; workspace is required for workspace-relative sources

Returns​

Promise<OMEZarrImageData>

A promise that resolves to the loaded image data

Throws​

Error if the source is workspace-relative while no workspace is open

Implementation of​

ImageDataProvider.load


normalize()​

normalize(dataSource, workspace, projectSource): NormalizedOMEZarrImageDataSource

Defined in: @tissuumaps-storage/src/ome-zarr/OMEZarrImageDataProvider.ts:91

Returns the data source with omeZarrImageDataSourceDefaults applied and its source normalized (see SourceUtils.normalizeSource)

Parameters​

dataSource​

OMEZarrImageDataSource

The data source to normalize

workspace​

FileSystemDirectoryHandle | null

The directory handle of the open workspace, if any

projectSource​

string | null

Where the project was loaded from, if anywhere

Returns​

NormalizedOMEZarrImageDataSource

The normalized data source

Implementation of​

ImageDataProvider.normalize


readName()​

readName(normalizedSource, workspace, options?): Promise<string | undefined>

Defined in: @tissuumaps-storage/src/ome-zarr/OMEZarrImageDataProvider.ts:141

Reads the image's own name from its metadata (see OMEZarrUtils.readImageName)

Parameters​

normalizedSource​

string

The normalized source

workspace​

FileSystemDirectoryHandle | null

The directory handle of the open workspace, if any

options?​

Optional abort signal

signal?​

AbortSignal

Returns​

Promise<string | undefined>

A promise that resolves to the name, or to undefined if the image has none

Throws​

See OMEZarrUtils.readImageName

Implementation of​

ImageDataProvider.readName


supports()​

supports(normalizedSource, workspace, options?): Promise<boolean>

Defined in: @tissuumaps-storage/src/ome-zarr/OMEZarrImageDataProvider.ts:117

Returns whether a source is an OME-Zarr image that is no label image (see OMEZarrUtils.inspectImage)

Parameters​

normalizedSource​

string

The normalized source to check

workspace​

FileSystemDirectoryHandle | null

The directory handle of the open workspace, if any

options?​

Optional abort signal

signal?​

AbortSignal

Returns​

Promise<boolean>

A promise that resolves to whether the source is supported

Throws​

See OMEZarrUtils.inspectImage

Implementation of​

ImageDataProvider.supports