Skip to content

[BUG] Testframe doesn't always draw found localizations #1343

@barentine

Description

@barentine

Describe the bug

Traceback (most recent call last):
  File "/Users/andy/code/python-microscopy/PYME/DSView/modules/LMAnalysis.py", line 287, in <lambda>
    bTestF.Bind(wx.EVT_BUTTON, lambda e : self.lmanal.OnTestFrame(e))
  File "/Users/andy/code/python-microscopy/PYME/DSView/modules/LMAnalysis.py", line 646, in OnTestFrame
    self.SetFitInfo()
  File "/Users/andy/code/python-microscopy/PYME/DSView/modules/LMAnalysis.py", line 604, in SetFitInfo
    self._ovl.filter.setResults(self.fitResults)
AttributeError: 'PointDisplayOverlay' object has no attribute 'filter'

this is because PointDisplayOverlay takes filter as an optional argument, so we might sometimes have an overlay (which we check for, and build if we don't) without having a filter (which we don't check for, and err if we don't)

To Reproduce
Steps to reproduce the behavior:

  1. PYMEImage open a tif
  2. scroll to a frame you like
  3. test frame
  4. See error

Expected behavior
if the points overlayer doesn't have a filter, either inject one or make a new overlay with

Screenshots
If applicable, add screenshots to help explain your problem.

Platform (please complete the following information - or copy-paste from error dialog if shown):

  • OS: [e.g. Win10] Mac 12.6.2 (arm)
  • Python version: 3.8
  • numpy version: 1.23.5
  • wxpython version [if a UI bug]: 4.2.0

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions