Posted by
Michael Schmid on
URL: http://imagej.273.s1.nabble.com/Losing-Metadata-Headers-tp5006962p5007020.html
Hi Daniel,
if you manipulate an image, the metadata (extra items at the top of the image info) are kept as long as it remains the same image.
For operations with more than one image, e.g. Image Calculator, combining stacks, etc., I see no good way to solve your problem: You may have the same or different metadata for the source images, and then it becomes a mess.
One could consider keeping the metadata for operations with only one input image, one by one:
- Duplicate - duplicates the metadata anyhow.
- FFT and Inverse FFT: keeping metadata could be possible, but it would be some effort because FFT adds metadata that have to be removed on Inverse FFT.
- Stack operations such as z project: there it could be added, but I am not sure that it would be good in any case. E.g., a maximum projection is something very different from an original image, and seeing the metadata of image recording might be deceiving for users who might then think that this is essentially an original image.
A related topic that has been discussed on the mailing list previously: Storing all the processing history of an image. That would be a huge effort, considering that the history of all images that are used to create the final output has to be stored as well. Just record a macro while you are duplicating an image, do some operations on it to create a background, and finally subtract the background from the original. Even for simple sequences of operations, the macro code won't be very readable.
I don't think we will ever have this in ImageJ 1.x; I don't know whether it will be accomplished in ImageJ 2.
So far a few thoughts...
Michael
________________________________________________________________
On Mar 20, 2014, at 19:33, J. Daniel Fenn wrote:
> That's true that they are different. But the metadata is still there. When you open a tiff straight from metamorph in Fiji, you can see the XML data in the image info dialogue. The MM data is passed in under the "Image Description" tag.
>
> But when I manipulate the image, it doesn't pass any of that data from one image to the next. I would think that it makes most sense to always copy the current header info and pass it to the subsequent images, regardless of the source of that info.
>
> To test this, I manually added metadata to a blank image (taking Metamorph out of the picture). Still the same result. The manually added metadata still did not get passed to subsequent images.
>
> This seems like a bug to me. I can't envision a situation where passing the header information from image to image would not be beneficial.
>
> I guess for now I can look into how to use a macro to pass the information. I'm not exactly sure how to do that, so if someone could point me in the right direction that would be great. If not I'll see what I can find and ask a new question as needed.
>
> Thanks.
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html