Saving large, high channel count tiffs for use in QuPath
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I'm trying to save a large (~100kx50k pixel) image with 8 channels out to a tiff with the goal of being able to open it in QuPath. Ideally this would be both tiled and pyramidal, though I could generate the pyramid after saving. Any direction or references on this would be appreicated, googling and fiddling I seem to have hit a wall. I assume I should be able to write multipage bigtiffs with blocproc, but I can't see how to do it. Some of my flailings around documented below if this helps.
These images seem to be too big to write with tiff.write or with the bioformats bfsave library. I can save individual channels out to tifs following the bigTiffWriter https://www.mathworks.com/matlabcentral/fileexchange/42086-bigtiffwriter example using blocproc but I think the channels should be separate pages rather than samples and can't figure out how to write multiple big pages to a file following this example. I tried writing out channels one by one with the bigTiffWriter changed to append, in the vague hope it would create multiple pages but this generates an unable to write tile error, I can't quite see why. I've also tried writing it out with 8 samples per pixel, this runs, but the resulting file seems to behave oddly when I attempt to create pyramid levels for it with bfconvert. Having run bfconvert.bat -pyramid-resolutions 5 -pyramid-scale 2 -noflat on the saved image, the resulting tiff reads to the bioformats importer in fiji as having the unexpected size of XxYx40 slices resolution, while the bfconvert generated pyramid levels within the file have the expected downsampled XxYx8 slices. Qupath doesnt recognize it as a pyramidal tiff and sucks in a couple of the small pyramid levels apparently at random. I've also tried saving each channel out from matlab into a separate file using blocproc, which seems to work fine, then concatenating and generating a pyramid from these with bfconvert, but the bfconvert call has run for 3 days so far and written a file of about 1/3 the expected size so far, so I dont think this is a viable path... Any thoughts deeply appreicated.
1 Kommentar
Marco A. Acevedo Z.
am 20 Nov. 2022
You can use pyvips. It is a bit of a learning curve to set it to work properly but it allows saving in a QuPath readable OME-TIFF. Follow: https://github.com/libvips/pyvips/issues/170
Cheers,
Antworten (0)
Siehe auch
Kategorien
Mehr zu Get Started with Image Processing Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!