Upon reading a .lif file using the Bio-formats importer, I get the error
Caused by: org.xml.sax.SAXParseException; lineNumber: 17; columnNumber: 266; Element type “Image” must be followed by either attribute specifications, “>” or “/>”.
The file headers are written in twobyte characters (0x0061 for ‘a’) and have CRLF line endings.
By using terminal command “head -n 20 >>newfile.txt” the header was separated from the rest of the file, so it could be inspected by a text editor. Neither at byte position 266 nor at 532 (counting two bytes per char) of line 17, nor at these positions at line 34 (correcting for 0x0D0A appearing as double line feed in the text editor), a “>” or “/>” is mandatory, as far as I can see, as in all four positions are running strings.
It is not always a problem to import; some lif files CAN be read, some ‘impossible’ lif files can be read after, using LASX, removing some files from within the project.
Unfortunately, I cannot automatically skip this file, as my ImageJ1 macro just crashes. Is it possible to call a function that returns the success of the attempt, rather than just crash?