Skip to content

Network & formats ​

Sharded binary ​

ShardedDataProvider looks each brick up in the level's index and fetches exactly its bytes with one HTTP Range request.

lod0_index.json"2/0/0": {  "offset": 205084,  "size": 98412, … }look upGET /datasets/volume/lod0.binRange: bytes=205084-30349598,412 bytes, nothing elselod0.bingzip-compressed bricks back to back (x fastest), so offsets come from the index01234…N061,204205,084303,496

json
{
  "entries": {
    "0/0/0": { "offset": 0, "size": 61204, "min": 0, "max": 45, "avg": 12 },
    "1/0/0": { "offset": 61204, "size": 143880, "min": 0, "max": 198, "avg": 61 },
    "2/0/0": { "offset": 205084, "size": 98412, "min": 0, "max": 87, "avg": 23 }
  }
}

A brick whose max is below the empty threshold (set by data type and window) is marked empty (w = 255) without a request. Bricks are gzip-compressed, typically to 30–60 % of their size for dense CT/MRI and 10–30 % for sparse volumes, and decompressed off the main thread:

Range responsegzip bytesDecompressionPoolgunzip, convert to atlas format66³ voxelsr8 / r16 dataAtlas slotwriteTexturemain threadup to 8 Web Workersmain thread

OME-Zarr ​

ZarrDataProvider reads OME-Zarr with zarrita.js. Chunk boundaries don't match the brick grid, so a worker pool fetches the chunks a brick overlaps, decompresses them and cuts out the 66³ brick. There is no index of brick statistics: a brick is found empty after its first load, and isn't requested again.

Network statistics ​

The stats panel shows throughput (last 10 s), total bytes and request count. With ?bench=1, the report also gives chunkBytes (downloaded chunk payloads) and borderOnlyBytes (payloads only a brick's ghost border needed so far). Shared shard indexes are left out of both, so the percentage refers to chunk payloads, not all traffic; payloads of cancelled bricks may be missing.

Data types ​

uint8uint16int16float32
Atlas formatr8unormr16unorm, or r16float without supportr16floatr16float
Stored valuevalue / 255value / 65535, or value − 2048 in r16floatrawraw
Normalised bytype rangetype rangedata rangedata range
Full atlas274 MiB548 MiB548 MiB548 MiB

float64 is read as float32. The data range is the OMERO window when present, else the 0.1–99.9th percentile of the coarsest level. Half precision holds integers up to ±2048 exactly, enough for CT in Hounsfield units.

Windowing ​

A window maps the sub-range of values that matters (a 12-bit sensor stored as uint16, soft tissue in CT) to 0–1:

wgsl
fn applyWindow(density: f32, windowCenter: f32, windowWidth: f32) -> f32 {
    let minVal = windowCenter - windowWidth * 0.5;
    return clamp((density - minVal) / windowWidth, 0.0, 1.0);
}