From ccbf808654b66373c5a099715f9671beb6227b9c Mon Sep 17 00:00:00 2001 From: Florian M Date: Mon, 1 Aug 2022 16:09:02 +0200 Subject: [PATCH 1/2] Fix Zarr Segmentation Layer json parsing --- CHANGELOG.unreleased.md | 1 + .../datastore/models/datasource/DataLayer.scala | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md index b417c987a31..3506d1bf417 100644 --- a/CHANGELOG.unreleased.md +++ b/CHANGELOG.unreleased.md @@ -23,6 +23,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released - Fixed a regression where the mapping activation confirmation dialog was never shown. [#6346](https://github.com/scalableminds/webknossos/pull/6346) - Fixed an error if multiple proofreading actions were performed in rapid succession. If webKnossos is busy, inputs to the viewports are disabled from now on. [#6325](https://github.com/scalableminds/webknossos/pull/6325) - Fixed that ad-hoc meshing would terminate early for large segments. [#6352](https://github.com/scalableminds/webknossos/pull/6352) +- Fixed a bug where the largestSegmentId of zarr segmentation layers was not propagated from the datasource-properties.json, which broke annotating based on these layers. [#6363](https://github.com/scalableminds/webknossos/pull/6362) ### Removed - Annotation Type was removed from the info tab. [#6330](https://github.com/scalableminds/webknossos/pull/6330) diff --git a/webknossos-datastore/app/com/scalableminds/webknossos/datastore/models/datasource/DataLayer.scala b/webknossos-datastore/app/com/scalableminds/webknossos/datastore/models/datasource/DataLayer.scala index f615bedc735..015bbee1586 100644 --- a/webknossos-datastore/app/com/scalableminds/webknossos/datastore/models/datasource/DataLayer.scala +++ b/webknossos-datastore/app/com/scalableminds/webknossos/datastore/models/datasource/DataLayer.scala @@ -165,10 +165,11 @@ object DataLayer { dataFormat <- json.validate((JsPath \ "dataFormat").read[DataFormat.Value]) category <- json.validate((JsPath \ "category").read[Category.Value]) layer <- (dataFormat, category) match { - case (DataFormat.wkw, Category.segmentation) => json.validate[WKWSegmentationLayer] - case (DataFormat.wkw, _) => json.validate[WKWDataLayer] - case (DataFormat.zarr, _) => json.validate[ZarrDataLayer] - case _ => json.validate[WKWDataLayer] + case (DataFormat.wkw, Category.segmentation) => json.validate[WKWSegmentationLayer] + case (DataFormat.wkw, _) => json.validate[WKWDataLayer] + case (DataFormat.zarr, Category.segmentation) => json.validate[ZarrSegmentationLayer] + case (DataFormat.zarr, _) => json.validate[ZarrDataLayer] + case _ => json.validate[WKWDataLayer] } } yield { layer From 93b519950e534325a3fd5a3d32cb6b996e7eb10a Mon Sep 17 00:00:00 2001 From: Florian M Date: Mon, 1 Aug 2022 16:14:28 +0200 Subject: [PATCH 2/2] fix link in changelog --- CHANGELOG.unreleased.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md index 3506d1bf417..9b17af083c2 100644 --- a/CHANGELOG.unreleased.md +++ b/CHANGELOG.unreleased.md @@ -23,7 +23,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released - Fixed a regression where the mapping activation confirmation dialog was never shown. [#6346](https://github.com/scalableminds/webknossos/pull/6346) - Fixed an error if multiple proofreading actions were performed in rapid succession. If webKnossos is busy, inputs to the viewports are disabled from now on. [#6325](https://github.com/scalableminds/webknossos/pull/6325) - Fixed that ad-hoc meshing would terminate early for large segments. [#6352](https://github.com/scalableminds/webknossos/pull/6352) -- Fixed a bug where the largestSegmentId of zarr segmentation layers was not propagated from the datasource-properties.json, which broke annotating based on these layers. [#6363](https://github.com/scalableminds/webknossos/pull/6362) +- Fixed a bug where the largestSegmentId of zarr segmentation layers was not propagated from the datasource-properties.json, which broke annotating based on these layers. [#6363](https://github.com/scalableminds/webknossos/pull/6363) ### Removed - Annotation Type was removed from the info tab. [#6330](https://github.com/scalableminds/webknossos/pull/6330)