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

Changed ND2 metadata string handling to work properly with empty strings #1461

Merged
merged 1 commit into from Dec 15, 2014

Conversation

csachs
Copy link
Member

@csachs csachs commented Dec 5, 2014

Hello,

on demand by @ctrueden in reference to mailing list problem 'Bioformats opening ND2 error' by Peter Saxon, here's a patch fixing the file opening problem, which seems due to the reader fetching too many bytes on empty string fields (in metadata), then reading garbage and getting stuck in an infinite loop.

As a positive side effect, this seems to clear away a lot of nonsensical metadata normally present in ND2 files opened with bioformats. I diff'd the results of Fiji's 'Show Info' for a file opened with a DEVELOP version and a patched version, and some nonsensical fields got removed, and some fields got filled with more meaningful values.

I guess there would be a way to get the findString function to work properly, but this 'easy' solution was just too tempting ;)

I only tested it with two files; please check it with your collection of different ND2 files ...

Best regards,
Christian Sachs

@ctrueden
Copy link
Member

ctrueden commented Dec 5, 2014

Thanks, @csachs!

@ctrueden
Copy link
Member

ctrueden commented Dec 5, 2014

For users wanting to test this change (in ImageJ or otherwise), I uploaded a build here:

@sbesson sbesson added the develop label Dec 6, 2014
@melissalinkert
Copy link
Member

Thanks again, @csachs. This looks fine on review; we're just waiting for confirmation that our CI builds continue to pass with this change included. I would expect to be able to merge this in the next day or two.

melissalinkert added a commit that referenced this pull request Dec 15, 2014
Changed ND2 metadata string handling to work properly with empty strings
@melissalinkert melissalinkert merged commit 307fafa into ome:develop Dec 15, 2014
@melissalinkert
Copy link
Member

--no-rebase

@sbesson sbesson added this to the 5.1.0-m3 milestone Dec 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants