The uploaded file (test_T17_XY9_Z1.nd2) contains 17 time points, 9 series (X/Y points), and a single z-slice per point. The file opens properly using Fiji/Bioformats; however, bfconvert fails when converting to both .tiff and .ome.tiff:
Converting to .tiff (bfconvert -series 0 test_T17_XY9_Z1.nd2 tmp1.tiff) gives the correct number of time points (17), but the image data is corrupted.
Converting to .ome.tiff (bfconvert -series 0 test_T17_XY9_Z1.nd2 tmp1.ome.tiff) gives correct image data, but the final time point fails to load (16 instead of 17 time points).
Please advise on how both conversion issue can be resolved. Thank you.
PS: The same problem occurs for images with a single time point and multiple z-slices (i.e., conversion to .tiff produces a file with the correct number of slices but corrupted data, and conversion to .ome.tiff produces a file with uncorrupted pixels but missing one slice in the z-stack).
PPS: For another file having 6 timepoints, 14 series, and 31 z-points (test_T6_XY14_Z31.nd2, added to the upload queue), the following behavior is observed:
$ for ext in tiff ome.tiff; do bfconvert -series 0 -timepoint 0 test_T6_XY14_Z31.nd2 test_XY0_T0_Z31.${ext}; done
test_XY0_T0_Z31.tiff (corrupted data, correct number of fields, as above)
test_XY0_T0_Z31.ome.tiff (uncorrupted data, incorrect number of fields, as above)
$ for ext in tiff ome.tiff; do bfconvert -series 0 -z 0 test_T6_XY14_Z31.nd2 test_XY0_T6_Z0.${ext}; done
test_XY0_T6_Z0.tiff (conversion fails because of an invalid index; see below for exception)
test_XY0_T6_Z0.ome.tiff (conversion fails because of an invalid index; see below for exception)
Exception in thread "main" java.lang.IllegalArgumentException: Invalid image index: 31/6
at loci.formats.FormatTools.getZCTCoords(FormatTools.java:641)
at loci.formats.FormatTools.getFilename(FormatTools.java:1124)
at loci.formats.FormatTools.getFilename(FormatTools.java:1101)
at loci.formats.tools.ImageConverter.testConvert(ImageConverter.java:537)
at loci.formats.tools.ImageConverter.main(ImageConverter.java:880)