wsi-preprocessing icon indicating copy to clipboard operation
wsi-preprocessing copied to clipboard

About the execution of the "example.py"

Open tiffanychang0101 opened this issue 3 years ago • 4 comments

Hi, I have some problem about running the "example.py".

  • running on terminal
  • using conda virtual environment, and following README to install the environment

When I run the code using CMU-1.svs, the process will hanging at pp.calculate_filters("slides_mpp_otsu.csv", "", "tiles_filters.csv") without errors. This phenomenon also happened when I using my own data.

In the other hand, if I run the code below first, then run pp.calculate_filters("slides_mpp_otsu.csv", "", "tiles_filters.csv"), (that is, run calculate_filters funtion separately) it will success.

What happened to this phenomenon? Is it related to ProcessPoolExecutor?

import wsi_preprocessing as pp

# if, for instance, CMU-1.svs is in your current directory:
slides = pp.list_slides(".")

pp.save_slides_mpp_otsu(slides, "slides_mpp_otsu.csv")

# this may take some minutes, depending on your local machine
pp.run_tiling("slides_mpp_otsu.csv", "tiles.csv")

Thank you so much!!

tiffanychang0101 avatar Nov 09 '21 12:11 tiffanychang0101

Anyone encountered the following error when executing pp.save_slides_mpp_otsu(slides, "slides_mpp_otsu.csv") working on CMU-1.svs

File "", line 1, in File "D:\Users\user\anaconda3\lib\site-packages\wsi_preprocessing\slides.py", line 37, in save_slides_mpp_otsu vi = utils.read_image(file, access="sequential", level=2) File "D:\Users\user\anaconda3\lib\site-packages\wsi_tile_cleanup\utils\pyvips.py", line 5, in read_image vips_image = vips.Image.new_from_file(f"{image_path}", **kwargs) File "D:\Users\user\anaconda3\lib\site-packages\pyvips\vimage.py", line 231, in new_from_file return pyvips.Operation.call(name, filename, File "D:\Users\user\anaconda3\lib\site-packages\pyvips\voperation.py", line 288, in call raise Error('{0} does not support optional argument {1}' pyvips.error.Error: VipsForeignLoadTiffFile does not support optional argument level

shanibenamitay avatar Dec 21 '21 17:12 shanibenamitay

@lucasrla Can I work on this issue?

ADE-17 avatar Jun 05 '23 13:06 ADE-17

@shanibenamitay I have the same question, and I don't know how to solve this question. Did you solve the question?

LiuJin629 avatar Aug 28 '23 01:08 LiuJin629

What is the magnification of WSI after processing?

LiuJin629 avatar Aug 28 '23 01:08 LiuJin629