SVS File Whole Slide Image Tiling

Mark Zarella mark.d.zarella at gmail.com
Tue Dec 17 14:00:37 EST 2019


There are algorithms available online (I don’t know specifically where, maybe others can point to a direction) that can do both tissue-finding (request A) and focus detection (request B).  My suggestion is to perform the tissue-finding step at the level of the lowest-res image in the pyramid to speed up the I/O – there’s no sense in reading a set of tiles that are ultimately blank and will be discarded anyway.  

 

Focus detection has been done for a long time in various ways, although I believe Stumpe’s group at google published a preprint on this earlier this year that might be useful.  Not sure if they’ve shared the code or created an end-user function however.

 

 

From: openslide-users <openslide-users-bounces+mark.d.zarella=gmail.com at lists.andrew.cmu.edu> on behalf of Sied Kebir <skycrazer at gmail.com>
Date: Tuesday, December 17, 2019 at 1:08 PM
To: <jcupitt at gmail.com>
Cc: "openslide-users at lists.andrew.cmu.edu" <openslide-users at lists.andrew.cmu.edu>
Subject: Re: SVS File Whole Slide Image Tiling

 

Dear John, 

 

thank you so much! I have managed to get tiles from my .svs file. I have two questions now:

 

A) Of the image tiles I got, many do not have any informative data, e.g. showing the background for example. How can I remove those?

 

B) Some tiles are out of focus, is there a way to remove them as well?

 

Thanks again!

 

Best

Sied

 

Am Mi., 11. Dez. 2019 um 09:49 Uhr schrieb <jcupitt at gmail.com>:

Hello Sied,

On Wed, 11 Dec 2019 at 06:56, Angelos Pappas <angelos at smartcode.gr> wrote:
> You can use vips to create Deep Zoom images using the following command:
>
> vips dzsave yourslide.svs yourdzdirectory

dzsave will make a deepzoom pyramid by default, so a series of levels,
with overlapping tiles at each one.

It has quite a few options -- try:

    vips dzsave yourslide.svs yourdzdirectory --overlap 0 --tile-size
512 --depth one

And it'll only write the top layer (highest res) of the pyramid, tiles
will be 512 x 512, and there will be no overlap. Use --suffix .png if
you want PNG tiles.

You can run it from Python with:

    import pyvips
    image = pyvips.Image.new_from_file("yourslide.svs")
    image.dzsave("yourdzdirectory", overlap=0, tile_size=512, depth="one")

There's a chapter in the libvips manual introducing dzsave:

https://libvips.github.io/libvips/API/current/Making-image-pyramids.md.html

You can also simply crop out tiles in Python:

    import pyvips
    image = pyvips.Image.new_from_file("yourslide.svs")
    tile = image.crop(124878, 232445, 512, 512)

John
_______________________________________________
openslide-users mailing list
openslide-users at lists.andrew.cmu.edu
https://lists.andrew.cmu.edu/mailman/listinfo/openslide-users

_______________________________________________ openslide-users mailing list openslide-users at lists.andrew.cmu.edu https://lists.andrew.cmu.edu/mailman/listinfo/openslide-users 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/openslide-users/attachments/20191217/37a464d0/attachment.html>


More information about the openslide-users mailing list