<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello,</p>
<p>I could not find any report of this issue online so I have to ask
it here. Thanks in advance for your help.</p>
<p>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. <br>
</p>
<p>Here is an example code:<br>
</p>
<p>[file,path] = uigetfile('*.nd2','Select .nd2 file'); <br>
cd(fileparts(path));<br>
r = bfGetReader(file);<br>
I = bfGetPlane(r, 1);<br>
</p>
<p>which gives, with the file cited above, the following error (same
with ImageJ and Icy which all rely on LOCI) :<br>
</p>
<p><i>Error using bfGetPlane (line 78)</i><i><br>
</i><i>Java exception occurred:</i><i><br>
</i><i>java.lang.NegativeArraySizeException</i><i><br>
</i><i><br>
</i><i> at
loci.formats.in.NativeND2Reader.openBytes(NativeND2Reader.java:298)</i><i><br>
</i><i><br>
</i><i> at
loci.formats.DelegateReader.openBytes(DelegateReader.java:227)</i><i><br>
</i><i><br>
</i><i> at
loci.formats.ImageReader.openBytes(ImageReader.java:457)</i><i><br>
</i><i><br>
</i><i> at
loci.formats.ChannelFiller.openBytes(ChannelFiller.java:156)</i><i><br>
</i><i><br>
</i><i> at
loci.formats.ChannelSeparator.openBytes(ChannelSeparator.java:227)</i><i><br>
</i><i><br>
</i><i> at
loci.formats.ChannelSeparator.openBytes(ChannelSeparator.java:159)</i></p>
<p>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.<br>
<i></i></p>
<p>The onl<i>y way</i> 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.<br>
<i></i></p>
<p>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.<br>
</p>
<p>Thank you very much for your time and your help. I hope I
explained myself clearly.<br>
</p>
<p>Best regards,<br>
</p>
<div class="moz-signature">-- <br>
Guilhem CHENON <br>
LCMD - ESPCI Paris</div>
<div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br /> <table style="border-top: 1px solid #D3D4DE;">
<tr>
<td style="width: 55px; padding-top: 18px;"><a href="http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-green-avg-v1.png" alt="" width="46" height="29" style="width: 46px; height: 29px;" /></a></td>
<td style="width: 470px; padding-top: 17px; color: #41424e; font-size: 13px; font-family: Arial, Helvetica, sans-serif; line-height: 18px;">Garanti sans virus. <a href="http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank" style="color: #4453ea;">www.avg.com</a> </td>
</tr>
</table>
<a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> </a></div></body>
</html>