<div dir="ltr">Hi Alex,<div><br></div><div>> <span style="font-size:13px">I haven't tried the fix reported by Christian Carsten.</span></div><div><span style="font-size:13px"><br></span></div><div><span style="font-size:13px">I uploaded a build including Christian's changes here:</span></div><div><span style="font-size:13px"><br></span></div><div> <a href="http://curtis.imagej.net/2014-12-05-bio-formats-pr-1461/">http://curtis.imagej.net/2014-12-05-bio-formats-pr-1461/</a><br></div><div><br></div><div>You can test within ImageJ/Fiji by:</div><div>* Replacing the files in jars/bio-formats with the corresponding files there.</div><div>* Replacing the plugins/bio-formats_plugins JAR file with the one there.</div><div><br></div><div>Feel free to reply back here, or comment on GitHub (<a href="https://github.com/openmicroscopy/bioformats/pull/1461">https://github.com/openmicroscopy/bioformats/pull/1461</a>), with your experiences.</div><div><br></div><div>Regards,</div><div>Curtis</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 5, 2014 at 12:51 PM, Alexandre Cunha <span dir="ltr"><<a href="mailto:cunha@caltech.edu" target="_blank">cunha@caltech.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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.<br>
<br>
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:<br>
<br>
linux: 5.0.5-DEV, rev 33b1150, built 10 Nov 2014<br>
os x: 5.0.2, rev 0c4215a, built 27 May 2014<br>
<br>
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.<br>
<br>
I will be happy to share the files if it helps diagnosing the problem.<br>
<br>
Best,<br>
- Alex<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
On 12/05/2014 06:41 AM, Christian Carsten Sachs wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
as I'm no bioformats developer, I cannot push a fix for it, but I've<br>
debugged it and I might provide a hint towards a solution to the problem:<br>
<br>
The metadata parser of the ND2 reader plugin chokes at some string value<br>
in the<br>
SLxPictureMetadata.<u></u>sPicturePlanes.sSampleSetting.<u></u>a0.pCameraSetting dict<br>
of the ImageMetadataSeqLV|0 block.<br>
(And, not finding the true end of a string, starts to read the wrong<br>
data, tries to interpret it, and tries to jump to some location at<br>
around 140 TB (from the beginning of the file ;)), where it gets stuck<br>
infinitely.)<br>
<br>
I do not see why such a complex implementation for reading a string was<br>
choosen (RandomAccessInputStream.<u></u>findString). A quick replacement of the<br>
<br>
case (8): // String<br>
...<br>
break;<br>
<br>
block (within with NativeND2Reader.iterateIn method) e.g.<br>
<br>
char c = 0;<br>
StringBuilder sb = new StringBuilder();<br>
while((c = in.readChar()) != 0)<br>
sb.append(c);<br>
value = sb.toString();<br>
<br>
Makes the file readily openable (with apparent metadata O.K.).<br>
It should be remarked that strings within nd2 files are just wide<br>
strings, and do not need complex parsing.<br>
<br>
Long technical text short:<br>
<br>
The file/modus operandi is ok, it looks like a bug in bioformats.<br>
<br>
Best Regards,<br>
Christian Sachs<br>
<br>
On 12/05/2014 01:57 PM, Peter Saxon wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all,<br>
<br>
A recent experiment has yielded a set of ND2 files which bioformats seem<br>
to be struggling with. They open fine in Nikons own software ('NIS<br>
viewer') which leads me to believe the files are valid and intact.<br>
Samples provided below<br>
<br>
<a href="http://qa.openmicroscopy.org.uk/qa/feedback/10380/?token=21549ddad4b975eb1917b005f9299de4" target="_blank">http://qa.openmicroscopy.org.<u></u>uk/qa/feedback/10380/?token=<u></u>21549ddad4b975eb1917b005f9299d<u></u>e4</a><br>
or<br>
<a href="https://www.dropbox.com/s/6bok66l3y5xpn7w/271120.nd2?dl=0" target="_blank">https://www.dropbox.com/s/<u></u>6bok66l3y5xpn7w/271120.nd2?dl=<u></u>0</a><br>
<br>
The image should be a single frame, 4 x 12bit colour channels, 1392x1040<br>
pixels. I've tried opening it with both the matlab tools (Bioformats<br>
5.0.6) and icy (also with 5.0.6), using Windows, Java 1.7.0_21. It<br>
causes both to hang, last message displayed is<br>
Parsing block 'ImageCalibra' 0%<br>
<br>
Am I doing something stupid, and/or does anyone know what is causing<br>
these errors?<br>
<br>
Best wishes,<br>
<br>
Peter Saxon<br>
</blockquote>
<br>
<br>
------------------------------<u></u>------------------------------<u></u>------------------------------<u></u>------<br>
------------------------------<u></u>------------------------------<u></u>------------------------------<u></u>------<br>
Forschungszentrum Juelich GmbH<br>
52425 Juelich<br>
Sitz der Gesellschaft: Juelich<br>
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498<br>
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher<br>
Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender),<br>
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,<br>
Prof. Dr. Sebastian M. Schmidt<br>
------------------------------<u></u>------------------------------<u></u>------------------------------<u></u>------<br>
------------------------------<u></u>------------------------------<u></u>------------------------------<u></u>------<br>
<br>
______________________________<u></u>_________________<br>
ome-users mailing list<br>
<a href="mailto:ome-users@lists.openmicroscopy.org.uk" target="_blank">ome-users@lists.<u></u>openmicroscopy.org.uk</a><br>
<a href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users" target="_blank">http://lists.openmicroscopy.<u></u>org.uk/mailman/listinfo/ome-<u></u>users</a><br>
<br>
</blockquote>
______________________________<u></u>_________________<br>
ome-users mailing list<br>
<a href="mailto:ome-users@lists.openmicroscopy.org.uk" target="_blank">ome-users@lists.<u></u>openmicroscopy.org.uk</a><br>
<a href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users" target="_blank">http://lists.openmicroscopy.<u></u>org.uk/mailman/listinfo/ome-<u></u>users</a><br>
</div></div></blockquote></div><br></div>