Converting scn files to 16-bit/unsigned 8-bit integers OME-TIFF files for usage in Minerva Browser

I am trying to run minerva-author on a H&E dataset of file type .scn . Since, minerva supports OME-TIFF/SVS formats, I opened the .scn file in QuPath (https://qupath.github.io/) and exported it out as OME-TIFF format. However, I get error on using this TIFF file.

(author) vscode ➜ /workspaces/minerva-browser/minerva-author (master ✗) $ python src/app.py
Closing tiff file
Closing mask files
Closing import pool
Closing tiff file
Closing mask files
Closing import pool
Opening file:  /workspaces/minerva-browser/sample003/Untitled.ome.tif
OME  6
'Array' object has no attribute 'values'
Opening file:  /workspaces/minerva-browser/sample003/Untitled.ome.tif

I tried doing this conversion using lib-vips, but got same error. I then tried some sample OME TIFF files from OME-TIFF sample data — OME Data Model and File Formats 6.0.0 documentation, but they give same error.

Minerva documentation says : " All OME-TIFF channels must be 16-bit integers, as output by the mcmicro pipeline, or unsigned 8-bit integers."

Is there a way I could generate the OME-TIFF files in this expected format ?

Not sure if this will help, but I ran into a similar problem in the other direction - making sure QuPath output 8bit images instead of 32bit.

It will almost certainly take some adjustments to convert the script to exactly what you need, but I think the important part is at ensureType.


def op = ImageOps.buildImageDataOp()
    .appendOps(
            ImageOps.Core.multiply(100),
            ImageOps.Core.ensureType(PixelType.UINT8)
    )

File size might be a concern if you go to 16bit, though, so maybe UINT8 is the way to go!