Page 1 of 1

Reading .nd2 File Format

PostPosted: Tue Nov 10, 2009 5:25 am
by jleonard.iii
Hi all,

I'm new to Bio Formats and I'm trying to view .nd2 files (Nikon's proprietary format), but whenever I try to import a file it just returns this script/error message:

java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1768)
at loci.formats.in.NativeND2Reader.parseKeyAndValue(NativeND2Reader.java:1174)
at loci.formats.in.NativeND2Reader.access$400(NativeND2Reader.java:63)
at loci.formats.in.NativeND2Reader$ND2Handler.startElement(NativeND2Reader.java:806)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:533)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:220)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:872)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:176)
at loci.common.XMLTools.parseXML(XMLTools.java:277)
at loci.common.XMLTools.parseXML(XMLTools.java:252)
at loci.formats.in.NativeND2Reader.initFile(NativeND2Reader.java:320)
at loci.formats.FormatReader.setId(FormatReader.java:901)
at loci.formats.DelegateReader.setId(DelegateReader.java:176)
at loci.plugins.importer.Importer.run(Importer.java:267)
at loci.plugins.LociImporter.run(LociImporter.java:77)
at ij.IJ.runUserPlugIn(IJ.java:175)
at ij.IJ.runPlugIn(IJ.java:142)
at ij.Executer.runCommand(Executer.java:121)
at ij.Executer.run(Executer.java:58)
at java.lang.Thread.run(Thread.java:613)

I would use Nikon's free viewer software but they don't have a Mac version. Any advice would be appreciated! Thanks!

John

Re: Reading .nd2 File Format

PostPosted: Tue Nov 10, 2009 7:54 pm
by mlinkert
Hi John,

I would recommend that you try to open the file using the latest trunk build of Bio-Formats (http://loci.wisc.edu/ome/formats-download.html).

If the latest trunk build does not open the file, then it would be very helpful if you could send the problematic file. I will send you a private message with our FTP server information, in case you need a place to put the file.

Regards,
-Melissa

Re: Reading .nd2 File Format

PostPosted: Tue Nov 10, 2009 10:12 pm
by jleonard.iii
Hi Melissa,

The latest trunk build opens it perfectly. Thanks for your help!

John