Skip to content

Commit

Permalink
Add support for setting default mapping ID (#1118)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
hotzenklotz and fm3 authored Jun 27, 2024
1 parent ed626f5 commit 41f947b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions webknossos/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ For upgrade instructions, please check the respective _Breaking Changes_ section
- 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)
- Added .ims as supported suffix. [#1085](https://github.com/scalableminds/webknossos-libs/pull/1085)
- 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)
- Added suport for setting a default ID mapping for segmentation layers. [1118](https://github.com/scalableminds/webknossos-libs/pull/1118)

### Changed
- Moved functional parts of merge volume annotation CLI to Dataset and Annotation classes. [#1055](https://github.com/scalableminds/webknossos-libs/pull/1055)
Expand Down
3 changes: 3 additions & 0 deletions webknossos/webknossos/dataset/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ class LayerViewConfiguration:
is_in_edit_mode: Optional[bool] = None
"""Enable the histogram edit mode. The WEBKNOSSOS default is False."""

mapping: Optional[Dict[str, str]] = None
"""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"}."""


# --- Property --------------------

Expand Down

0 comments on commit 41f947b

Please sign in to comment.