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

Can't load image - application stuck on slide thumbnail #28

Closed bnapora closed 4 years ago

bnapora commented 4 years ago

Attempting to run application on Windows 10 Created Conda environment (sliderunner) Clone latest repo to file system Installed all requirements from "requirements.txt" Run application When attempting to load an image get the following error: Traceback (most recent call last):

File "C:\WSI\SlideRunner\SlideRunner\SlideRunner.py", line 2642, in openSlide self.updateOverview()

File "C:\WSI\SlideRunner\SlideRunner\SlideRunner.py", line 2567, in updateOverview self.thumbnail = thumbnail.thumbnail(self.slide)

File "C:\WSI\SlideRunner\SlideRunner\processing\thumbnail.py", line 34, in init thumbNail = sl.get_thumbnail(size=(200, 200))

File "C:\ProgramData\Anaconda3\envs\sliderunner\lib\site-packages\openslide__init__.py", line 134, in get_thumbnail tile = self.read_region((0, 0), level, self.level_dimensions[level])

File "C:\WSI\SlideRunner\SlideRunner\dataAccess\slide.py", line 101, in read_region return super().read_region(location, level, size, zLevel).rotate(180)

TypeError: read_region() takes 4 positional arguments but 5 were given

Openslide works fine when used in my own code.

maubreville commented 4 years ago

This should be fixed with f7652e0. Can you try again?

bnapora commented 4 years ago

Yes that did address the load slide issue. Thanks so much. I am now getting a new error each time I attempt to add a slide to the database. It doesn't appear to b Should I enter a new issue for this?

Traceback (most recent call last):

File "C:\WSI\SlideRunner\SlideRunner\SlideRunner.py", line 1923, in openCustomDB self.openDatabase(True,filename=filename)

File "C:\WSI\SlideRunner\SlideRunner\SlideRunner.py", line 1888, in openDatabase self.db.loadIntoMemory(self.slideUID, transformer=self.slide.transformCoordinates)

File "C:\WSI\SlideRunner\SlideRunner\dataAccess\database.py", line 285, in loadIntoMemory allCoords = self.transformer(allCoords)

File "C:\WSI\SlideRunner\SlideRunner\dataAccess\slide.py", line 111, in transformCoordinates retarr[:,0] = self.dimensions[0]-retarr[:,0]

IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed

maubreville commented 4 years ago

Thanks for the feedback. I will look into it! You don't have to raise an extra issue.

maubreville commented 4 years ago

Can you give it another try?

bnapora commented 4 years ago

Yes. That resolved the issue. I've learned app works more smoothly when first loading an image, and then creating or opening a database. After last fix I was (i) opening an existing database first and then (ii) opening a new image (iii) add annotation to new image Would get handled error "Unable to assign annotation to slide". This appears to be because the image is not yet part of the database. If open image first an then open database, then get prompted with "Add image to DB" dialog.

On an unrelated note, I was wondering if you've done any work migrating your code for extracting image patches and labels into FastAI so that it works with FastAIv2. If you have, or can point me at another example, I'd be grateful.

I'm happy to keep testing if helpful. I did come across an issue when attempting to use the Object Detection Plugin: Traceback (most recent call last):

File "C:\WSI\SlideRunner\SlideRunner\gui\mouseEvents.py", line 520, in pressImage leftClickImage(self,event)

File "C:\WSI\SlideRunner\SlideRunner\gui\mouseEvents.py", line 172, in leftClickImage clickedAnno = self.activePlugin.instance.findClickAnnotation( clickPosition=mouseClickGlobal, pluginVP=self.currentPluginVP, zoom=self.getZoomValue())

File "C:\WSI\SlideRunner\SlideRunner\general\SlideRunnerPlugin.py", line 262, in findClickAnnotation for idx,anno in enumerate(self.getAnnotations()):

File "C:\WSI\SlideRunner\SlideRunner\plugins\proc_ObjDetResults.py", line 163, in getAnnotations return self.annos

AttributeError: 'Plugin' object has no attribute 'annos'

bnapora commented 4 years ago

Cool...that fixed it. Thanks.