Skip to content

OpenSlide Alternative (tifffile)

I found the Python library tifffile can open SVS files.

It can be installed from here

https://pypi.org/project/tifffile/

by running the command

pip install tifffile

as root.

Also, it is necessary to install imagecodecs, too.

pip install imagecodecs

Then by simple command

x = tifffile.imread(FILE_NAME, key=LEVEL_NUMBER)

it reads the SVS file in specified level and return a Numpy array in x.

Based on my experience it doesn’t read Alpha channel, which doesn’t seem important in our SVS dataset.

Published inTools

Be First to Comment

Leave a Reply