diff --git a/CHANGELOG.md b/CHANGELOG.md index bc668dbe89..8f5affa068 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -644,6 +644,9 @@ Data sources: defined in the stack meta data in the admin view, e.g. `{"voxelOffset": [-3072, -3072, 0]}`. +- Neuroglancer Precomputed URLs that start with `gs://` are rewritten on the fly + to use Google Cloud storage get API requess, improving CORS support. + - A second new tile source is available: CloudVolume based tiles, generated by the back-end. While slow for many users, it is a convenient way of make neuroglancer volumes available to CATMAID if they aren't supported by the diff --git a/django/applications/catmaid/static/libs/ngpre-wasm/ngpre_wasm.js b/django/applications/catmaid/static/libs/ngpre-wasm/ngpre_wasm.js index 8c4bb8914d..74a5ad6759 100644 --- a/django/applications/catmaid/static/libs/ngpre-wasm/ngpre_wasm.js +++ b/django/applications/catmaid/static/libs/ngpre-wasm/ngpre_wasm.js @@ -227,28 +227,6 @@ let wasm_bindgen; return className; } - function _assertClass(instance, klass) { - if (!(instance instanceof klass)) { - throw new Error(`expected instance of ${klass.name}`); - } - } - - let cachedBigUint64ArrayMemory0 = null; - - function getBigUint64ArrayMemory0() { - if (cachedBigUint64ArrayMemory0 === null || cachedBigUint64ArrayMemory0.byteLength === 0) { - cachedBigUint64ArrayMemory0 = new BigUint64Array(wasm.memory.buffer); - } - return cachedBigUint64ArrayMemory0; - } - - function passArray64ToWasm0(arg, malloc) { - const ptr = malloc(arg.length * 8, 8) >>> 0; - getBigUint64ArrayMemory0().set(arg, ptr / 8); - WASM_VECTOR_LEN = arg.length; - return ptr; - } - let cachedUint32ArrayMemory0 = null; function getUint32ArrayMemory0() { @@ -263,6 +241,15 @@ let wasm_bindgen; return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len); } + let cachedBigUint64ArrayMemory0 = null; + + function getBigUint64ArrayMemory0() { + if (cachedBigUint64ArrayMemory0 === null || cachedBigUint64ArrayMemory0.byteLength === 0) { + cachedBigUint64ArrayMemory0 = new BigUint64Array(wasm.memory.buffer); + } + return cachedBigUint64ArrayMemory0; + } + function getArrayU64FromWasm0(ptr, len) { ptr = ptr >>> 0; return getBigUint64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len); @@ -371,6 +358,19 @@ let wasm_bindgen; return getFloat64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len); } + function _assertClass(instance, klass) { + if (!(instance instanceof klass)) { + throw new Error(`expected instance of ${klass.name}`); + } + } + + function passArray64ToWasm0(arg, malloc) { + const ptr = malloc(arg.length * 8, 8) >>> 0; + getBigUint64ArrayMemory0().set(arg, ptr / 8); + WASM_VECTOR_LEN = arg.length; + return ptr; + } + let stack_pointer = 128; function addBorrowedObject(obj) { @@ -382,12 +382,10 @@ let wasm_bindgen; wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hba9c4d05d94bb2f6(arg0, arg1, addHeapObject(arg2)); } - function __wbg_adapter_255(arg0, arg1, arg2, arg3) { + function __wbg_adapter_253(arg0, arg1, arg2, arg3) { wasm.wasm_bindgen__convert__closures__invoke2_mut__ha4add01b7784d4e4(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); } - const __wbindgen_enum_ReferrerPolicy = ["", "no-referrer", "no-referrer-when-downgrade", "origin", "origin-when-cross-origin", "unsafe-url", "same-origin", "strict-origin", "strict-origin-when-cross-origin"]; - const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"]; const DatasetAttributesFinalization = (typeof FinalizationRegistry === 'undefined') @@ -2140,7 +2138,7 @@ let wasm_bindgen; const a = state0.a; state0.a = 0; try { - return __wbg_adapter_255(a, state0.b, arg0, arg1); + return __wbg_adapter_253(a, state0.b, arg0, arg1); } finally { state0.a = a; } @@ -2232,9 +2230,6 @@ let wasm_bindgen; imports.wbg.__wbg_setmode_cd03637eb7da01e0 = function(arg0, arg1) { getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1]; }; - imports.wbg.__wbg_setreferrerpolicy_aac7a6a625ee4900 = function(arg0, arg1) { - getObject(arg0).referrerPolicy = __wbindgen_enum_ReferrerPolicy[arg1]; - }; imports.wbg.__wbg_static_accessor_GLOBAL_0be7472e492ad3e3 = function() { const ret = typeof global === 'undefined' ? null : global; return isLikeNone(ret) ? 0 : addHeapObject(ret); @@ -2353,8 +2348,8 @@ let wasm_bindgen; const ret = false; return ret; }; - imports.wbg.__wbindgen_closure_wrapper1323 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 264, __wbg_adapter_54); + imports.wbg.__wbindgen_closure_wrapper1326 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 266, __wbg_adapter_54); return addHeapObject(ret); }; imports.wbg.__wbindgen_debug_string = function(arg0, arg1) { diff --git a/django/applications/catmaid/static/libs/ngpre-wasm/ngpre_wasm_bg.wasm b/django/applications/catmaid/static/libs/ngpre-wasm/ngpre_wasm_bg.wasm index b9dc07338f..0e2435dac6 100644 Binary files a/django/applications/catmaid/static/libs/ngpre-wasm/ngpre_wasm_bg.wasm and b/django/applications/catmaid/static/libs/ngpre-wasm/ngpre_wasm_bg.wasm differ diff --git a/sphinx-doc/source/tile_sources.rst b/sphinx-doc/source/tile_sources.rst index f20474af86..6728783afb 100644 --- a/sphinx-doc/source/tile_sources.rst +++ b/sphinx-doc/source/tile_sources.rst @@ -397,7 +397,8 @@ Tile source types are listed by the enumeration integer ID referenced by components. It should end in a path component specifying the ordered dimensions from which image data should be sliced, separated by underscores. For example, ``2_1_0`` will slices chunk dimensions 2, 1, and 0 as the x, y, - and z stack dimensions, respectively. + and z stack dimensions, respectively. Make sure, the path has no trailing + slash. This tile source will also look for a path component ending in ``/info`` to use as the dataset root directory. If it does not find such a component, it will @@ -417,6 +418,14 @@ Tile source types are listed by the enumeration integer ID referenced by is ``(-3072, -3072, 0)``, then the metadata of the CATMAID stack should look like this: ``{"voxelOffset": [-3072, -3072, 0]}``. + If the ``gs://`` protocol is used like in the example above, each final + request path is rewritten in order to use the `get method + `_ for their + Cloud objects. Otherwise, no data can be loaded due to CORS restrictions. A + rewritten URL looks like this (requesting the ``/info`` file):: + + https://www.googleapis.com/storage/v1/b/neuroglancer/o/pinky100_v0%2Fson_of_alignment_v15_rechunked%2Finfo?alt=media + Backend Representation ----------------------