Bioformats2raw exports a "Fileset" of 1 or more Images for some formats, as described at ome/ngff#112
with the paths to them as 0/, 1/, etc and names and other metadata in a top-level /OME/METADATRA.ome.xml.
Some sample data is available at https://minio-dev.openmicroscopy.org/idr/bf2raw/mdb/martin/sample_files.zarr (that dir contains a .zattrs with {"bioformats2raw.layout" : 3}) which is a set of 8 small images.
E.g. using that source and adding the following code snippet to io.ts, I was able to read the Image names...
code snippet
if ("bioformats2raw.layout" in attrs && attrs["bioformats2raw.layout"] == 3) {
// const source_url = config.source;
const source_url = `${ node.store.store.url }/${node.path}`;
const xmlUrl = `${ source_url }/OME/METADATA.ome.xml`;
fetch(xmlUrl)
.then(response => response.text())
.then(data => {
const parser = new DOMParser();
const doc = parser.parseFromString(data, "application/xml");
const errorNode = doc.querySelector("parsererror");
if (errorNode) {
console.log("error while parsing");
} else {
console.log(doc.documentElement.nodeName);
console.log(doc.querySelectorAll("Image").forEach(el => {
console.log('image element', el, el.getAttribute("Name"));
}));
}
})
.catch(console.error);
}
It would be nice to show the Thumbnails and Names (and other metadata?) for the images, and click them to open the Full Image in the viewer. I looked again at code I had for doing this with "Collections" at #125 but can't get the Thumbnails (or Typescript) working now.
Might need to try a different approach (and forget about the Thumbnails initially)...
cc @joshmoore @sbesson
Bioformats2raw exports a "Fileset" of 1 or more Images for some formats, as described at ome/ngff#112
with the paths to them as
0/,1/, etc and names and other metadata in a top-level/OME/METADATRA.ome.xml.Some sample data is available at https://minio-dev.openmicroscopy.org/idr/bf2raw/mdb/martin/sample_files.zarr (that dir contains a
.zattrswith{"bioformats2raw.layout" : 3}) which is a set of 8 small images.E.g. using that source and adding the following code snippet to
io.ts, I was able to read the Image names...code snippet
It would be nice to show the Thumbnails and Names (and other metadata?) for the images, and click them to open the Full Image in the viewer. I looked again at code I had for doing this with "Collections" at #125 but can't get the Thumbnails (or Typescript) working now.
Might need to try a different approach (and forget about the Thumbnails initially)...
cc @joshmoore @sbesson