[ome-users] Opening of nd2 files with "series" bigger than 2GB

Guilhem Chenon guilhem.chenon at espci.fr
Wed Jan 10 15:56:12 GMT 2018


Hello,

I could not find any report of this issue online so I have to ask it 
here. Thanks in advance for your help.

So I have Bio-formats 5.7.2 installed on both Matlab R2017b with 7000MB 
of Java Heap space (with bfmatlab folder) and ImageJ (with .jar 
package). What I want to do is open an ND2 file (20112x20173 ; 16-bit 
resolution) of 11,2 Gb (12 111 798 272 bytes). It consists of 6 
timepoints each containing 3 channels. So the "time points" (consisting 
of 3 channels and encoded as series by the Nikon Software 
(NIS-Elements)), are each over 2*10^9 bytes.

Here is an example code:

[file,path] = uigetfile('*.nd2','Select .nd2 file');
cd(fileparts(path));
r = bfGetReader(file);
I = bfGetPlane(r, 1);

which gives, with the file cited above, the following error (same with 
ImageJ and Icy which all rely on LOCI) :

/Error using bfGetPlane (line 78)//
//Java exception occurred://
//java.lang.NegativeArraySizeException//
//
//    at 
loci.formats.in.NativeND2Reader.openBytes(NativeND2Reader.java:298)//
//
//    at loci.formats.DelegateReader.openBytes(DelegateReader.java:227)//
//
//    at loci.formats.ImageReader.openBytes(ImageReader.java:457)//
//
//    at loci.formats.ChannelFiller.openBytes(ChannelFiller.java:156)//
//
//    at 
loci.formats.ChannelSeparator.openBytes(ChannelSeparator.java:227)//
//
//    at loci.formats.ChannelSeparator.openBytes(ChannelSeparator.java:159)/

I tried to open this .nd2 with as much as 30Gb of memory in the last 
version of ImageJ with no success, so I does not think it has anything 
to do with available RAM.
//

The onl/y way/ I know to prevent the error is to use "crop on import" 
with Bio-formats plugin in ImageJ. I can open one serie if it's cropped 
to around 18800x18800px because I think it gets under the 2 Gb limit.
//

So what i want to know is if there exist a workaround or do I have to 
crop/bin my files? If requested I can upload the file through FTP.

Thank you very much for your time and your help. I hope I explained 
myself clearly.

Best regards,

-- 
Guilhem CHENON
LCMD - ESPCI Paris


---
Cet email a fait l'objet d'une analyse antivirus par AVG.
http://www.avg.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20180110/527f59db/attachment.html>


More information about the ome-users mailing list