Striping error for Roche/Ventana .bif files

Derek Magee D.R.Magee at leeds.ac.uk
Mon May 22 09:47:14 EDT 2017


I wrote the messages (below) a couple of months back and got no reply from the list. I did a bit of digging and found the following posts:

https://lists.andrew.cmu.edu/pipermail/openslide-users/2015-April/001032.html
"Note that OpenSlide's support for Ventana BIF is incomplete.  In
particular, tile positioning is approximate, so you will see seams."

and
https://github.com/openslide/openslide/issues/132
Which shows a similar (but possibly not identical) issue. The difference being my images seem to have every other column self consistent (i.e. even columns seem to line up to other even columns, and odd columns seem to line up to odd columns. It's almost like a tile is missing in every other row (possibly related to the TIFFReadDirectory: Warning, Unknown field with tag 34677 (0x8775) encountered message??).

There is some discussion there about needing a global optimisation of position. Optimisation is sort of my thing, so maybe I can help here? I'm assuming we're talking about an optimisation based on the tile positions in the metadata, not on the image content. If so, some of the libraries suggested are a bit heavyweight I'd say (containing lots of methods for dealing with tiling based on image content). Also RANSAC was suggested (an optimisation approach that's pretty easy to implement from scratch, but less desirable than a closed form least squares approach in terms of finding a global optima). I suspect this could be implemented either with no additional libraries or using something with a generic linear least squares solver like CLAPACK (BSD licenced). In fact if I interpret the following statement right there may be a REALLY simple solution:

"Instead, they store pairwise alignments (each tile's offset with respect to each of its neighbours), plus a confidence for each alignment. As a result, it's easy to align either rows or columns of tiles, but not both at once, since error accumulates in the other axis. To fix this, we need to handle tile positioning as a global optimization problem." (https://github.com/openslide/openslide/issues/132)

Consider the following approach:

Set tile 0,0 to position 0,0 (or other arbitrary position)
For each tile in row 0 set position based on tile to it's left
For each tile in column 0 set position based on tile above
Then loop through remaining tiles in row then column order:
    Set position based on average of tile above and left (plus relevant offsets)

I may of course have misunderstood the nature of the offsets and I'm ignoring the confidences, but this approach is simple (closed form, requires no additional libraries) and minimises error locally. I can't believe the Ventana viewer is doing some really complicated optimisation every time you open an image.

Derek

P.S. I only just discovered the GIT issue tracker. Should this discussion be there?

From: openslide-users [mailto:openslide-users-bounces+d.r.magee=leeds.ac.uk at lists.andrew.cmu.edu] On Behalf Of Derek Magee
Sent: 29 March 2017 00:36
To: openslide-users at lists.andrew.cmu.edu
Subject: RE: Striping error for Roche/Ventana .bif files

P.S. Should have said, get the error:

TIFFReadDirectory: Warning, Unknown field with tag 34677 (0x8775) encountered.

D.

From: openslide-users [mailto:openslide-users-bounces+d.r.magee=leeds.ac.uk at lists.andrew.cmu.edu] On Behalf Of Derek Magee
Sent: 29 March 2017 11:43
To: openslide-users at lists.andrew.cmu.edu<mailto:openslide-users at lists.andrew.cmu.edu>
Subject: Striping error for Roche/Ventana .bif files

Hi,

I've got some Roche-Ventana .bif files and there is some sort of striping artefact present at all magnifications. It's like there are vertical stripes of around 1500-1600 pixels that are vertically offset from each other. See:

https://drive.google.com/open?id=0B4dreadgSUU4X3QyQm16T3dmcjQ

Apparently they look ok on the Roche viewer. I know very little about the scanner used. Happy to share images with developers, but rather not put link on a public forum.

I'm using openslide windows binary release openslide-win64-20160717, which I think is the latest.

Thanks

Derek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/openslide-users/attachments/20170522/092d966d/attachment.html>


More information about the openslide-users mailing list