[ome-users] Bioformats opening ND2 error

Christian Carsten Sachs c.sachs at fz-juelich.de
Fri Dec 5 16:10:20 GMT 2014


Hello Curtis,

I've created the pull request #1461 [ 
https://github.com/openmicroscopy/bioformats/pull/1461 ].
Reading the strings differently does at least for me fix various 
'weirdnesses' in metadata, e.g. a lot of AFieldName = ANextFieldName,
if AFieldName is actually just empty.
Other things which are apparently read wrong (in my test file), get read 
correctly:

sDescription = eRepresentation
...
wsApplicationDesc = wsUserDesc

turns to
sDescription = Brightfield
...
wsApplicationDesc = ND Acquisition

Regards,
Christian Sachs

On 12/05/2014 04:05 PM, Curtis Rueden wrote:
> Hi Christian,
>
> Nice detective work. Would you care to file a pull request with the fix?
>
> Regards,
> Curtis
>
> On Dec 5, 2014 8:41 AM, "Christian Carsten Sachs" <c.sachs at fz-juelich.de
> <mailto:c.sachs at fz-juelich.de>> 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=__21549ddad4b975eb1917b005f9299d__e4
>         <http://qa.openmicroscopy.org.uk/qa/feedback/10380/?token=21549ddad4b975eb1917b005f9299de4>
>         or
>         https://www.dropbox.com/s/__6bok66l3y5xpn7w/271120.nd2?dl=__0
>         <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
>     <mailto:ome-users at lists.openmicroscopy.org.uk>
>     http://lists.openmicroscopy.__org.uk/mailman/listinfo/ome-__users
>     <http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users>
>



More information about the ome-users mailing list