soft-matter/pims — pull request #109 by caspervdw (2014-10-03 17:39:29+00:00)
Title: Pims bioformats

This is a wrapper for python-bioformats. Required are:
- https://github.com/CellProfiler/python-bioformats
- manually overwrite loci_tools.jar with newest version
- https://github.com/CellProfiler/python-javabridge
or (windows compiled) http://www.lfd.uci.edu/~gohlke/pythonlibs/#javabridge
- Java JDK

Unless you are not planning to work with big files, 64bits everything is required.

Big files still have long loading times because metadata of all frames is read in the beginning. Maybe it is better to put all metadata routines separate from get_frame and _initialize, then the user can choose. A lot more metadata can be pulled from _jmd, see http://downloads.openmicroscopy.org/bio-formats/5.0.5/api/loci/formats/meta/MetadataRetrieve.html

get_frame results in a 3D image (if _dimension = 3), its index is the time index, its channels are set by the property channel and the multipoint index by the property multipoint. You can force it to 2D, then the index is the plane index.

There is a strange issue with nd2 files: sometimes CTZYX images appear as multipoint CTYX images. The code checks for a suspicious file and then automatically goes to a mode that corrects for this issue ('use MP as Z')