Correct way to convert SVS slides for Omero import

I add some further info. Looking at metadata with tiffinfo, it seems that another way to recognize label and macro image is the Subfile Type: 0x0 for the pyramid levels, 0x1 for the label, 0x9 for the macro.
@cgohlke script, looked that way, does exactly what is needed for me (and likely many others), because it removes label and macro (I was incorrectly stating it was not, because I was still seeing 3 images on Omero).

Thanks @VDM and @cgohlke.

I concur with the observation that SubFileType 0x1 and 0x9 are typically associated with the label and macro images at least across all our representative private and public SVS samples. Note however that this is not part of the official SVS specification document mentioned above.

I have captured the issue of handling optional label/macros images in Bio-Formats as a GitHub issue.

More generally, the ability to hide/delete/ignore label and/or macro images while importing WSI data in OMERO is becoming increasingly common - see also Remove label and macro from a WSI and Filter only main image for other examples. While a partial conversion either to OME-TIFF or a derived PFF (with all the support caveats associated with the latter) is the current accepted solution, we understand this is far from an ideal workflow. Some discussion has been started on a design issue on ways to handle this workflow from the client-side to the import-side.

3 Likes

Here’s a script posted in another topic showing how to convert from SVS to OME-TIFF using pyvips:

It takes ~30s and ~500mb of memory to convert the CMU-1.svs demo image from openslide, and the resulting OME TIFF should load quickly.

2 Likes

Thanks @jcupitt , your script does the needed conversion in a quick way. I will use it to convert the legacy slides I have to move to Omero. The bfconvert conversion does it right as well, but it is slower (about 2-6 times slower in my experiments).
However, I think Omero import should still try to import SVS files also when without macros and labels, to avoid decoding and encoding of compressed tiles.

Thanks @VDM and @jcupitt. Trying to summarize this thread:

  • at the moment, a complete SVS → OME-TIFF conversion workflow allows to export the WSI image only and import it into OMERO. Both bfconvert or libvips are options with the second one being the most performant for these datasets
  • in the mid-term, being able to import SVS files with no macros and/or labels would allow to further speed up this ingest, using scripts like the one suggested by @cgohlke above if needed.

The discussion around supporting SVS with optional labels/macros has now moved to the GitHub issue. In the meantime, should we mark this issue as solved and update it when an updated reader has been released or are there still some outstanding issues?

2 Likes

Dear @s.besson , thanks I think you summarized well, and for me the issue is solved. The updated reader is the best solution of course, but it seems from the code that is not too complex. As I have written on GIthub, as soon as I can (not easy in these times), I will go to the scanner place in hospital and test the acquisition without label that seems possible from the documentation.
In general, any ex-post use of slides for research or education might need label removal - slides acquired for clinical use do not need anonymization, but if shared for other aims, you have to remove it in some way.

2 Likes