[ome-users] ND2 opening issue in MATLAB
Melissa Linkert
melissa at glencoesoftware.com
Thu Dec 20 17:42:20 GMT 2012
Hi Dan,
> 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 https://github.com/prakatmac/bf-tools/wiki/about), though it is slower than bfopen.m.
Based upon the error message, it looks like bfopen.m was using an older
version of Bio-Formats. The Matlab scripts from here:
https://github.com/prakatmac/bf-tools
will download the latest version of loci_tools.jar and place it in an
'ext' folder, so it's likely that you now have two copies of
loci_tools.jar (one that is an old version and one that is the latest
version).
Could you please try updating the copy of loci_tools.jar that is in your
Matlab work folder? bfUpgradeCheck.m should be able to do this, or you can
manually download loci_tools.jar from:
http://www.openmicroscopy.org/site/products/bio-formats/downloads
The output of 'version = loci.formats.FormatTools.VERSION' should then
be "4.4.5" (if you downloaded the stable version) or "4.5.0-DEV" (if you
downloaded the trunk or daily build).
Regards,
-Melissa
On Thu, Dec 20, 2012 at 03:07:28PM +0000, Daniel Dickinson wrote:
> Hi,
>
> 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 https://github.com/prakatmac/bf-tools/wiki/about), though it is slower than bfopen.m.
>
> Thanks for any suggestions.
> -Dan Dickinson
>
>
> >> imageCell=bfopen(['/Users/danieldickinson/Documents/Postdoc/Data/Exp139/139_mChCtrl nd2/139_mChCtrl_002.nd2']);
> ??? Java exception occurred:
> java.lang.OutOfMemoryError: Java heap space
> at loci.formats.in.NativeND2Reader.iterateIn(NativeND2Reader.java:1486)
> at loci.formats.in.NativeND2Reader.iterateIn(NativeND2Reader.java:1515)
> at loci.formats.in.NativeND2Reader.initFile(NativeND2Reader.java:403)
> at loci.formats.FormatReader.setId(FormatReader.java:1178)
> at loci.formats.DelegateReader.setId(DelegateReader.java:259)
> at loci.formats.ImageReader.setId(ImageReader.java:727)
> at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:529)
> at loci.formats.ChannelFiller.setId(ChannelFiller.java:263)
> at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:529)
> at loci.formats.ChannelSeparator.setId(ChannelSeparator.java:274)
>
> Error in ==> bfGetReader at 57
> r.setId(id);
> Error in ==> bfopen at 92
> r = bfGetReader(id, stitchFiles);
>
>
> **/.*********************************************
> Daniel J. Dickinson, Ph.D.
> Postdoctoral fellow, Goldstein Lab
> University of North Carolina
> 650-815-1923
> ddickins at live.unc.edu<mailto:ddickins at live.unc.edu>
>
> _______________________________________________
> ome-users mailing list
> ome-users at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users
More information about the ome-users
mailing list