We're Hiring!

Error "Negative position" reading .AIM files

Historical discussions about the Bio-Formats library. Please look for and ask new questions at https://forum.image.sc/tags/bio-formats
Please note:
Historical discussions about the Bio-Formats library. Please look for and ask new questions at https://forum.image.sc/tags/bio-formats

If you are having trouble with image files, there is information about reporting bugs in the Bio-Formats documentation. Please send us the data and let us know what version of Bio-Formats you are using. For issues with your code, please provide a link to a public repository, ideally GitHub.

Error "Negative position" reading .AIM files

Postby ludo » Thu Sep 18, 2014 2:29 pm

Dear all,

I'm trying to read a .AIM file using bio-formats (v5.0.2) and the function bfopen.m. The file is 2.2GB and contains 1115 slices. The function successfully reads the slices #1 to #1031 (using the function bfGetPlane.m), but give me the error below from slice #1032 to #1115. I uploaded the file on the OMERO.qa plateform
http://qa.openmicroscopy.org.uk/qa/feedback/9541/

Thanks in advance for your help!!

Java exception occurred:
java.lang.IllegalArgumentException: Negative position
at sun.nio.ch.FileChannelImpl.read(Unknown Source)
at loci.common.NIOByteBufferProvider.allocateDirect(NIOByteBufferProvider.java:131)
at loci.common.NIOByteBufferProvider.allocate(NIOByteBufferProvider.java:116)
at loci.common.NIOFileHandle.buffer(NIOFileHandle.java:551)
at loci.common.NIOFileHandle.seek(NIOFileHandle.java:273)
at loci.common.RandomAccessInputStream.seek(RandomAccessInputStream.java:154)
at loci.formats.in.AIMReader.openBytes(AIMReader.java:72)
at loci.formats.ImageReader.openBytes(ImageReader.java:431)
at loci.formats.ChannelFiller.openBytes(ChannelFiller.java:193)
at loci.formats.ChannelSeparator.openBytes(ChannelSeparator.java:222)
at loci.formats.ChannelSeparator.openBytes(ChannelSeparator.java:155)
ludo
 
Posts: 2
Joined: Thu Sep 18, 2014 11:27 am

Re: Error "Negative position" reading .AIM files

Postby mlinkert » Fri Sep 19, 2014 12:29 am

Thank you for reporting this problem, and for uploading the relevant file. A fix for the problem is under review:

https://github.com/openmicroscopy/bioformats/pull/1347

This fix is expected to be included in the 5.1.0 release of Bio-Formats/OMERO.
User avatar
mlinkert
Team Member
 
Posts: 353
Joined: Fri May 29, 2009 2:12 pm
Location: Southwest Wisconsin

Re: Error "Negative position" reading .AIM files

Postby ludo » Fri Sep 19, 2014 10:20 am

Thank you very much for your answer. I downloaded the source code, include the fix you mentioned in your reply, compile the code... and now it works perfectly!
Thanks again!
ludo
 
Posts: 2
Joined: Thu Sep 18, 2014 11:27 am


Return to User Discussion [Legacy]

Who is online

Users browsing this forum: No registered users and 1 guest