Posted by
rthomas986 on
URL: http://imagej.273.s1.nabble.com/Losing-Metadata-Headers-tp5006962p5007022.html
What you can do it collect the information on the original image before you manipulate it. Then save each of your iterations/manipulations with an updated extension of the original file name.
For example:
ID= getImage();
dir=getDirectory(ID);
name=getTitle;
//now that you have your Metadata secured you can run your operation of interest. I will use duplicate as an example
run("Duplicate...");
index = lastIndexOf(name, ".");
if (index!=-1) name=substring(name,0,index);
name1=name+"_edited1";
saveAs("Tiff", dir+name1);
You can do this after each operation, changing the variable (name1, name2,etc) and the desired extension for the new file name. This way if your original image is "XXX.tiff" then the duplicate will be "XXX_edited1.tiff"
I hope this helps.
Richelle
-----Original Message-----
From: ImageJ Interest Group [mailto:
[hidden email]] On Behalf Of J. Daniel Fenn
Sent: Thursday, March 20, 2014 2:34 PM
To:
[hidden email]
Subject: Re: Losing Metadata/Headers
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.htmlThe information contained in this communication and its attachment(s) is intended only for the use of the individual to whom it is addressed and may contain information that is privileged, confidential, or exempt from disclosure. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify
[hidden email] and delete the communication without retaining any copies. Thank you.
Translations available:
http://www.owenscorning.com/emailfooter.html--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html