-
Notifications
You must be signed in to change notification settings - Fork 30
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
Cannot open certain stitched .nd2 files from Elements #31
Comments
Same problem for me. Any updates? As an alternative, |
Hi Ruben (@rbnvrw ),
metadata:
Dimension:
What I found in def _get_raw_image_data(self, image_group_number, channel_offset, height, width):
[...]
image_group_data[image_data_start::number_of_true_channels] the slicing is good for the first 5(channels) x 1019 pixels then there is an extra 0 that is added to the data that need to be removed, I added a very crude: unwanted = []
for i in range(5099, 5192828, 5095):
unwanted.append(i)
for ele in unwanted:
del image_group_data[ele] 5099 is 1019x5+4(image_data_start), 5192828 is the length of image_group_data and 5095 is 1019x5. Obviously it was just me trying to figure out what was wrong. |
Thank you for the addition Cedric. @bioimage-analysis @ColinDTaylor @aaristov could you maybe all add a link to a sample ND2 file that I can download? |
Hey @rbnvrw, mine is the sample_data from: |
…ed-images Removed empty bytes at channel subchunk ends for issue #31
The fix seems to break things for 3D multi-channel images... I am looking into it. |
@ggirelli OK thank you. please keep us posted. Does it happen for images with (x,y,z,c) channels only or also (x,y,z,t) or (x,y,c,t) images for example? |
@rbnvrw sorry, I am back after a short break after submitting my thesis :) |
@ggirelli congratulations on submitting your thesis! do you have time to test this now? :-) |
Hi @rbnvrw , thanks and sorry, it's been crazy a crazy period before/after the defense :) |
@rbnvrw better late than ever, I just tested it on my files. All good on my end 😄 🎉 🎆 |
Hi guys! So I hate to ruin the good mood but I am running into a similar issue. I'll copy-paste it here it for convenience and it's completely fine for me to share the file (36.6 MB) if you can help me. I saw you might want the metadata from NIS Viewer, I'll see if I can locate it. Interestingly it is only one of the two channels that has the issue (so I can use
|
UpdateI'm getting the same error for any image I have taken where I am using more than one channel. So possibly this merits a separate issue as I can reproduce it even when I have non-stitched images. For every image I test on from my most recent dataset, |
Hello Ruben,
I am having an issue that I noticed had come up some time in the past but was never fully resolved (in #6). When trying to open certain .nd2 files using nd2Reader I get the error:
ValueError: cannot reshape array of size 45686334 into shape (6759,6759)
This happens only on certain images from this run, and I can't seem to find any way to predict which images will open alright and which will not. We recently changed the stitching in Elements to overlap slightly more than it used to, and maybe that has some connection to this problem cropping up again?
Here is the object info:
<FramesSequenceND> Axes: 4 Axis 'x' size: 6759 Axis 'y' size: 6759 Axis 'c' size: 3 Axis 't' size: 1 Pixel Datatype: <class 'numpy.float64'>
bundle_axes:
['y', 'x']
iter_axes:
['c']
metadata:
{'height': 6759, 'width': 6759, 'date': datetime.datetime(2019, 10, 29, 13, 0, 1), 'fields_of_view': [0], 'frames': [0], 'z_levels': [], 'z_coordinates': [5246.4125], 'total_images_per_channel': 1, 'channels': ['Hoechst', 'AF488', 'AF555'], 'pixel_microns': 0.648678997775168, 'num_frames': 1, 'experiment': {'description': 'unknown', 'loops': []}, 'events': []}
Here is a traceback:
The text was updated successfully, but these errors were encountered: