Skip to content

📝 Add utils.visualization Examples#943

Merged
shaneahmed merged 6 commits intodevelopfrom
utils_examples
Jul 24, 2025
Merged

📝 Add utils.visualization Examples#943
shaneahmed merged 6 commits intodevelopfrom
utils_examples

Conversation

@YijieZhu15
Copy link
Copy Markdown
Collaborator

@YijieZhu15 YijieZhu15 commented Jul 4, 2025

  • Add examples in docstrings for utils.visualization.

@shaneahmed shaneahmed added this to the Release v1.7.0 milestone Jul 4, 2025
@shaneahmed shaneahmed changed the title Utils examples 📝 Add utils.visualization Examples Jul 4, 2025
@shaneahmed shaneahmed added the documentation Improvements or additions to documentation label Jul 4, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.70%. Comparing base (6ac6f55) to head (22faf09).
⚠️ Report is 13 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #943   +/-   ##
========================================
  Coverage    99.70%   99.70%           
========================================
  Files           71       71           
  Lines         9133     9133           
  Branches      1188     1188           
========================================
  Hits          9106     9106           
  Misses          23       23           
  Partials         4        4           

☔ 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.

@Jiaqi-Lv Jiaqi-Lv requested a review from Copilot July 11, 2025 10:08
Copy link
Copy Markdown
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 pull request adds usage examples to several visualization utilities in tiatoolbox/utils/visualization.py.

  • Adds Examples sections to the docstrings of:
    • random_colors
    • colourise_image
    • overlay_prediction_mask
    • overlay_probability_map
    • overlay_prediction_contours
    • plot_graph
Comments suppressed due to low confidence (2)

tiatoolbox/utils/visualization.py:355

  • The example assigns to ax but return_ax=False returns the overlay array, not an axis. Rename the variable (e.g., overlay = overlay_probability_map(...)) or set return_ax=True to match the example.
        >>> ax = overlay_probability_map(

tiatoolbox/utils/visualization.py:628

  • This comment references overlay_prediction_contours but should say plot_graph to match the function being demonstrated.
        >>> # Example usage of overlay_prediction_contours

Copy link
Copy Markdown
Member

@shaneahmed shaneahmed left a comment

Choose a reason for hiding this comment

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

Thanks @YijieZhu15

@shaneahmed shaneahmed merged commit ca755f0 into develop Jul 24, 2025
15 checks passed
@shaneahmed shaneahmed deleted the utils_examples branch July 24, 2025 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants