Export ome.xml metadata from micromanager data

I record image sequences in bioformat (ome.tif) in micromanager which saves metadata in “.txt” file. however for some program I need ome.xml file. I tried to export ome.xml from the bioformat plugin in micromanager, but it only sames the images as “.ome” file.

Can somebody help me in getting the “ome.xml” metadata file from “metadata.txt”?

If you are simply trying to extract the OME-XML from the existing file then the easiest way is probably to download the command line tools from https://www.openmicroscopy.org/bio-formats/downloads/ and use the following command:

showinf -omexml-only /path/to/file/myFile.ome.tif >> path/to/output/myFile.ome.xml

If you are trying to convert the file to use an OME-XML companion file then that will be different and I can help with that too.

1 Like

Thanks, david! I need the ome.xml file (along with ome.tif) to read in python and get complete metadata. I tried the above command, it showed various errors and created an ome.xml file with no data.
It would be helpful if you can help me with that.

What errors were you seeing?

This is how the error looks like.

Hi @biswajitSM Can you try allocating more memory to the java process?

export BF_MAX_MEM=2g
./showinf -omexml-only ...

See https://docs.openmicroscopy.org/bio-formats/6.0.1/users/comlinetools/index.html#command-line-environment for more options.


@biswajitSM the error you are receiving happens when the showinf utility tries to open the individual planes for display.

As far as I understand, you are only trying to generate the OME-XML representation in a non-graphic environment. If that is the case, you might want to pass -nopix to skip the plane loading:

./showinf -nopix -omexml-only ...

Increasing the JVM memory as @joshmoore suggested might still be needed depending on your file.


1 Like

This is the perfect solution for me. Thanks, Sébastien!

Thanks, Josh! This works.