These are chat archives for fiji/fiji

8th
Dec 2018
Fokatu
@Fokatu
Dec 08 2018 02:21
How to add metadata that will be shown in the "-- Global Metadata---" part in a customed file format?
Curtis Rueden
@ctrueden
Dec 08 2018 10:09
@Fokatu What do you mean by "customized file format"? Are you writing code? A SCIFIO Format plugin? If so, let's discuss in the scifio/scifio channel. Or if you are looking to write data to an existing but "customized" format such as TIFF, could you please describe what you are trying to do in more detail?
Fokatu
@Fokatu
Dec 08 2018 11:44
i am writting a file format for my use, the structure could be header+data+xml. when openning the image with fiji, i want the xml to be shown in the info dialog.
with scifio
Fokatu
@Fokatu
Dec 08 2018 15:00
@ctrueden , :-)
Curtis Rueden
@ctrueden
Dec 08 2018 19:23
@Fokatu Is this file format something that would be handled already by Bio-Formats or SCIFIO? Or are you planning to code your own Bio-Formats reader or SCIFIO format plugin?
If the format is one handled by Bio-Formats, which format are you thinking? TIFF? Or something else?
If it's a brand new format, you'll need to code a reader... and in that case, you define what gets parsed as what in your reader. The "--Global Metadata--" header is populated by SCIFIO, in case you didn't know. If you read a file with Bio-Formats, that will not be there.
Josh Moore
@joshmoore
Dec 08 2018 21:08
@ctrueden does something need to happen for b-f 'global metadata' to appear?
Curtis Rueden
@ctrueden
Dec 08 2018 21:29
@joshmoore The string --Global Metadata-- is added by some scary machinery in the imagej-legacy project. Here. In my tests, it happened when I opened an image with File > Import > Image... (i.e. via SCIFIO), but was not populated when opening with File > Open or File > Import > Bio-Formats... If you glance at that code link, the reason is pretty clear. Although I did not check what calls that method. Certainly this code is messy and (as the TODO there also says) needs to be restructured / moved at some point.
It might already work that SCIFIO's BioFormatsFormat populates the global and image metadata according to what Bio-Formats reports. I do not have a dataset handy at the moment to verify that theory though.
If what @Fokatu wants is for some information to be shown by ImageJ's "Show Info" command—but not necessarily specifically in the -- Global Metadata -- section generated by that dubious SCIFIO-related code—there are other ways to go. But I'm gonna sleep now. @Fotaku, if you want more information or guidance, I suggest you post on https://forum.image.sc/
Josh Moore
@joshmoore
Dec 08 2018 21:34
Yeah I'm on a phone so not much more I can do now ;) sleep well