AW: Getting the EXACT tilesize of an image

Martin Weihrauch m.weihrauch at smartinmedia.com
Mon Mar 25 02:00:14 EDT 2019


Hi John:

That's great, that there is a feature like that! 
Do we have a list of which OpenSlide formats have tiles at all and which don't (or which have e. g. weird overlapping tiles, which wouldn’t perform that way)? If I remember correctly, ndpi of Hamamatsu is tiled, but their VMS is some other weird stuff.

Thanks for all your efforts and congratulations for 30 years of libVIPS!!!!

Martin

-----Ursprüngliche Nachricht-----
Von: jcupitt at gmail.com <jcupitt at gmail.com> 
Gesendet: Sonntag, 24. März 2019 21:27
An: Martin Weihrauch <m.weihrauch at smartinmedia.com>
Cc: openslide-users at lists.andrew.cmu.edu
Betreff: Re: Getting the EXACT tilesize of an image

Hello Martin,

On Sun, 24 Mar 2019 at 19:25, Martin Weihrauch <m.weihrauch at smartinmedia.com> wrote:
> I have the following question: To quickly serve tiles out of formats, I wanted to know: is there the possibility to get the exact tilesize of an image through OpenSlide?

Yes! I asked Benjamin this precise question back in 2011 and he very kindly added the feature for me. libvips uses it to size the tilecache it uses for openslide images.

You can read the tilesize out of the openslide metadata like this:

$ vipsheader -a CMU-1.svs | grep tile
openslide.level[0].tile-height: 256
openslide.level[0].tile-width: 256
openslide.level[1].tile-height: 256
openslide.level[1].tile-width: 256
openslide.level[2].tile-height: 256
openslide.level[2].tile-width: 256

I'm not sure if this was ever documented: it went in as an experimental feature. It gives a useful speedup.

John


More information about the openslide-users mailing list