Page 1 of 1

read error after 4GB

PostPosted: Wed Sep 17, 2014 4:14 am
by akatsov
Hello,

I'm using bfGetPlane to read PCORAW files, and it looks like files are read incorrectly when they get above 4GB. It looks as if there is a pointer somewhere that can only take values mod ~4G. Is this a known problem?

I'm running bfmatlab v. 5.0.4, Matlab 2014a, and
Java Version: Java 1.7.0_11-b21 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode

The simplest code to reproduce the error is:

reader = bfGetReader(pcorawfile);
omeMeta = reader.getMetadataStore();
nframes = omeMeta.getPixelsSizeT(0).getValue();
for i=1:nframes
thisframe = bfGetPlane(reader, i);
% check thisframe
end;

I uploaded a tiff stack of frames returned by bfGetPlane that includes frames read correctly and incorrectly. The error happens after frame 5257 in the original file; I am uploading frames 5001 to 5500 as one stack. The error is easy to see by looking at the embedded timestamp, which includes image number. The timestamp should be in the upper left corner, but jumps elsewhere in the image after the read error and returns after frame 5257 again to frame #2 instead of going to the correct #5258.

Thanks,

Alex

Re: read error after 4GB

PostPosted: Wed Sep 17, 2014 4:53 pm
by bramalingam
Hi,

Thank you for reporting your bug.

Testing the file locally with both bioformats and imread(matlab), showed that the issue persists in both cases.
Could you please let us know if the acquisition software reads the file properly?

In case there is no acquisition software, we might need the raw file (completely) to troubleshoot the issue in better detail. Since the file is greater than 4gb, we will share the FTP details over a private email (if it comes down to sharing the file).

Best,
Balaji

Re: read error after 4GB

PostPosted: Wed Sep 17, 2014 6:20 pm
by akatsov
hi,

yes, the acquisition software reads the file properly. i'll upload two properly read frames from the sequence, #5257-5258. This is where the error happens when using bfGetPlane(). the properly read frames were generated by converting the original PCORAW file using a converter provided with the acquisition software.

i'd be happy to upload the original file if necessary.

thanks,

alex

Re: read error after 4GB

PostPosted: Thu Sep 18, 2014 1:50 am
by mlinkert
Hi Alex,

Thank you for clarifying that the acquisition software reads the file correctly. This is certainly a problem in reading the original file, so there is no need to upload additional converted frames.

I have sent FTP information for uploading the original PCORAW file via private message. If you have any trouble connecting, please let me know.

-Melissa

Re: read error after 4GB

PostPosted: Fri Sep 19, 2014 11:51 pm
by mlinkert
Hi Alex,

Thank you for uploading the problematic file. We now have a fix for this problem under review:

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

I would expect this to be included in the 5.1.0 release of Bio-Formats/OMERO.

-Melissa

Re: read error after 4GB

PostPosted: Mon Sep 22, 2014 8:34 pm
by akatsov
Melissa --

Thank you very much for the quick fix. What's the easiest way for me to try the updated reader? I'm a bit wary of trying to re-compile the entire 5.0.4 package myself. Is 5.1 expected out soon?

Thanks,

Alex

Re: read error after 4GB

PostPosted: Mon Sep 22, 2014 9:53 pm
by mlinkert
Hi Alex,

We're not expecting to release 5.1.0 until later in the year, so for now the easiest way to try it is by downloading the current 5.1 development build:

http://ci.openmicroscopy.org/view/Bio-F ... artifacts/

There have been some API changes between 5.0.4 and the 5.1 development builds, primarily with respect to retrieving metadata values. If you encounter any problems, please let us know.

-Melissa