Skip to content

Commit

Permalink
Update tifffile to 2024.8.30 (#1190)
Browse files Browse the repository at this point in the history
* Update tifffile and adapt example to breaking change.

* Update changelog.
  • Loading branch information
markbader authored Sep 10, 2024
1 parent 4b2271f commit 4969c51
Show file tree
Hide file tree
Showing 4 changed files with 181 additions and 177 deletions.
1 change: 1 addition & 0 deletions webknossos/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ For upgrade instructions, please check the respective _Breaking Changes_ section
### Added

### Changed
- Updated tifffile dependency to v2024.8.30. [#1190](https://github.com/scalableminds/webknossos-libs/pull/1190)

### Fixed

Expand Down
5 changes: 4 additions & 1 deletion webknossos/examples/load_annotation_from_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,16 @@ def load_annotation(annotation_file: Path) -> None:
mag_view = segmentation_layer.get_finest_mag()
segments = mag_view.read(absolute_bounding_box=BOUNDING_BOX)

# Drop channel dimension as it has depth 1
segments = segments[0]

# Write segmentation IDs to an OME Tiff file
imwrite(
"segmentation.ome.tiff",
segments.T, # note, the tiff lib use different channel order
ome=True,
metadata={
"axes": "ZYXC",
"axes": "ZYX",
},
)

Expand Down
Loading

0 comments on commit 4969c51

Please sign in to comment.