Skip to content

Wrong page indexing for an incomplete dataset #65

@ziw-liu

Description

@ziw-liu

For certain incomplete datasets (mehta-lab/waveorder#263), the current iohub (or waveorder.io) would gather the wrong page number (the first page has page number of 511):

0    /hpc/projects/comp_micro/rawdata/falcon/zebraf...
1                                                  511
2                                                  162
Name: (0, 0, 0, 0), dtype: object

The byte offset is also wrong because MicromanagerOmeTiffReader uses hard-coded magic numbers to determine page offsets:

https://github.com/czbiohub/iohub/blob/0fdca8bad97c8a4c6a1b69e54923c576a7e6b44c/iohub/multipagetiff.py#L122-L142

This results in reading the wrong image for the first frame:

>>> reader.get_image(0,0,0,0).mean()
30643.720915794373

And TiffFile('/path/to/first/image/').asarray()[0].mean() would return average intensity of 194, which is consistent with the MM GUI readout.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions