-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong page indexing for an incomplete dataset #65
Comments
This raises a deeper concern about the OME-TIFF reader: the custom byte offset and memory mapping scheme can read any arbitrary bytes and will not give any notice even if the region on the disk does not contain valid array data. |
Since the dataset did not finish acquiring, the micromanager index map may be longer than the actual tiff page list. For example in file
This array has a shape of However there are only 130 pages in the file. Note that is that MM actually preallocates space for the (planned) complete acquisition, so that this incomplete file has the same 4 GB size as if it was a full TIFF file with ~500 pages. |
For certain incomplete datasets (mehta-lab/recOrder#320), the current iohub (or
waveorder.io
) would gather the wrong page number (the first page has page number of 511):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:
And
TiffFile('/path/to/first/image/').asarray()[0].mean()
would return average intensity of 194, which is consistent with the MM GUI readout.The text was updated successfully, but these errors were encountered: