readlif
readlif copied to clipboard
Issues with readlif and RGB camera
Hello,
I've been using this package for a while to extract images from .lif generated by a Leica microscope with a monochrome camera. Thank you very much for the work done!
Recently, I moved to a different setup with a RGB camera. I have been unable to successfully extract images with readlif from the .lif obtained on this setup. The images obtained seem to have a smaller field of view than what they should have, and seem to mix different area on a single image. I went back to the basics and used the examples of codes provided, but the issue persisted. I've attached an example of such image for reference. Note that I can open these .lif with no issues with ImageJ.
I am not very knowledgable with images and image formats, but I believe that the issue might arise from the fact that the images taken by the RGB camera are interleaved, and therefore they are not correctly divided into channels as they should. This hypothesis is based on the fact that there is a parameter "interleaved" in the .lif file that I was able to check with imageJ.
Interesting! I haven't seen a .lif file from an RGB camera before. All of the file-reading assumptions are for single-channel images. Unfortunately, there isn't a public LIF specification so most of this has been built from examples.
The bioformats group that made the plugin for ImageJ has access to a full file spec, so it should be feature complete. If you're needing quick access to your data, the python-bioformats package works well, although the memory and install requirements are greater.
If you wouldn't mind sharing the file, a fix could probably be made! If you don't want to share the file publicly, you can send me a twitter DM (find that in my profile).
Hello,
Thanks for your answer! I might give the python-bioformats package a try. In the meantime, I've sent you the files on twitter. Let me know if I can be of any assistance.