Skip to content

🆕 Improve Support for QuPath GeoJson and Multipoint Geometry #841

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 34 commits into
base: develop
Choose a base branch
from

Conversation

measty
Copy link
Collaborator

@measty measty commented Jul 31, 2024

This PR makes a collection of changes related to reviewer comments in the TIAViz paper.

Main changes are:

  1. Layer names in the interface for static image overlays now are named after filename stem, instead of generic 'layer1', 'layer2' etc to make it easier to distinguish the layers.
  2. Adds multipoint geometry rendering as qupath exports collections of points as multipoints not individual point annotations
  3. Robustifies qupath import from geojson to handle qupath special case of nucleusGeometry.

@measty measty marked this pull request as draft July 31, 2024 13:09
@measty measty changed the title address review comments address TIAViz review comments Jul 31, 2024
@shaneahmed shaneahmed changed the title address TIAViz review comments 🆕 Address TIAViz Review Comments Aug 2, 2024
@shaneahmed shaneahmed added this to the Release v1.6.0 milestone Aug 2, 2024
@shaneahmed shaneahmed added the enhancement New feature or request label Aug 2, 2024
Copy link

codecov bot commented May 29, 2025

Codecov Report

❌ Patch coverage is 66.66667% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 99.61%. Comparing base (d5c1995) to head (233aba3).

Files with missing lines Patch % Lines
tiatoolbox/visualization/tileserver.py 50.00% 5 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #841      +/-   ##
===========================================
- Coverage    99.70%   99.61%   -0.09%     
===========================================
  Files           71       71              
  Lines         9141     9160      +19     
  Branches      1190     1196       +6     
===========================================
+ Hits          9114     9125      +11     
- Misses          23       28       +5     
- Partials         4        7       +3     

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

@measty measty marked this pull request as ready for review May 29, 2025 17:16
@Jiaqi-Lv Jiaqi-Lv requested a review from Copilot June 13, 2025 10:35
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 PR addresses reviewer feedback for the TIAViz paper by updating the overlay naming scheme, adding multipoint geometry rendering, and robustifying geojson importing for the qupath nucleusGeometry format.

  • Renames static image overlay layers to the filename stem.
  • Introduces multipoint geometry rendering in the tile renderer and adds associated tests.
  • Enhances geojson import logic to handle qupath's nucleusGeometry.

Reviewed Changes

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

Show a summary per file
File Description
tiatoolbox/visualization/tileserver.py Uses the file stem for overlay layer naming instead of a generic index.
tiatoolbox/visualization/bokeh_app/main.py Adjusts slider and alpha mappings to use the new naming scheme.
tiatoolbox/utils/visualization.py Adds multipoint geometry rendering methods and updates rendering logic.
tiatoolbox/tools/pyramid.py Minor update: adds type import for Literal.
tiatoolbox/annotation/storage.py Incorporates qupath's nucleusGeometry into the geojson transformation.
tests/test_tileserver.py Updates tests for overlay naming consistency.
tests/test_app_bokeh.py Updates slider tests to reflect the new naming convention.
tests/test_annotation_tilerendering.py Adds tests for multipoint geometry rendering.
Comments suppressed due to low confidence (2)

tiatoolbox/visualization/tileserver.py:516

  • Ensure that deriving overlay layer names solely from file stems does not lead to naming conflicts if multiple overlays share the same filename stem. Consider appending an index or unique identifier if duplicates may occur.
layer = overlay_path.stem

tiatoolbox/utils/visualization.py:856

  • Replacing self.thickness with -1 in the cv2.circle call forces a filled circle, which may bypass intended thickness settings. Verify that this change produces the expected visual output for point annotations.
thickness=-1,

Copy link
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 @measty It looks good to me.

I have added a few comments and there are some conflicts to resolve before we merge.

@shaneahmed shaneahmed changed the title 🆕 Address TIAViz Review Comments 🆕 Improve Support for QuPath GeoJson and Multipoint Geometry Jul 10, 2025
@measty
Copy link
Collaborator Author

measty commented Aug 14, 2025

Thanks @measty It looks good to me.

I have added a few comments and there are some conflicts to resolve before we merge.

I've addressed the comments and the conflict, looks like I still need to add a test though

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