Skip to content

Opening the same image in multiple viewers results in detections being wrongly shown in both #1217

@petebankhead

Description

@petebankhead

Bug report

Describe the bug
There's a problem with the tile caching v0.3.2 and v0.4.2 (probably other versions) when using the the same image opened in multiple viewers.

Basically, detections made in one image can show up in the other. The reason is that tiles that show the detections are being cached using the same key in both viewers, because the underlying image files are the same.

To Reproduce

  1. Create a project & add an image
  2. Duplicate the image in the project
  3. Open the original image & its duplicate in different QuPath viewers
  4. Detect cells in a small region in one viewer
  5. Detect cells in a different region in the second viewer
  6. See the cells magically appear in both viewers

Expected behavior
It's possible to work with the same image in multiple viewers.

Screenshots
mixed-viewers

Desktop (please complete the following information):

  • OS: All
  • QuPath Version: v0.4.2 (also v0.3.2 and likely other versions)

Additional context
Because it's a tile caching issue, the problem isn't evident when zoomed in (since the tile cache isn't used to paint detections).

The issue was first reported at https://forum.image.sc/t/qupath-problem-with-showing-detections-in-multi-view/76334/3

The cell counts etc. should be unaffected.

One workaround is to duplicate the underlying image file, so that it has a different key for caching (based upon the file name/path).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions