<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
Hi, 
<div><br>
</div>
<div>I suspect I may have discovered a bug or memory leak in the LOCI MATLAB toolbox.  I'm using the bfopen.m script to read Nikon ND2 files in MATLAB R2011a on Mac OSX 10.8.  I'm able to read a 63MB ND2 file without any problem.  However, when I attempt to
 read a 120MB file, the program crashes with an "out of memory" error (full text of the error message is below).  However, I don't believe this is an issue of not enough memory being available, because increasing the maximum java heap memory from 256MB to 2GB
 in the MATLAB settings had no effect on the problem.  Also, I am able to read the files successfully using a different script (bfread.m from <a href="https://github.com/prakatmac/bf-tools/wiki/about">https://github.com/prakatmac/bf-tools/wiki/about</a>), though
 it is slower than bfopen.m.  </div>
<div><br>
</div>
<div>Thanks for any suggestions. </div>
<div>-Dan Dickinson </div>
<div><br>
</div>
<div><br>
</div>
<div>
<div>>> imageCell=bfopen(['/Users/danieldickinson/Documents/Postdoc/Data/Exp139/139_mChCtrl nd2/139_mChCtrl_002.nd2']);</div>
<div>??? Java exception occurred:</div>
<div>java.lang.OutOfMemoryError: Java heap space</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at loci.formats.in.NativeND2Reader.iterateIn(NativeND2Reader.java:1486)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at loci.formats.in.NativeND2Reader.iterateIn(NativeND2Reader.java:1515)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at loci.formats.in.NativeND2Reader.initFile(NativeND2Reader.java:403)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at loci.formats.FormatReader.setId(FormatReader.java:1178)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at loci.formats.DelegateReader.setId(DelegateReader.java:259)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at loci.formats.ImageReader.setId(ImageReader.java:727)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:529)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at loci.formats.ChannelFiller.setId(ChannelFiller.java:263)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:529)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at loci.formats.ChannelSeparator.setId(ChannelSeparator.java:274)</div>
<div><br>
</div>
<div>Error in ==> bfGetReader at 57</div>
<div>r.setId(id);</div>
<div>Error in ==> bfopen at 92</div>
<div>r = bfGetReader(id, stitchFiles);</div>
</div>
<div><br>
</div>
<div><br>
<div>
<div>
<div style="font-size: 12px; ">**/.*********************************************</div>
<div style="font-size: 12px; ">Daniel J. Dickinson, Ph.D.</div>
<div style="font-size: 12px; ">Postdoctoral fellow, Goldstein Lab</div>
<div style="font-size: 12px; ">University of North Carolina</div>
<div style="font-size: 12px; ">650-815-1923</div>
<div style="font-size: 12px; "><a href="mailto:ddickins@live.unc.edu">ddickins@live.unc.edu</a></div>
</div>
</div>
<br>
</div>
</body>
</html>