diff --git a/configuration.js b/configuration.js
index d681402..de50470 100644
--- a/configuration.js
+++ b/configuration.js
@@ -16,10 +16,20 @@ async function transformSeries(series) {
anchoring: section.ouv,
markers: section.markers
}));
+ series.dziproot = `https://data-proxy.ebrains.eu/api/v1/buckets/${series.bucket}/.nesysWorkflowFiles/zippedPyramids`;
+ }
+ if(args.dzip) {
+ series.dziproot = args.dzip.match(/(.*zippedPyramids).*/)[1];
+ const prefix = args.dzip.match(/.*zippedPyramids\/(.*)\/.*$/)[1];
+ for(let section of series.slices) {
+ section.filename = prefix + "/" + section.filename.split(".")[0] + ".dzip";
+ }
+ }
+ if(series.dziproot) {
const dzipmap = new Map;
loaders.DZILoader = async section_id => {
if(!dzipmap.has(section_id)) {
- dzipmap.set(section_id, await netunzip(`https://data-proxy.ebrains.eu/api/v1/buckets/${series.bucket}/.nesysWorkflowFiles/zippedPyramids/${section_id}`));
+ dzipmap.set(section_id, await netunzip(`${series.dziproot}/${section_id}`));
}
const zip = dzipmap.get(section_id);
return new TextDecoder().decode(await zip.get(zip.entries.get(section_id.match(/.*\/(.*)p/)[1])));
diff --git a/index.html b/index.html
index 088f75f..c7b864a 100644
--- a/index.html
+++ b/index.html
@@ -29,7 +29,7 @@
setlog(`Can't access JSON descriptor at ${jsonurl}. Please verify that the link is correct and that it's available for cross-site access ("CORS").\n${json.message}`);
return;
}
- document.getElementById("pyramids").hidden=!!json.bucket;
+ document.getElementById("pyrs").hidden=!!json.bucket;
if(json.bucket) {
let slices=json.sections;
let length=slices.length;
@@ -49,6 +49,15 @@
`Nonlinear tools: ${nltools}`;
return;
}
+ if(pyramids.endsWith(".dzip")) {
+ let baselink=`${location.href.match(/(.*\/)[^/]*/)[1]}filmstripzoom.html?atlas=${atlas.value}&series=${jsonurl}&dzip=${pyramids}`;
+ let antools=`${baselink}&tools`;
+ let nltools=`${antools}&nl`;
+ log.innerHTML=`Viewer: ${baselink}
`+
+ `Annotation tools: ${antools}
`+
+ `Nonlinear tools: ${nltools}`;
+ return;
+ }
let slices=json.slices;
let length=slices.length;
if(!pyramids.length){
@@ -115,9 +124,20 @@