Skip to content

Error reading CIF #65

@mcquin

Description

@mcquin
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)

raises

/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

However, on second access

reader.read(c=0, series=2)

works as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions