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

wrong number of z plane / time points #46

Open
jboulanger opened this issue Feb 10, 2021 · 2 comments
Open

wrong number of z plane / time points #46

jboulanger opened this issue Feb 10, 2021 · 2 comments

Comments

@jboulanger
Copy link

Hello,
I might be missing something but a file with 1419 images planes as a 2D time sequence is decoded as an image with 1419 z planes and 1419 time points.

from nd2reader import ND2Reader

with ND2Reader('../data/example.nd2') as images:
  print('Image size:', images.sizes)
  print("Number of images: ", len(images))

gives:

Image size: {'x': 512, 'y': 512, 't': 1419, 'z': 1419}
Number of images: 1419

The iter axe is also misidentify as being z instead of t..

from nd2reader import ND2Reader

with ND2Reader('../data/example.nd2') as images:
    images.iter_axes = 'z' # instead  of 't'
    plt.imshow(images[3])
@rbnvrw
Copy link
Member

rbnvrw commented Mar 15, 2021

Thank you for your report @jboulanger. The iter_axes attribute is something you can change yourself to determine over which axes to iterate, see this documentation: http://soft-matter.github.io/pims/v0.5/multidimensional.html

The size issue is a bit more challenging. Can you post a screenshot of what it is supposed to be in the ND2 software?

@jboulanger
Copy link
Author

Thank you for looking into this.

I agree it is possible to change the iter_axes but still one would expect to have to use 't' for a time sequence and 'z' for a 3D image stack.

Here are screenshot of the image window in NIS Elements:

image

And here is the field in 'Description' field of the image properties:

Metadata:
Dimensions: T(1419)
Camera Name: Flash4.0, SN:100266
Numerical Aperture: 0.75
Refractive Index: 1
Name: DIC Camera
Component Count: 1
Modality: Brightfield
Camera Settings: Exposure: 3 ms
Binning: 1x1
Scan Mode: Fast
Microscope Settings: Microscope: Ti2 Microscope
DIC Prism, position: In
Bertrand Lens, position: Out
Nikon Ti2, FilterChanger(Turret-Lo): 1 (GFP-L)
Nikon Ti2, Shutter(FL-Lo): Opened
Nikon Ti2, Shutter(DIA LED): Active
Nikon Ti2, Illuminator(DIA): On
Nikon Ti2, Illuminator(DIA) Iris intensity: 84.2
LightPath: L100
Analyzer Slider: Extracted
PFS, state: Off
PFS, offset: 8838
PFS, mirror: Inserted
PFS, Dish Type: Glass
Zoom: 1.50x
Sutter Lambda 10-3, FilterChanger(Filter C): 8 (Analyser)
Sutter Lambda 10-3, Shutter(DIA): Opened
Sutter Lambda 10-3, Shutter(DIA) mode: Fast
Spectra/AuraII, Shutter(NIJI): Closed
Spectra/AuraII, MultiLaser(Spectra):
Line:1; ExW:395; Power: 25.0; Off
Line:2; ExW:445; Power: 10.0; Off
Line:3; ExW:470; Power: 14.0; Off
Line:4; ExW:510; Power: 12.0; Off
Line:5; ExW:550; Power: 10.0; Off
Line:6; ExW:635; Power: 10.0; Off

Time Loop: 1419

  • Equidistant (Duration 5 s)

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