I wanted to check if I am missing something obvious.
Goal: Use CLI to take a non-pyramidal, no metadata, tif and convert to ome-tif (pyramidal) and add in metadata.
The CLI gives a very clean way to perform the conversion from Python, but the resulting OME-TIF has no pixel size metadata, as expected, and I did not see a way to add metadata in during the conversion process.
Is there any way to modify an image’s metadata through a script, such that it actually modifies the original file (not the way QuPath reads it)? I am assuming not, but wanted to check just in case.
The original .tif runs into a Java array size error if I try to open it on the CLI and edit it + use a script to perform the OME-TIF export. However, I can probably open the pyramidal OME-TIF, add metadata, and then re-export that file. It requires exporting the data twice, though. I considered calling ImageJ to apply the metadata through Image->Properties…, but the image will run into the same Java array size error.
There are apparently issues using bfconvert from Python that I do not fully understand, something about multiple javabridges (I am not handling the Python side of things, though).
It also might be possible to edit the metadata of the ome-tif directly through Python, I just wanted to explore QuPathy options first.
PS I can probably provide the .tif file through Google Drive if desired.