On 2/10/2012 7:46 AM, Zachary Pincus wrote:
Indeed metadata are important, thanks for pointing this out, I'll have a look at it (though I find metamorph is not so good at recording good metadata).
By the way, I have both .stk and .tif images, so I use Christoph Gohlke tifffile.py for the .stk files. Is ther any chance this will be integrated to skimage?
Wow! Somehow I was not familiar with Christoph's tifffile.py... that'll be very handy for these cursed LSM files I have laying around. (No help for the ZVIs, but I already have a silly zvi->ome-tiff workflow for them.)
Perhaps Christoph, who frequents this list, can weight in on whether it would be a good idea to wrap this in as a skimage IO plugin, or if it's best as a separate project...
Zach
A skimage io plugin for tifffile.py is straightforward (attached). The module already implements imread, imsave, and imshow functions. Those functions return/save/show n-dimensional numpy arrays (n>=2). I'm not sure skimage can handle n>3? Tifffile.py and tifffile.c are BSD licensed, so it is no problem to include them with skimage. I don't think the module itself should be maintained or supported as part of skimage. Regarding those cursed, broken, undocumented or NDAed, microscopy file formats: I'm aware of two other projects that strive to read LSM files: pylibtiff <http://code.google.com/p/pylibtiff/> and pylsm <http://www.freesbi.ch/pylsm>. How about a plugin for BioFormats <http://loci.wisc.edu/software/bio-formats>, which supports many more formats? The Cellprofiler project contains GPLed bindings <https://svn.broadinstitute.org/CellProfiler/trunk/CellProfiler/bioformats/>. Christoph