I've been having a number of issues with reading and storing both OME as well as original metadata from a Leica *.lif file. Before posting this entry, I've gone through various threads in this forum, which point out reasons why I'm encountering difficulties... But yet I can't get a clear solution. Such threads I read are:
- Regarding Leica metadata and interpretation of channel LUTs:
viewtopic.php?f=4&t=8432
viewtopic.php?f=13&t=8430
Regarding how to read/write metadata in general:
viewtopic.php?f=13&t=8422
viewtopic.php?f=4&t=8451
And a potential manual tweak:
viewtopic.php?f=13&t=8455
In brief, my goal is: to import a Leica *.lif file, to pick one of the multiple series that it contains, and to store the hyperstack in separate OME-TIFF files in disk - one per time-point, one per channel. For future operations, I'd strongly prefer to have all relevant metadata saved onto each file, too.
Well, I've been programming in Jython, with the aim to stay in Fiji as much as possible. But I've also given a try to Matlab Bio-formats tool. Given the known issues, there were suggestions by contributors of this forum to try 4.4.x versions. Hence, I've experimented with 4.4.8, 4.4.12, 5.9.2 (by the way, the *.jar as automatically downloaded by Fiji differs in size with respect to the one we can download from OME's repository?!). I've observed as follows with a 1024x1024x38x3x1 hyperstack:
- * Fiji, LOCI 4.4.8
- · 1609 original metadata entries (fine);
· Wrong LUTs (should be green-gray-red, but I get purple-gray-blue);
· Physical size X = 1.513672 microns (which I suspect is wrong by a factor of 1023/1024)
· No indication of original metadata in the OME-XML window shown by Fiji
* Fiji, LOCI 4.4.12
- · 1609 original metadata entries;
· Wrong LUTs;
· Wrong physical size X = 1.513672 microns
· No indication of original metadata in the OME-XML
* Fiji, Bio-Formats 5.9.2
- · 376 original metadata entries (wrong, info from channels lost);
· Right LUTs;
· Right physical size X = 1.515152 microns (coincides with what Leica's proprietary software states)
· There is an indication of the presence of original metadata in the OME-XML, with a tag <MetadataOnly/>... but I don't know how to access to it, there seems not to be a query method in the API like getBlaBlaBla()
Furthermore, when I export to *.ome.tif indicating that I want to split by C and by T, then the OME-XML is generated with UUID identification of the other files associated to the hyperstack... But there no longer appear any mention to the tag <MetadataOnly/>, and the original metadata are chopped to the core ones only.
Basically, I am quite confused on how to progress from this point onwards... perhaps with the kind-of-inelegant tweak of the TiffComment functionality?
Sorry for the extremely long post, but I wanted to be precise and couldn't find a more abbreviated way. If useful, I can provide a test example with 3 channels and 1 time-point.
Thank you very much in advance for your assistance!!
Best regards,
Fernando