bioformats
bioformats copied to clipboard
HCImage cxd: IllegalArgumentException: -20 must be neither null nor strictly negative
See https://forum.image.sc/t/importing-cxd-files-into-imagej/90085 .
"A cxd file acquired with HCImage version 5.0 is unable to import into imageJ by Bio-formats, while one acquired with version 4.8 is okay. HCImage person suggested that the problem arises due to version 5.0 cxd files having two Z Positions – Position_Z and Position_Z_Fine as attached below. Bio-formats gets confused, resulting in a negative Z count. Additionally, version 5.0 cxd files include additional metadata such as Frame averaging, Confocal scan, and Confocal zoom. These factors might potentially be the cause of the error."
I can confirm, with current bioformats, one sample image is fine:
Checking file format [Compix Simple-PCI]
Initializing reader
PCIReader initializing ../Data00042.cxd
Initialization took 0.124s
...
The other one fails:
Checking file format [Compix Simple-PCI]
Initializing reader
PCIReader initializing ../VASA_PC2FISH1.cxd
Exception in thread "main" java.lang.IllegalArgumentException: -20 must be neither null nor strictly negative.
at ome.xml.model.primitives.NonNegativeInteger.<init>(NonNegativeInteger.java:48)
at ome.xml.model.primitives.PositiveInteger.<init>(PositiveInteger.java:46)
at loci.formats.MetadataTools.populatePixelsOnly(MetadataTools.java:312)
at loci.formats.MetadataTools.populateMetadata(MetadataTools.java:262)
at loci.formats.MetadataTools.populatePixels(MetadataTools.java:151)
at loci.formats.MetadataTools.populatePixels(MetadataTools.java:116)
at loci.formats.in.PCIReader.initFile(PCIReader.java:423)
...
This issue has been mentioned on Image.sc Forum. There might be relevant details there:
https://forum.image.sc/t/importing-cxd-files-into-imagej/90085/4
Tested the provided sample files and have been able to reproduce the same issue with Bio-Formats 7.1.0. The issue does indeed seem to be linked to sizeZ being set to a negative value.
I have copied the sample files for this issue to inbox/imagesc-90085
This issue has been mentioned on Image.sc Forum. There might be relevant details there:
https://forum.image.sc/t/importing-cxd-files-into-imagej/90085/5