[ome-users] ND2 opening issue in MATLAB

Melissa Linkert melissa at glencoesoftware.com
Thu Dec 20 21:46:29 GMT 2012


Hi Dan,

> Thanks for your response.  I updated the plugin to the trunk build as you suggested, but unfortunately I'm still getting the same error message (copied below).  I also tried the stable version (4.4.5), with the same result.

Thank you for the update, and for sending a file privately.  I can now
duplicate the error message that you are seeing, and have added a fix
that will be reviewed for inclusion in the next version of Bio-Formats:

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

Regards,
-Melissa

On Thu, Dec 20, 2012 at 06:46:55PM +0000, Daniel Dickinson wrote:
> Hi Melissa,
> 
> Thanks for your response.  I updated the plugin to the trunk build as you suggested, but unfortunately I'm still getting the same error message (copied below).  I also tried the stable version (4.4.5), with the same result.
> 
> Not sure if this helps, but I noticed that after downloading the new version, I had to use javaaddclasspath to add the folder where loci_tools.jar was located - otherwise I got a "command not found" error when calling any LOCI function.
> 
> Thanks again for any help you can offer.
> -Dan Dickinson
> 
> Error message after upgrading to 4.5-DEV:
> 
> ??? Java exception occurred:
> java.lang.OutOfMemoryError: Java heap space
> at loci.formats.in.NativeND2Reader.iterateIn(NativeND2Reader.java:1488)
> at loci.formats.in.NativeND2Reader.iterateIn(NativeND2Reader.java:1517)
> at loci.formats.in.NativeND2Reader.initFile(NativeND2Reader.java:403)
> at loci.formats.FormatReader.setId(FormatReader.java:1238)
> at loci.formats.DelegateReader.setId(DelegateReader.java:266)
> at loci.formats.ImageReader.setId(ImageReader.java:742)
> at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:552)
> at loci.formats.ChannelFiller.setId(ChannelFiller.java:263)
> at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:552)
> 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);
> 
> Error in ==> spotcount_2color at 34
> imageCell=bfopen([nd2Dir filesep fileList(1).name]);
> 
> 
> On Dec 20, 2012, at 12:42 PM, Melissa Linkert <melissa at glencoesoftware.com<mailto:melissa at glencoesoftware.com>>
>  wrote:
> 
> 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
> 
> 
> 
> ***********************************************
> 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>
> 



More information about the ome-users mailing list