<div dir="ltr">Hi Tjelvar,<div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 27, 2014 at 5:13 AM, Tjelvar Olsson (JIC) <span dir="ltr"><<a href="mailto:Tjelvar.Olsson@jic.ac.uk" target="_blank">Tjelvar.Olsson@jic.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Dear all,<br>
<br>
Is anyone aware of a Python library for working with OME Tiff files?<br>
<br>
I noticed that there is a Python BioFormats project, which provides a<br>
wrapper around the BioFormats Java libraries.<br>
<a href="https://github.com/CellProfiler/python-bioformats" target="_blank">https://github.com/CellProfiler/python-bioformats</a></blockquote><div><br></div><div>That's my group's project. It's very stable, not so hard to work with and gives you full access to Java as well as a set of straightforward functions to read and write images. It does require the JDK to build it and the JRE to run it and the JRE does add a bit to your memory footprint. Also, there is a little overhead transferring the in-memory image from the Java array to Numpy.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
<br>
However, I have not managed to find a Python library that can read and<br>
manipulate OME Tiff files without the need for Java.<br></blockquote><div><br></div><div>We've used both libtiff (<a href="https://pypi.python.org/pypi/libtiff/0.4.0">https://pypi.python.org/pypi/libtiff/0.4.0</a>) and PIL/Pillow (<a href="http://www.pythonware.com/products/pil/">http://www.pythonware.com/products/pil/</a>). Both are a little tricky loading 16-bit TIFF images. You could use them to read and write the OME-TIFF tag, but you'd have to write the code to parse out what you wanted.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Does anyone know if there is a "Java free" Python library for working<br>
with OME Tiff files?<br>
<br>
Thanks,<br>
<br>
Tjelvar<br>
_______________________________________________<br>
ome-users mailing list<br>
<a href="mailto:ome-users@lists.openmicroscopy.org.uk">ome-users@lists.openmicroscopy.org.uk</a><br>
<a href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users" target="_blank">http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users</a><br>
</blockquote></div><br></div></div>