Skip to content

Commit 71d1936

Browse files
authored
Use match shorthand DataLayerWithMagLocators.mapped (#8343)
* Use match shorthand DataLayerWithMagLocators.mapped * spelling in changelog.released
1 parent e9c31a9 commit 71d1936

File tree

3 files changed

+7
-39
lines changed

3 files changed

+7
-39
lines changed

CHANGELOG.released.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
1313
### Highlights
1414
- The fill tool can now be adapted so that it only acts within a specified bounding box. Use the new "Restrict Floodfill" mode for that in the toolbar. [#8267](https://github.com/scalableminds/webknossos/pull/8267)
1515
- Added the option for "Selective Segment Visibility" for segmentation layers. Select this option in the left sidebar to only show segments that are currently active or hovered. [#8281](https://github.com/scalableminds/webknossos/pull/8281)
16-
- Segment and tree names can be edited by doubleclicking them. [#8316](https://github.com/scalableminds/webknossos/pull/8316)
16+
- Segment and tree names can be edited by double-clicking them. [#8316](https://github.com/scalableminds/webknossos/pull/8316)
1717

1818
### Added
1919
- Added the total volume of a dataset to a tooltip in the dataset info tab. [#8229](https://github.com/scalableminds/webknossos/pull/8229)
2020
- Optimized performance of data loading with “fill value“ chunks. [#8271](https://github.com/scalableminds/webknossos/pull/8271)
2121
- Added the option to export a segmentation that was corrected with the proofreading tool to a new segmentation. [#8286](https://github.com/scalableminds/webknossos/pull/8286)
22-
- A segment can be activated with doubleclick now. [#8281](https://github.com/scalableminds/webknossos/pull/8281)
22+
- A segment can be activated with double-click now. [#8281](https://github.com/scalableminds/webknossos/pull/8281)
2323
- It is now possible to select the magnification of the layers on which an AI model will be trained. [#8266](https://github.com/scalableminds/webknossos/pull/8266)
2424
- Added support for translations in OME NGFF zarr datasets (translation within coordinateTransformations on datasets). [#8311](https://github.com/scalableminds/webknossos/pull/8311)
2525
- When the eraser tool is active, one can switch temporarily to the fill-segment tool by pressing shift and ctrl. Only pressing shift, switches to the pick-segment tool. [#8314](https://github.com/scalableminds/webknossos/pull/8314)

frontend/javascripts/oxalis/view/left-border-tabs/layer_settings_tab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@ class DatasetSettings extends React.PureComponent<DatasetSettingsProps, State> {
919919
<FastTooltip
920920
title={
921921
isSelectiveVisibilityDisabled
922-
? "This behavior is overriden by the 'selective segment visibility' button in the toolbar, because the proofreading tool is active."
922+
? "This behavior is overridden by the 'selective segment visibility' button in the toolbar, because the proofreading tool is active."
923923
: "When enabled, only hovered or active segments will be shown."
924924
}
925925
>

webknossos-datastore/app/com/scalableminds/webknossos/datastore/services/uploading/ComposeService.scala

Lines changed: 4 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,7 @@ package com.scalableminds.webknossos.datastore.services.uploading
22

33
import com.scalableminds.util.io.PathUtils
44
import com.scalableminds.util.tools.{Fox, FoxImplicits}
5-
import com.scalableminds.webknossos.datastore.dataformats.layers.{
6-
N5DataLayer,
7-
N5SegmentationLayer,
8-
PrecomputedDataLayer,
9-
PrecomputedSegmentationLayer,
10-
WKWDataLayer,
11-
WKWSegmentationLayer,
12-
Zarr3DataLayer,
13-
Zarr3SegmentationLayer,
14-
ZarrDataLayer,
15-
ZarrSegmentationLayer
16-
}
5+
import com.scalableminds.webknossos.datastore.dataformats.layers.{WKWDataLayer, WKWSegmentationLayer}
176
import com.scalableminds.webknossos.datastore.models.VoxelSize
187
import com.scalableminds.webknossos.datastore.models.datasource._
198
import com.scalableminds.webknossos.datastore.services.{
@@ -103,30 +92,9 @@ class ComposeService @Inject()(dataSourceRepository: DataSourceRepository,
10392
_ <- Fox.runIf(!layerIsRemote)(
10493
datasetSymlinkService.addSymlinksToOtherDatasetLayers(uploadDir, List(linkedLayerIdentifier)))
10594
editedLayer: DataLayer = layer match {
106-
case l: PrecomputedDataLayer =>
107-
l.copy(name = composeLayer.newName,
108-
coordinateTransformations = applyCoordinateTransformations(l.coordinateTransformations))
109-
case l: PrecomputedSegmentationLayer =>
110-
l.copy(name = composeLayer.newName,
111-
coordinateTransformations = applyCoordinateTransformations(l.coordinateTransformations))
112-
case l: ZarrDataLayer =>
113-
l.copy(name = composeLayer.newName,
114-
coordinateTransformations = applyCoordinateTransformations(l.coordinateTransformations))
115-
case l: ZarrSegmentationLayer =>
116-
l.copy(name = composeLayer.newName,
117-
coordinateTransformations = applyCoordinateTransformations(l.coordinateTransformations))
118-
case l: N5DataLayer =>
119-
l.copy(name = composeLayer.newName,
120-
coordinateTransformations = applyCoordinateTransformations(l.coordinateTransformations))
121-
case l: N5SegmentationLayer =>
122-
l.copy(name = composeLayer.newName,
123-
coordinateTransformations = applyCoordinateTransformations(l.coordinateTransformations))
124-
case l: Zarr3DataLayer =>
125-
l.copy(name = composeLayer.newName,
126-
coordinateTransformations = applyCoordinateTransformations(l.coordinateTransformations))
127-
case l: Zarr3SegmentationLayer =>
128-
l.copy(name = composeLayer.newName,
129-
coordinateTransformations = applyCoordinateTransformations(l.coordinateTransformations))
95+
case l: DataLayerWithMagLocators =>
96+
l.mapped(name = composeLayer.newName,
97+
coordinateTransformations = applyCoordinateTransformations(l.coordinateTransformations))
13098
case l: WKWDataLayer =>
13199
l.copy(name = composeLayer.newName,
132100
coordinateTransformations = applyCoordinateTransformations(l.coordinateTransformations))

0 commit comments

Comments
 (0)