Public
Edited
Feb 23, 2024
Insert cell
Insert cell
view = {
// Create a store
const store = new storage.ReferenceStore("https://storage.googleapis.com/vitessce-demo-data/habib-2017/habib17.reference.json");

// Open a zarr.Array
const arr = await zarr.open(store, { kind: "array" });
// {
// store: FetchStore,
// path: "/",
// dtype: "uint8",
// shape: [512, 512, 3],
// chunks: [100, 100, 1],
// }

// load a region of the array
const channelIndex = ["red", "green", "blue"].indexOf(radios);
const view = await zarr.get(arr, [null, null, channelIndex]);
// {
// data: Uint8Array,
// shape: [512, 512],
// stride: [512, 1],
// }

return view;
}
Insert cell
zarr = import("https://cdn.jsdelivr.net/npm/zarrita@next/+esm")
Insert cell
storage = import("https://cdn.jsdelivr.net/npm/@zarrita/storage@next/+esm")
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more