[ome-users] Exception trying to open Nikon confocal image with Bio-formats 5.1 (was working with version 5.0)
Pierre Muller
pierre.muller at ics-cnrs.unistra.fr
Tue Apr 21 15:29:51 BST 2015
Each time I try to open a ICS or IDS file generated by
Nikon confocal microscope software
EZ-C1, Silver Version 3.91 build 880,
I get this exception with 5.1 plugin (while 5.0 allows opening of this
file):
(Fiji Is Just) ImageJ 2.0.0-rc-29/1.49q; Java 1.6.0_24 [64-bit]; Windows 7
6.1; 23MB of 6127MB (<1%)
java.lang.NullPointerException
at
loci.plugins.in.ImagePlusReader.constructSliceLabel(ImagePlusReader.java:598
)
at
loci.plugins.in.ImagePlusReader.readPlanes(ImagePlusReader.java:385)
at
loci.plugins.in.ImagePlusReader.readImage(ImagePlusReader.java:277)
at
loci.plugins.in.ImagePlusReader.readImages(ImagePlusReader.java:238)
at
loci.plugins.in.ImagePlusReader.readImages(ImagePlusReader.java:216)
at
loci.plugins.in.ImagePlusReader.openImagePlus(ImagePlusReader.java:111)
at loci.plugins.in.Importer.readPixels(Importer.java:146)
at loci.plugins.in.Importer.run(Importer.java:85)
at loci.plugins.LociImporter.run(LociImporter.java:78)
at ij.IJ.runUserPlugIn(IJ.java:199)
at ij.IJ.runPlugIn(IJ.java:163)
at ij.Executer.runCommand(Executer.java:131)
at ij.Executer.run(Executer.java:64)
at java.lang.Thread.run(Thread.java:662)
I am using FIJI and was not able to compile the plugin to get more detailed
debug information.
But from comparison of 5.0 source and 5.1 source, I suspect that this
change:
@@ -575,9 +575,19 @@ public class ImagePlusReader implements
r.setSeries(series);
final int[] zct = r.getZCTCoords(ndx);
- final int[] subC = r.getChannelDimLengths();
- final String[] subCTypes = r.getChannelDimTypes();
+ final int sizeC = r.getSizeC();
final StringBuffer sb = new StringBuffer();
+
+ int[] subC;
+ String[] subCTypes;
+ Modulo moduloC = r.getModuloC();
+ if (moduloC.length() > 1) {
+ subC = new int[] {r.getSizeC() / moduloC.length(), moduloC.length()};
+ subCTypes = new String[] {moduloC.parentType, moduloC.type};
+ } else {
+ subC = new int[] {r.getSizeC()};
+ subCTypes = new String[] {FormatTools.CHANNEL};
+ }
boolean first = true;
if (cCount > 1) {
if (first) first = false;
else sb.append("; ");
int[] subCPos = FormatTools.rasterToPosition(subC, zct[1]);
for (int i=0; i<subC.length; i++) {
>>>> Line 598 of exception >>>> boolean ch =
subCTypes[i].equals(FormatTools.CHANNEL);
sb.append(ch ? "c" : subCTypes[i]);
sb.append(":");
might be the cause of the exception, if SubCTypes array ends up having less
elements than subC array.
Please add me a CC as I am not subscribed to this mailing list.
I can provide a example file if needed.
Pierre Muller
Institut Charles Sadron
23 rue du Loess
BP 84047
67034 STRASBOURG Cedex 2
tél 33 (0)3 88 41 40 07
email : pierre.muller at ics-cnrs.unistra.fr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20150421/5f25572d/attachment.html>
More information about the ome-users
mailing list