SBU-BMI / wsinfer

🔥 🚀 Blazingly fast pipeline for patch-based classification in whole slide images
https://wsinfer.readthedocs.io
Apache License 2.0
56 stars 9 forks source link

differences in padding between large_image and openslide/tiffslide #141

Closed kaczmarj closed 1 year ago

kaczmarj commented 1 year ago

This issue concerns patches at the edges of a whole slide image. If a region is requested that extends over the slide boundary, then...

what should we do? due to the tissue detection, we don't expect many (or any) patches near the slide borders, but we should decide on a way forward.

i do not think should simply return the portion of the image in slide bounds, because these images are typically resized for input to a model and this resizing will alter the physical sizes of the objects in the image. padding seems more reasonable because it preserves physical sizes.

openslide large_image
image image
kaczmarj commented 1 year ago

for our tests in the dev branch, i will use v0.3.6 to create ground truth model outputs, but i will add white space padding to the images at the edges of the test slide. i should consider making the test image a bit smaller too, so tests run faster...

kaczmarj commented 1 year ago

actually the padding is black. it showed up white earlier because the alpha channel was set to transparent. both tiffslide and openslide pad with black. openslide might add an alpha channel (rgba) as well.