-
Notifications
You must be signed in to change notification settings - Fork 242
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
Imspector MSR: NumberFormatException when parsing timepoints #4139
Comments
This issue has been mentioned on Image.sc Forum. There might be relevant details there: |
I was able to re-produce the issue with the test image in Fiji. In Eclipse, I modified the code in https://github.com/ome/bioformats/blob/develop/components/formats-gpl/src/loci/formats/in/ImspectorReader.java The changes are below. The variable valueType was 9 during the error so I moved the case 9 statement down to the section that does readInt(). Line 316:
With the code change the error did go away and I got the Image below. Not sure if this image is correct Not sure if this is the right fix. Not sure what else this might break. Just thought I'd share this info. :) |
Referring to the original code, "Time Time Resolution" is the value of variable key when the exception occurs at line 429. The exception occurs because it is doing a readInt() but was parsed using readFloat() at line 330. Note the string "2.8E-43" in the stack trace exception. In Eclipse I made some changes to only have the logic changed for when variable valueType is 9 and key is “Time Time Resolution”. Starting back from the original version of ImpsectorReader.java, I just added an if statement to do readInt() when key is “Time Time Resolution” for case 9.
The results are the same as before. No exception |
Thanks @scuniff for the testing, if you are happy that solution is working then do you want to open it as a PR and we can test it against our repository of sample files? |
This issue was raised on Imagesc thread https://forum.image.sc/t/msr-files-in-bio-formats/90582 and a sample file was provided at https://zenodo.org/records/10476252?token=eyJhbGciOiJIUzUxMiJ9.eyJpZCI6IjQ1ODRiNjkwLWExNTUtNGJlZS1hYjJhLTNjOTgzZWRiNmUwZCIsImRhdGEiOnt9LCJyYW5kb20iOiJhZjI1M2JjZDc4Y2Q5ZjE0MzhiMTZhOWQwMWRkYWQ2ZiJ9.Xz8eb6cxS-jWu5GvAnYEqkKlFzjLNoYYc3bI3mjtci7tinEdRZIvj8CjTyHqTNJj1waBVpaNJZvK8IvN0y3Y0g
Using the provided sample file the issue can be reproduced with Bio-Formats 7.1.0
The stack trace for the exception is as below:
The text was updated successfully, but these errors were encountered: