Skip to content
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

Bad reader sizes are parsed. #38

Open
joaomamede opened this issue Jul 6, 2020 · 1 comment
Open

Bad reader sizes are parsed. #38

joaomamede opened this issue Jul 6, 2020 · 1 comment

Comments

@joaomamede
Copy link

Hi,
nd2reader is having trouble reading a file as it finds "Zs" that are not there.

Image was acquired with triggered imaging
1 Z, 120T, 2044 Y, 2048 X, 24 Visit Points.

pims_nd2readerSDK and pims.bioformats read the file fine.
I can share but this file is 20GB.
It did this to 2 files from two different experiments.
I'll try to crop the data to a small XY, if it replicates I'll share.

%matplotlib inline
import pims
from nd2reader import ND2Reader
from pims import ND2_Reader as nd2_sdk


# fname = 'igfp1_caruby5_continue001trigger003.nd2'
fname = '../Data/igfp1_caruby5_VOG002.nd2'
# fname = 'igfp3_caruby3_rutin_bvd_f2_2days_xy02.nd2'
# fname = '/tmp/test.ome.tiff'

frames =  ND2Reader(fname)
frames_sdk = nd2_sdk(fname)
frames_bioformats = pims.bioformats.BioformatsReader(fname)
# frames.iter_axes = 't'  # 't' is the default already.
# frames.bundle_axes = 'zyx'  # when 'z' is available, this will be default

print(frames.sizes)
print(frames_sdk.sizes)
print(frames_bioformats.sizes)

{'x': 2048, 'y': 2044, 'c': 2, 't': 51, 'z': 1224, 'v': 24}
{'x': 2048, 'y': 2044, 'c': 2, 't': 51, 'm': 24}
{'x': 2048, 'y': 2044, 'c': 2, 't': 51}

@rbnvrw
Copy link
Member

rbnvrw commented Apr 23, 2021

Thank you @joaomamede. Could you please test this again with the latest master version? There was a small error in the parsing code that might affect this issue as well (see #50). Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants