Snippets icon indicating copy to clipboard operation
Snippets copied to clipboard

tma_spot_dearray.py returns error

Open sinanugur opened this issue 1 year ago • 1 comments

Hello,

Thanks for sharing your code. I have a question. When I am trying to run, I get the following error. It seems slide.properties['openslide.mpp-x'] is not available. What can be the reason? Anything related to the image type. I use a qupath tiff file.

Cheers,

args: Namespace(wsi_name='/Users/sium/projects/imagingdata/NS2_4a/Scan2/NS2_4a_Scan2.qptiff', txt_name='project/tmameasure.ns24a.txt', tmaspotsize=6000, outdir='output', level=0)
Extracting patches for /Users/sium/projects/imagingdata/NS2_4a/Scan2/NS2_4a_Scan2.qptiff into output
Downsample at level 0 is: 1.0
WSI dimensions at level 0 are: (38400, 54720).
Traceback (most recent call last):
  File "/Users/sium/projects/dearray/tma_spot_dearray.py", line 44, in <module>
    ratio_x = 1.0/float(slide.properties['openslide.mpp-x'])
  File "/Users/sium/opt/miniconda3/envs/openslide/lib/python3.10/site-packages/openslide/__init__.py", line 257, in __getitem__
    raise KeyError()
KeyError

sinanugur avatar Sep 05 '22 06:09 sinanugur

ooops, sorry, only seeing this now. were you able to figure this out?

choosehappy avatar Jan 11 '23 11:01 choosehappy