I am trying to study difference in file size for WSI images (.tiff, .svs) between pyramidal and single level, and estimate time / cpu resources need.
Those will be used as cold-storage / archival.
The main thinking is : obtain pyramidal file -> reduce size to only highest resolution without additional compression -> cold-storage -> reconstruct pyramids if needed.
I tried to read the slides using openslides, however, i was getting MemoryError for level:
img = slide.read_slide((0,0), 0, slide.level_dimensions)
the ideas was to read the slides, and save them using the same compression of the original slides, but this is computationally heavy.
So, instead of reading and then saving, could we delete all levels above level?
I could not figure a way to convert it to numpy array for easier manipulation.
I tried qupath: file -> export image, it was not fast, but could not figure a way to run it headless to batch process. the saved file was a single level ome.tif, about 1.5 GB, and was able to view it in qupath. This solution also applied additional compression that I do not want.
I also tried bfconvert, but it took a lot of time and CPU resources.