Converting image downsamples

Derek Magee D.R.Magee at leeds.ac.uk
Sun Apr 29 10:10:32 EDT 2018


Hi Kathleen,

I hope I’m understanding you correctly. In general WSIs contain a set of down-sampled images as well as the full resolution data. The downsamples present will vary from vendor to vendor. E.g. Aperio-Leica use 1 (native), 1/4 and 1/16 resolutions*. These are generated at scan time by a method specific to the vendor (probably digital downsampling of some kind, but we can’t be sure). Openslide reports which levels are present and the downsample factor  (which may not be integer power of 2 necessarily, but is usually pretty close).

So, if you want a  level (downsample factor) that is present you simply fetch data from that level.

If you want data from a level that is NOT present in the file, I typically fetch the next level up (e.g. for 1/2 resolution in Aperio – which is not present)- I fetch the full resolution data) and downsample it (e.g. by a  factor of 2 in this case). This can obviously be done in different ways from nearest neighbour, to linear, to higher order (e.g. polynomial) interpolation. I tend to implement nearest neighbour interpolation myself (for applications where speed is a premium). For other interpolation methods I tend to use OpenCV (in c++, or python). There are other options.

Does that answer your question?

Derek

(*Strictly Openslide reports Aperio-Leica files as having levels APPROXIMATELY at these downsamples. This has been discussed on this list before and it is not clear if Aperio actually downsample by a non-integer power of 2 to ensure each level is exactly the same width/height in physical units even with rounding to nearest integer number of pixels, or they just report it slightly wrong to suggest this but downsample by an integer power of 2. The difference is pretty academic. Other vendors usually stick to integer power of 2 downsamples. i.e 2,4,8,16, …).

From: openslide-users [mailto:openslide-users-bounces+d.r.magee=leeds.ac.uk at lists.andrew.cmu.edu] On Behalf Of Kathleen Sucipto
Sent: 29 April 2018 13:55
To: openslide-users at lists.andrew.cmu.edu
Subject: Converting image downsamples

Hi,


I'm still getting familiar with WSI concept. Is it correct to say that in order to convert the downsamples (let's say from 1, 2, 4, ... to 1,4,16, ...) we just need to resize the image in all levels? Or is there a faster method?

Thanks!


Kathleen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/openslide-users/attachments/20180429/0c1d8d57/attachment.html>


More information about the openslide-users mailing list