1

I read a lot of resources saying that creating svs files is impossible. Is there any way to tweak the tif file contents in such a way that it can be saved as a SVS file by any chance. I was able to create a Aperio Tif slide using this tutorial. Can anyone please help me in creating a SVS file or any tips ? I am also open to manual suggestions where I have to tweak the file properties manually. Thank you!

Trying to create SVS Files

major
  • 11
  • 1

1 Answers1

0

You can create an SVS file, but it's not easy. Aperio's SVS file is really a TIFF file. But it applies some parts of the TIFF standard wrong, so it's a TIFF file with errors.

LibTIFF will not output a file identical to an SVS. It simply refuses to do things wrong. So if you want to write an SVS file, you'd have to either write a correct TIFF file and then tweak some of the tags after the fact, or write the incorrect TIFF file manually (i.e. figure out which bytes to output in which order, following the SVS specification). Neither of these is easy to accomplish, and you should be well versed in the TIFF standard and binary file manipulation before you attempt this.

On the other hand, unless you are trying to fool someone with a fake SVS file, you really shouldn't need to do this. Most software tools that read SVS files also read compliant TIFF files. I would suggest writing your image out as a tiled, pyramidal TIFF file and seeing if that works in your application.

Cris Luengo
  • 55,762
  • 10
  • 62
  • 120
  • According to the Aperio specification linked at https://openslide.org/formats/aperio, SVS files are TIFF/BigTIFF compliant. In practice, like with many other TIFF based formats, the SVS files actually written by software are not fully TIFF compliant. It would be interesting to see if SVS files written according to the specification are accepted by OpenSlide and the "Aperio Image Library"... – cgohlke Feb 06 '23 at 21:23
  • @cgohlke It is probable that OpenSlide will open a correct TIFF pretending to be an SVS file. LibTIFF will read the SVS file as a TIFF file. It complains about some inconsistent tags, but otherwise is happy. I believe OpenSlide opens the tiled, pyramidal TIFF file with LibTIFF, and if it has a "ImageDescription" tag that says "Aperio", then it'll claim it's an SVS image. But the Aperio (now Leica) software might be depending on the broken (misused) tags. I don't know. – Cris Luengo Feb 06 '23 at 21:56