Skip to content

📝 Add utils.visualization Examples #943

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open

Conversation

YijieZhu15
Copy link
Collaborator

Add examples 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
Copy link

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 (7e098a3).

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
Contributor

@Copilot 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

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.

2 participants