Re: [micro-manager-general] Timestamp in MM stacks
Status: Beta
Brought to you by:
nicost
|
From: Cammer, M. <Mic...@me...> - 2011-06-21 17:42:31
|
I sent a reply to this but haven't seen it posted, so I'll write again-- apologies if it is a repeat.
Each image has a lot of metadata stored in it such as devices, filters, etc. This includes time. Here is a macro I wrote over the weekend for our use to get the times out. Later we will modify this to reassign the metadata for saving in ImageJ. If you put tabs in ("/t"), then Excel will parse into separate columns.
The protocol is in ImageJ:
import the images to a stack
run this macro
/Macro by Michael Cammer mic...@me...
//=================================================================================
macro "get times from Olympus MM1.4 images" {
requires('1.45j');
print("");
print(getTitle);
for (slice=1; slice <= nSlices(); slice++) {
setSlice(slice);
a = getImageInfo();
b = split(a);
for(i=0; i<b.length; i++){
if (startsWith(b[i], '"ElapsedTime-ms"')) {
b[i+1] = replace(b[i+1], ",", "");
if (slice>1)
print(getSliceNumber(), b[i], parseInt(b[i+1])/1000, "sec", (parseInt(b[i+1])-previoustime)/1000, "sec");
else
print(getSliceNumber(), b[i], parseInt(b[i+1])/1000, "sec");
previoustime = parseInt(b[i+1]);
} // if
} // for i
} // for slice
selectWindow("Log");
} // macro get times
------------------------------------------------------------
This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email.
=================================
|