Skip to content

Conversation

@shaneahmed
Copy link
Member

@shaneahmed shaneahmed commented Apr 30, 2025

  • This PR saves a NumPy or Zarr Array to OME tiff. This will help to save probability maps from deep learning models as ome.tiff which can be visualized using TIAViz.
  • The image is written as tiles and stitched in OME tiff along with associated necessary metadata for heatmaps generated by segmentation engine. ✨ Define SemanticSegmentor with the New EngineABC #866
  • Reading with QuPath has been tested.

- This will help to save probability maps from deep learning models as ome tiff which can be visualized using TIAViz.
@shaneahmed shaneahmed self-assigned this Apr 30, 2025
@shaneahmed shaneahmed added the enhancement New feature or request label Apr 30, 2025
@shaneahmed shaneahmed added this to the Release v1.7.0 milestone Apr 30, 2025
@codecov
Copy link

codecov bot commented Apr 30, 2025

Codecov Report

❌ Patch coverage is 95.65217% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 99.69%. Comparing base (7ba7394) to head (480025b).
⚠️ Report is 18 commits behind head on develop.

Files with missing lines Patch % Lines
tiatoolbox/utils/misc.py 95.65% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #929      +/-   ##
===========================================
- Coverage    99.70%   99.69%   -0.02%     
===========================================
  Files           71       71              
  Lines         8847     8874      +27     
  Branches      1154     1159       +5     
===========================================
+ Hits          8821     8847      +26     
  Misses          23       23              
- Partials         3        4       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@shaneahmed shaneahmed mentioned this pull request Apr 30, 2025
9 tasks
@shaneahmed shaneahmed changed the title ✨ Add OME tiff writer to utils. ✨ Add OME-TIFF Writer to Utils Apr 30, 2025
@shaneahmed shaneahmed changed the title ✨ Add OME-TIFF Writer to Utils ✨ Add Feature to Write Model Probabilities as ome.tiff for Overlay May 9, 2025
@Jiaqi-Lv Jiaqi-Lv requested a review from Copilot May 9, 2025 10:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new feature to save NumPy or Zarr arrays as tiled, pyramidal OME-TIFF files containing heatmap visualizations for probability maps generated by segmentation models. The changes include adding a new function “write_probability_heatmap_as_ome_tiff” (and its helper function _tiles) to generate the tiled OME-TIFF and corresponding tests to validate its behavior.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tiatoolbox/utils/misc.py Adds new functions to tile images and write probability maps as OME-TIFF, with updated and new docstrings.
tests/test_utils.py Introduces tests for error conditions and functional verification for OME-TIFF creation.

@shaneahmed shaneahmed merged commit 3eea490 into develop May 9, 2025
13 of 15 checks passed
@shaneahmed shaneahmed deleted the dev-add-ome-tiff-writer branch May 9, 2025 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants