Skip to content

Bad reader sizes are parsed. #38

Description

@joaomamede

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}

Activity

  1. rbnvrw commented on Apr 23, 2021

    @rbnvrw
    Member

    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

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