Issue with some Aperio SVS files

Benjamin Gilbert bgilbert at cs.cmu.edu
Tue Jun 10 03:13:54 EDT 2014


On 06/05/2014 06:54 AM, Derek Magee wrote:
> On 05/06/2014 04:23, Benjamin Gilbert wrote:
>> Derek, could you give a rough idea of how many slides you have with this
>> problem?  Do you have slides where the transparent areas impinge on
>> meaningful content, as opposed to the background color?  Can you send me
>> a couple samples for testing?
>>
> i) No. Slides: I only spotted it when I visualised a gallery of
> thumbnails of about 1000 slides, so it's rare. I think about 6 in that
> set had issues like this (so <1%).

Interesting.  All of the slides I have seen with this flaw have an 
ImageDescription field starting with "Aperio Image Library vFS90 01".

> ii) All missing data was nearish the bottom - but not necessarily the
> last row (and appears to be non-tissue areas as far as I can tell),
> although sometimes it was fully transparent (displayed in red in my
> app), other times just black (indicating non-zero transparency).

Thanks for the samples!

On your second slide, level 1 (4x downsample) has a bottom row which is 
missing every 4th tile.  On level 2 (16x downsample), only the first 
tile in the bottom row is missing, but the other tiles are corrupted. 
It seems that, when downsampling for level 2, the Aperio encoder chokes 
on the empty tiles it generated in level 1.  Tile (4, 5) in level 2 
should be composed of tiles (16, 20) through (19, 23) from level 1, but 
is actually composed of (13, 20) through (16, 23), *rotated right by one 
column*; and the missing tiles render as black when downsampled.

As to the thin black line above the transparent areas: that's due to 
your application mishandling transparency.  Since Aperio has non-integer 
downsamples, levels > 0 will have a partial pixel at the boundary of a 
transparent area.  OpenSlide returns premultiplied pixel data; if your 
application chops off the alpha channel without undoing the 
premultiplication, the partial pixels will render too dark.

> iii) I've not seen the problem on level 0, just lower resolutions.
> Taking missing data from level 0 seems a sensible approach to me (and I
> guess that's what ImageScope is doing).

It's a bit worse than that: if a tile is missing on level N, the 
corresponding tile on all levels M > N must be rendered from lower 
levels, even if the tile exists in level M.

All of this is now fixed in master, and today's snapshot build should 
correctly render these slides.  Thanks for advocating a proper fix.

--Benjamin Gilbert



More information about the openslide-users mailing list