Skip to content

Commit 41f947b

Browse files
hotzenklotzfm3
andauthored
Add support for setting default mapping ID (#1118)
* create an optional dependency group for wk-libs examples * remove nifti script to avoid sklearn dependency * fix optional marker * add default layer properties for mappings * changelog * Update webknossos/webknossos/dataset/properties.py --------- Co-authored-by: Florian M <[email protected]>
1 parent ed626f5 commit 41f947b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

webknossos/Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ For upgrade instructions, please check the respective _Breaking Changes_ section
1919
- Added a pixel level heuristic for distinguishing color and segmentation layers when importing image data with the `from_images` or `add_layer_from_images` method. [#1007](https://github.com/scalableminds/webknossos-libs/pull/1007)
2020
- Added .ims as supported suffix. [#1085](https://github.com/scalableminds/webknossos-libs/pull/1085)
2121
- Added suffixes supported by bioformats for Zeiss CZI, Leica LOF, Zeiss LSM (laser scanning microscope), Zeiss LSM (Laser Scanning Microscope) 510/710, Leica XLEF and Zeiss AxioVision ZVI (Zeiss Vision Image). [#1086](https://github.com/scalableminds/webknossos-libs/pull/1086)
22+
- Added suport for setting a default ID mapping for segmentation layers. [1118](https://github.com/scalableminds/webknossos-libs/pull/1118)
2223

2324
### Changed
2425
- Moved functional parts of merge volume annotation CLI to Dataset and Annotation classes. [#1055](https://github.com/scalableminds/webknossos-libs/pull/1055)

webknossos/webknossos/dataset/properties.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ class LayerViewConfiguration:
113113
is_in_edit_mode: Optional[bool] = None
114114
"""Enable the histogram edit mode. The WEBKNOSSOS default is False."""
115115

116+
mapping: Optional[Dict[str, str]] = None
117+
"""Enables ID mapping for a segmentation layer and applies the selected mapping by default. The default WK behavior is to disable ID mapping. Expected values is a Dict with {"name": my_mapping_name, "type": "HDF5"}."""
118+
116119

117120
# --- Property --------------------
118121

0 commit comments

Comments
 (0)