Closed tuttelikz closed 4 months ago
Hi, thanks for the tool. I am testing Generic tiled tiff to SVS with command line. Image sample from here: https://openslide.cs.cmu.edu/download/openslide-testdata/Generic-TIFF/
wsic convert -i CMU-1.tiff -o CMU-1-1-out.svs -c jpeg --overwrite
TypeError: ('Could not serialize object of type DataArray', "<xarray.DataArray '0' (Y: 32914, X: 46000, C: 3)>\ndask.array<astype, shape=(32914, 46000, 3), dtype=uint8, chunksize=(256, 256, 3), chunktype=numpy.ndarray>\nDimensions without coordinates: Y, X, C")
Tried:
import os import wsic from pathlib import Path OPENSLIDE_PATH = r'D:\001-setup-files\openslide-win64-20231011\bin' if hasattr(os, 'add_dll_directory'): # Windows with os.add_dll_directory(OPENSLIDE_PATH): import openslide else: import openslide if __name__ == '__main__': rootpath = Path(r"D:\wsi") dataset = "CMU-1-1" reader = wsic.readers.TIFFReader(rootpath.joinpath(dataset+".tiff")) writer = wsic.writers.SVSWriter( rootpath.joinpath(dataset+"-out.svs"), tile_size=(256, 256, 3), compression="jpeg", compression_level=90, overwrite=True, ome=False, app_mag=None, shape=reader.shape ) writer.copy_from_reader(reader, read_tile_size=( 256, 256), num_workers=32, timeout=30.0)
Throws same:
If I replace reader,
reader
reader = wsic.readers.OpenSlideReader(rootpath.joinpath(dataset+".tiff"))
Now it throws:
RuntimeError: cannot schedule new futures after interpreter shutdown
What might be the issue, how to solve this?
For anyone having similar issue: this error disappeared after I run exactly same code on pure Linux Ubuntu machine (WSL also works, but not stable..)
Description
Hi, thanks for the tool. I am testing Generic tiled tiff to SVS with command line. Image sample from here: https://openslide.cs.cmu.edu/download/openslide-testdata/Generic-TIFF/
What I Did
Output
Additionally
Tried:
Throws same:
If I replace
reader
,Now it throws:
What might be the issue, how to solve this?