Login  Register

Re: TIFF Image Timestamp (capture time)

Posted by Michael Miller on Dec 16, 2006; 9:29am
URL: http://imagej.273.s1.nabble.com/TIFF-Image-Timestamp-capture-time-tp3700783p3700791.html

Hello,

When hacking away at the ImageJ, here is a great resource in general:
http://rsb.info.nih.gov/ij/developer/index.html

More specifically for your case, you want the Build-in Macro Functions:

Here's it's documentation:
http://rsb.info.nih.gov/ij/developer/macro/functions.html#getMetadata

You can use the macro command: (also on that page)
showMessage("title", "message")
Displays "message" in a dialog box using "title" as the the dialog box
title.
{(Note to whom maintains the macro list, Wayne? :
http://rsb.info.nih.gov/ij/developer/macro/functions.html#showMessage 
doesn't seem to work, and it could be neat if it did, even if it doesn't
necessarily have a related link. Ie, for all the macro functions?, #S does,
and maybe that's good enough...)}

So, as an actual physical example I believe something like:
myMetaData = getMetaData();
showMessage("The MetaData", myMetaData);
Would be at least a first try. Run something like this on an already open,
active image.

Once you see the format of the string (and whether or not your desired info
is actually in there), you can use a command like indexOf (and/or it's
related) to pull out what you need.
http://rsb.info.nih.gov/ij/developer/macro/functions.html#indexOf

Now, getting way too fancy, depending on how you want the data you can push
it all out into a results table:
http://rsb.info.nih.gov/ij/developer/macro/functions.html#setResult

But I'm going to stop there, because we don't even have it confirmed yet
that your metadata contains their original times :-)

----- Original Message -----
From: "austincb" <[hidden email]>
To: <[hidden email]>
Sent: Saturday, December 16, 2006 1:18 AM
Subject: Re: TIFF Image Timestamp (capture time)


> Weird... I don't seem to have it (or I can't find it).