filippocastelli/pyometiff

Writing multi-series OME-TIFF

arkwave opened this issue · 11 comments

Hi, I was wondering if it would be possible to implement writing multi-series OME-TIFFs?

The underlying tifffile.TiffWriter class actually supports this natively (example here), and it would be really nice to have this alongside the XML validation that the OMETIFFWriter class does.

Happy to make a PR that does this, if that would help!

It seems a nice feature to add and easy to implement, if you'd like to submit a PR you're more than welcome!
Thank you!

kind of on a related note, can I ask why the call to OMETiffWriter.write saves the metadata as a description, rather than passing it in via the metadata argument to tif.save?

Hello, sorry for the late reply.
Providing a JSON-formatted description argument to tif.write is the most direct way to populate ImageDescription tag, passing a dict via metadata would just return it JSON-encoded with no real advantage.
https://github.com/cgohlke/tifffile/blob/375d97f62df6482142b51f1b38a49bdd24d18a60/tifffile/tifffile.py#L17646
The implementation is not visually easy to follow but you can easily verify with a debugger
https://github.com/cgohlke/tifffile/blob/375d97f62df6482142b51f1b38a49bdd24d18a60/tifffile/tifffile.py#L2350

Hello, it's me again. Quick question, how does the current implementation of OMETiffWriter handle RGB images, i.e. images with dimension order SYX? I have an RGB image with one single channel, and am having trouble writing it out to an OME-TIFF. Any help would be much appreciated!

If you would like this to be moved to its own topic, please let me know and I can repost.

yeah maybe we should open a new issue just for readability purposes.
Could you reproduce the issue in a new thread? it would be easier for me to investigate it

Done! Opened a new issue here: #5

Hey @arkwave and @filippocastelli, I just read this thread when looking for multi-series support. Has there been any update recently? :-)
Thanks a lot for the great work1

hi @beniroquai sorry for the slow updates, Ive been working on my phd defense and didn't have much time to spend on this project.
Now that it's done I can definitely spare some time to include multi-series support.
I just need some time to look into it more closely

That would be fabulous! Thanks a lot! I can be a great beta tester ;D

Hi @beniroquai , just wanted to let you know I'm still on it. I'm slow because I don't have much time for dev on personal projects and this is pretty much a one man show at the moment.
This repo really needs some contributors who are actively working in photonics / microscopy / lifescience to speed things up.