Login  Register

Metadata woes

Posted by ChrisB14 on Jan 16, 2014; 11:58am
URL: http://imagej.273.s1.nabble.com/Metadata-woes-tp5006141.html

I am having a bit of a problem with TIFF headers/metadata. I am acquiring images using a laser scanning microscope and the acquisition system stores the complete measurement setup as key:value pairs in the metadata. I use this to help set up the further downstream analysis. Recently I started integrating ImageJ (or FIJI) into my workflow for some preliminary data processing (image registration, etc.). When I save the processed tiff, the metadata is lost.

I wrote a quick macro that uses getMetadata() and setMetadata() to copy the header information. To a certain level this appears to work: "Show Info ..." includes the added metadata and when loading the file using BioFormats the metadata is displayed as well. But, when loading it into other analysis software the metadata isn't found. I have looked at the files with hex editor and found that ImageJ creates a first metadata block specifying the ImageJ version that created the file along with some image stats close to the top of the file. The rest of the metadata is stored further downstream, separated from the first block by a binary block.

I suspect the problem is that other software simply takes the first text block as metadata and ignores everything after that. The solution would be to get ImageJ to write all the metadata into a single text block, but I haven't even been able to get access to that first text block from within ImageJ.

I have a feeling this has been solved before, but all the related information I have found on the web over the past few days hasn't brought me a step closer to resolving the problem. If anyone has any suggestions on how solve this, I would be more than grateful.

Best regards, Chris