From 0ec0485a15ff16b166dae82fd3e9af107ef484f3 Mon Sep 17 00:00:00 2001 From: Philipp Otto Date: Tue, 31 Jan 2023 18:15:23 +0100 Subject: [PATCH 1/2] fix that getRawDataCuboid could request data from non-existent mag by default --- frontend/javascripts/oxalis/api/api_latest.ts | 8 ++++++-- frontend/javascripts/oxalis/model/sagas/proofread_saga.ts | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/javascripts/oxalis/api/api_latest.ts b/frontend/javascripts/oxalis/api/api_latest.ts index e38de96daf6..a6770554772 100644 --- a/frontend/javascripts/oxalis/api/api_latest.ts +++ b/frontend/javascripts/oxalis/api/api_latest.ts @@ -1549,10 +1549,12 @@ class DataApi { topLeft: Vector3, bottomRight: Vector3, token: string, + resolution?: Vector3, ): string { const { dataset } = Store.getState(); - const resolutionInfo = getDatasetResolutionInfo(dataset); - const resolution = resolutionInfo.getLowestResolution(); + const resolutionInfo = getResolutionInfo(getLayerByName(dataset, layerName).resolutions); + resolution = resolution || resolutionInfo.getLowestResolution(); + const magString = resolution.join("-"); return ( `${dataset.dataStore.url}/data/datasets/${dataset.owningOrganization}/${dataset.name}/layers/${layerName}/data?mag=${magString}&` + @@ -1591,6 +1593,7 @@ class DataApi { layerName: string, topLeft: Vector3, bottomRight: Vector3, + resolution?: Vector3, ): Promise { return doWithToken((token) => { const downloadUrl = this._getDownloadUrlForRawDataCuboid( @@ -1598,6 +1601,7 @@ class DataApi { topLeft, bottomRight, token, + resolution, ); return Request.receiveArraybuffer(downloadUrl); }); diff --git a/frontend/javascripts/oxalis/model/sagas/proofread_saga.ts b/frontend/javascripts/oxalis/model/sagas/proofread_saga.ts index 9afc2535cc4..e424b52b86e 100644 --- a/frontend/javascripts/oxalis/model/sagas/proofread_saga.ts +++ b/frontend/javascripts/oxalis/model/sagas/proofread_saga.ts @@ -692,6 +692,7 @@ function* createGetUnmappedDataValueFn( fallbackLayerName, nodePosition, V3.add(nodePosition, mag), + mag, ); return Number(new TypedArrayClass(buffer)[0]); From f96169aa7f7f5283e3b99cbfa7534f1ed7b9762b Mon Sep 17 00:00:00 2001 From: Philipp Otto Date: Tue, 31 Jan 2023 18:16:28 +0100 Subject: [PATCH 2/2] update changelog --- CHANGELOG.unreleased.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md index dce694921da..7c82ff10e7e 100644 --- a/CHANGELOG.unreleased.md +++ b/CHANGELOG.unreleased.md @@ -40,6 +40,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released - Fixed a bug where the dataset folders view would not list public datasets if the requesting user could not also access the dataset for other reasons, like being admin. [#6759](https://github.com/scalableminds/webknossos/pull/6759) - Fixed a bug where zarr-streamed datasets would produce (very rare) rendering errors. [#6782](https://github.com/scalableminds/webknossos/pull/6782) - Fixed a bug where publicly shared annotations were not viewable by users without an account. [#6784](https://github.com/scalableminds/webknossos/pull/6784) +- Fixed proofreading when mag 1 doesn't exist for segmentation layer [#6795](https://github.com/scalableminds/webknossos/pull/6795) ### Removed