DeepMicroscopy / SlideRunner

SlideRunner is a tool for massive cell annotations in whole slide images
GNU General Public License v3.0
75 stars 10 forks source link

AttributeError: 'SlideRunnerUI' object has no attribute 'get_colors' #20

Closed mingrui closed 5 years ago

mingrui commented 5 years ago

Hi,

Recently working an a polygon ROI to .png patches plugin, updated to latest code, but it seems the polygon tool is breaking when "closing" a polygon.

at the end of my polygon drawing, I will double click and select a annotation label, then it crashes. this is the error:

Traceback (most recent call last):
  File "/mnt/960EVO/workspace/pathology/SlideRunner-Master/SlideRunner/gui/annotation.py", line 50, in addPolygonAnnotation
    self.showAnnotationsInOverview()
  File "/mnt/960EVO/workspace/pathology/SlideRunner-Master/SlideRunner/SlideRunner.py", line 1003, in showAnnotationsInOverview
    self.tn_annot = self.overlayAnnotations(self.tn_annot, region=[np.zeros(2),tnsize], zoomLevel=self.thumbnail.downsamplingFactor, thickness=1, adjustList = False)
  File "/mnt/960EVO/workspace/pathology/SlideRunner-Master/SlideRunner/SlideRunner.py", line 1114, in overlayAnnotations
    image = self.showPolygon(tempimage=image, polygon=poly[0], color=self.get_colors(poly[1]))
AttributeError: 'SlideRunnerUI' object has no attribute 'get_colors'
[1]    12682 abort (core dumped)  python main.py
maubreville commented 5 years ago

Let me check this, I think we can resolve this quickly.

maubreville commented 5 years ago

Can you re-check? It was a typo introduced when I extended the amount of possible classes :-(

mingrui commented 5 years ago

yes it's working! that was fast thx!