import { ThreadableVolumeLoader, type LoadSpec, type RawChannelDataCallback, type LoadedVolumeInfo } from "./IVolumeLoader.js"; import { type ImageInfo } from "../ImageInfo.js"; import type { VolumeDims } from "../VolumeDims.js"; import VolumeCache from "../VolumeCache.js"; interface PackedChannelsImage { name: string; channels: number[]; } type JsonImageInfo = { name: string; version?: string; images: PackedChannelsImage[]; /** X size of the *original* (not downsampled) volume, in pixels */ width: number; /** Y size of the *original* (not downsampled) volume, in pixels */ height: number; /** Number of rows of z-slice tiles (not pixels) in the texture atlas */ rows: number; /** Number of columns of z-slice tiles (not pixels) in the texture atlas */ cols: number; /** Width of a single atlas tile in pixels */ tile_width: number; /** Height of a single atlas tile in pixels */ tile_height: number; /** Width of the texture atlas in pixels; equivalent to `tile_width * cols` */ atlas_width: number; /** Height of the texture atlas in pixels; equivalent to `tile_height * rows` */ atlas_height: number; /** Number of tiles in the texture atlas (or number of z-slices in the volume segment) */ tiles: number; /** Physical x size of a single *original* (not downsampled) pixel */ pixel_size_x: number; /** Physical y size of a single *original* (not downsampled) pixel */ pixel_size_y: number; /** Physical z size of a single pixel */ pixel_size_z: number; /** Symbol of physical unit used by `pixel_size_(x|y|z)` fields */ pixel_size_unit?: string; channels: number; channel_names: string[]; channel_colors?: [number, number, number][]; times?: number; time_scale?: number; time_unit?: string; transform: { translation: [number, number, number]; rotation: [number, number, number]; }; userData?: Record; }; declare class JsonImageInfoLoader extends ThreadableVolumeLoader { urls: string[]; jsonInfo: (JsonImageInfo | undefined)[]; syncChannels: boolean; cache?: VolumeCache; constructor(urls: string | string[], cache?: VolumeCache); private getJsonImageInfo; syncMultichannelLoading(sync: boolean): void; loadDims(loadSpec: LoadSpec): Promise; createImageInfo(loadSpec: LoadSpec): Promise; loadRawChannelData(imageInfo: ImageInfo, loadSpec: LoadSpec, onUpdateMetadata: (imageInfo: undefined, loadSpec?: LoadSpec) => void, onData: RawChannelDataCallback): Promise; /** * load per-channel volume data from a batch of image files containing the volume slices tiled across the images * @param {Array.<{name:string, channels:Array.}>} imageArray * @param {RawChannelDataCallback} onData Per-channel callback. Called when each channel's atlased volume data is loaded * @param {VolumeCache} cache * @example loadVolumeAtlasData([{ * "name": "AICS-10_5_5.ome.tif_atlas_0.png", * "channels": [0, 1, 2] * }, { * "name": "AICS-10_5_5.ome.tif_atlas_1.png", * "channels": [3, 4, 5] * }, { * "name": "AICS-10_5_5.ome.tif_atlas_2.png", * "channels": [6, 7, 8] * }], mycallback); */ static loadVolumeAtlasData(imageArray: PackedChannelsImage[], onData: RawChannelDataCallback, cache?: VolumeCache, syncChannels?: boolean): Promise; } export { JsonImageInfoLoader };