[ome-users] Bioformats opening ND2 error

Curtis Rueden ctrueden at wisc.edu
Fri Dec 5 19:14:25 GMT 2014


Hi Alex,

> I haven't tried the fix reported by Christian Carsten.

I uploaded a build including Christian's changes here:

    http://curtis.imagej.net/2014-12-05-bio-formats-pr-1461/

You can test within ImageJ/Fiji by:
* Replacing the files in jars/bio-formats with the corresponding files
there.
* Replacing the plugins/bio-formats_plugins JAR file with the one there.

Feel free to reply back here, or comment on GitHub (
https://github.com/openmicroscopy/bioformats/pull/1461), with your
experiences.

Regards,
Curtis

On Fri, Dec 5, 2014 at 12:51 PM, Alexandre Cunha <cunha at caltech.edu> wrote:

> We are also having problems with nd2 files either using showinf or fiji.
> The image is loaded, it does not crash, but the colors are partially
> gibberish, i.e., it is if at some point the reader/interpreter skip a byte
> or two and the colors make no sense anymore. We loaded the images with
> Nikon viewer and they are shown correctly. I haven't tried the fix reported
> by Christian Carsten.
>
> I tried two different files acquired in two different Nikon scopes using
> fiji in linux and os x. One image loads OK in os x but the other is all
> pitch black (missed the 12 bits quantization?). Both images are not OK in
> linux. The Bioformat plugins used by fiji are different in the platforms:
>
> linux: 5.0.5-DEV, rev 33b1150, built 10 Nov 2014
> os x: 5.0.2, rev 0c4215a, built 27 May 2014
>
> I also used showinf in linux (Version: 5.0.2, VCS revision: 0c4215a, Build
> date: 27 May 2014) but to no avail. I tried in two linux boxes (ubuntu
> 12.04) and the problem is the same.
>
> I will be happy to share the files if it helps diagnosing the problem.
>
> Best,
> - Alex
>
>
>
> On 12/05/2014 06:41 AM, Christian Carsten Sachs wrote:
>
>> Hello,
>>
>> as I'm no bioformats developer, I cannot push a fix for it, but I've
>> debugged it and I might provide a hint towards a solution to the problem:
>>
>> The metadata parser of the ND2 reader plugin chokes at some string value
>> in the
>> SLxPictureMetadata.sPicturePlanes.sSampleSetting.a0.pCameraSetting dict
>> of the ImageMetadataSeqLV|0 block.
>> (And, not finding the true end of a string, starts to read the wrong
>> data, tries to interpret it, and tries to jump to some location at
>> around 140 TB (from the beginning of the file ;)), where it gets stuck
>> infinitely.)
>>
>> I do not see why such a complex implementation for reading a string was
>> choosen (RandomAccessInputStream.findString). A quick replacement of the
>>
>> case (8): // String
>> ...
>> break;
>>
>> block (within with NativeND2Reader.iterateIn method) e.g.
>>
>> char c = 0;
>> StringBuilder sb = new StringBuilder();
>> while((c = in.readChar()) != 0)
>>    sb.append(c);
>> value = sb.toString();
>>
>> Makes the file readily openable (with apparent metadata O.K.).
>> It should be remarked that strings within nd2 files are just wide
>> strings, and do not need complex parsing.
>>
>> Long technical text short:
>>
>> The file/modus operandi is ok, it looks like a bug in bioformats.
>>
>> Best Regards,
>> Christian Sachs
>>
>> On 12/05/2014 01:57 PM, Peter Saxon wrote:
>>
>>> Hi all,
>>>
>>> A recent experiment has yielded a set of ND2 files which bioformats seem
>>> to be struggling with. They open fine in Nikons own software ('NIS
>>> viewer') which leads me to believe the files are valid and intact.
>>> Samples provided below
>>>
>>> http://qa.openmicroscopy.org.uk/qa/feedback/10380/?token=
>>> 21549ddad4b975eb1917b005f9299de4
>>> or
>>> https://www.dropbox.com/s/6bok66l3y5xpn7w/271120.nd2?dl=0
>>>
>>> The image should be a single frame, 4 x 12bit colour channels, 1392x1040
>>> pixels. I've tried opening it with both the matlab tools (Bioformats
>>> 5.0.6) and icy (also with 5.0.6), using Windows, Java 1.7.0_21. It
>>> causes both to hang, last message displayed is
>>> Parsing block 'ImageCalibra' 0%
>>>
>>> Am I doing something stupid, and/or does anyone know what is causing
>>> these errors?
>>>
>>> Best wishes,
>>>
>>> Peter Saxon
>>>
>>
>>
>> ------------------------------------------------------------
>> ------------------------------------
>> ------------------------------------------------------------
>> ------------------------------------
>> Forschungszentrum Juelich GmbH
>> 52425 Juelich
>> Sitz der Gesellschaft: Juelich
>> Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
>> Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
>> Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender),
>> Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
>> Prof. Dr. Sebastian M. Schmidt
>> ------------------------------------------------------------
>> ------------------------------------
>> ------------------------------------------------------------
>> ------------------------------------
>>
>> _______________________________________________
>> ome-users mailing list
>> ome-users at lists.openmicroscopy.org.uk
>> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users
>>
>>  _______________________________________________
> ome-users mailing list
> ome-users at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20141205/82e0ac16/attachment.html>


More information about the ome-users mailing list