Downsample 40X (0.25 MPP) to 20X (0.5 MPP)

I have some Aperio svs files I would like to downsample from 40X (0.25 openslide.mpp) to 20X (0.5 openslide.mpp) maintaining the whole WSI pyramid structure and metadata. I tried libvips but I am not able to get it work properly.

Would QuPath manage this kind of conversion? I would like to do it in batch so command line would be appreciated.

Also, I have some svs files that are 20X but have 0.25 openslide.mpp, I am not quite sure what does this mean. Could it be due to a problem when metadata was imported?

Support for pyramidal OME-TIFF was only added very recently in libvips – so if you aren’t using the latest version, that may be worth a try (I haven’t used it myself for this purpose, but I’ve seen libvips’ conversion is incredibly fast when it works).

It should (albeit via decompression/recompressing) – see and in particular check the help from the convert-ome subcommand at the command line. This has --downsample and --pyramid-scale options – it should work regardless of the actual resolution levels in the pyramid, resizing as needed.

If you can go via a QuPath project and Groovy script, OMEPyramidWriter may give more control: Images registration/alignement, export aligned images

Possibly, but not necessarily… I’ve seen magnifications from different scanners corresponding to very different pixel sizes. It may be worth measuring something that you expect to have a roughly similar size and appears in both images for reassurance (e.g. the diameter of a ‘typical-looking’ nucleus)