Write OMETiff from python

Hi,
I need to write tiff-stacks in the OMETiff format from python.
Is there some Bioformats library to do this already?
I did a quick search on github and here, but couldn’t find anything.

Pinging @Christian_Tischer @joshmoore

Thanks for your help!

There is this python-bioformat from cell profiler, relying on Javabridge but to be honest this javabridge is a pain to setup.

If you can use Jython within Fiji then it’s much straightforward to access the Bioformat package.
Otherwise not ideal but eventually calling the bioformat command line tool (bftool) from a python script ? :grin:

Hi,

our APEER team has created a dedicated PyPi package to simplify this task:

or on GitHub here:

It is still quite new, so we are happy to get feedback.

Sebi (from APEER)

4 Likes

That looks very interesting!
I will have a look later.

Ah, @sebi06. We hadn’t seen that yet. Nice! It would be good to know if there’s anything that from our side that would have helped. For example, would having omexmlClass in a central library have helped you (and others) do this more simply? Or is the flexibility of having your own generator worth it?

Providing some common API (perhaps versioned per schema release) is likely something we could commit to doing, with the hope of preventing others from necessarily needing to do the same. E.g. in addition to the 2013-based python-bioformats/apeer one, we also know of the 2015-based #ilastik one in https://github.com/ilastik/lazyflow. Any others?

Happy to discuss possible avenues (and interesting to hear your feedback @constantinpape!)

Cheers,
~Josh

1 Like

Why we created this and how it is used is described here:

Let me think about possible avenues a bit. I like your proposal.

Sebi

2 Likes