import bioformats
import javabridge
filename = "example.cif"
reader = bioformats.formatreader.get_image_reader("example", path=filename)
reader.read(c=0, series=0)
reader.read(c=0, series=2)
/Users/mcquin/code/CellProfiler/python-bioformats/bioformats/formatreader.pyc in read(self, c, z, t, series, index, rescale, wants_max_intensity, channel_names, XYWH)
815 index = self.rdr.getIndex(z,c,t)
816 image = np.frombuffer(openBytes_func(index), dtype)
--> 817 image.shape = (height, width)
818 elif self.rdr.getRGBChannelCount() > 1:
819 n_planes = self.rdr.getRGBChannelCount()
ValueError: total size of new array must be unchanged
works as expected.
raises
However, on second access
works as expected.