TIFF Image Timestamp (capture time)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

TIFF Image Timestamp (capture time)

austincb
Hi all,

        New to the list!
       
        Assuming the capture device stores timestamp data into the TIFF file,
is it possible to grab it using ImageJ? If so, can somebody point me in
the right direction as to how I'd get to it?

Much appreciated,

-Austin
Reply | Threaded
Open this post in threaded view
|

Re: TIFF Image Timestamp (capture time)

Gabriel Landini
On Friday 15 December 2006 23:58, austincb wrote:
> Assuming the capture device stores timestamp data into the TIFF file,
> is it possible to grab it using ImageJ? If so, can somebody point me in
> the right direction as to how I'd get to it?

I am not sure about this, but perhaps getMetadata() can be useful if the time
stamp is stored in the header of the file.

Cheers,

G.
Reply | Threaded
Open this post in threaded view
|

Re: TIFF Image Timestamp (capture time)

austincb
Thanks!
Sorry for the dumb question, but where is that method located?

-Austin

Gabriel Landini wrote:

> On Friday 15 December 2006 23:58, austincb wrote:
>> Assuming the capture device stores timestamp data into the TIFF file,
>> is it possible to grab it using ImageJ? If so, can somebody point me in
>> the right direction as to how I'd get to it?
>
> I am not sure about this, but perhaps getMetadata() can be useful if the time
> stamp is stored in the header of the file.
>
> Cheers,
>
> G.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: TIFF Image Timestamp (capture time)

Gabriel Landini
On Saturday 16 December 2006 07:04, austincb wrote:
> Thanks!
> Sorry for the dumb question, but where is that method located?

It is a macro function.

G.
Reply | Threaded
Open this post in threaded view
|

Re: TIFF Image Timestamp (capture time)

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

Gabriel Landini wrote:
> On Saturday 16 December 2006 07:04, austincb wrote:
>> Thanks!
>> Sorry for the dumb question, but where is that method located?
>
> It is a macro function.
>
> G.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: TIFF Image Timestamp (capture time)

Michael Miller
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).
Reply | Threaded
Open this post in threaded view
|

Re: TIFF Image Timestamp (capture time)

austincb
Roger --- thanks for the links!

I'm a little confused as to how I access some of these methods.
I don't know what to preface getMetaData(); with. For showMessage, I
have to put IJ. before it (IJ.showMessage("blah");)...
What do I have to do to access getMetaData()?

-Austin

Michael Miller wrote:

> 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).
>
>
Reply | Threaded
Open this post in threaded view
|

Mean value of ROI (OvalRoi)

austincb
In reply to this post by Michael Miller
I've created a specific oval ROI (in code, with specific values) which
I'd like to find the mean value within that area. Rectangles are easy,
but I'm a little lost on how to loop through all the pixels in the
circle and tally the values and number of pixels within the region.

In ImageJ's GUI, if I create an oval ROI with the mouse on the image,
and then select Analyze->Measure from the menu, it gives me the mean
within that oval. That's exactly what I want to do, but I can't find the
code in the source that seems to loop through that oval area.

My dive into the documentation hasn't turned much up, either..

Thanks for any help,

-Austin
Reply | Threaded
Open this post in threaded view
|

Re: Mean value of ROI (OvalRoi)

Wayne Rasband
The Calculate_Mean plugin at

     http://rsb.info.nih.gov/ij/plugins/calculate-mean.html

demonstrates how to tally the values and number of pixels within a
non-rectangular selection.

-wayne

On Dec 16, 2006, at 8:05 PM, austincb wrote:

> I've created a specific oval ROI (in code, with specific values) which
> I'd like to find the mean value within that area. Rectangles are easy,
> but I'm a little lost on how to loop through all the pixels in the
> circle and tally the values and number of pixels within the region.
>
> In ImageJ's GUI, if I create an oval ROI with the mouse on the image,
> and then select Analyze->Measure from the menu, it gives me the mean
> within that oval. That's exactly what I want to do, but I can't find
> the code in the source that seems to loop through that oval area.
>
> My dive into the documentation hasn't turned much up, either..
>
> Thanks for any help,
>
> -Austin
>
Reply | Threaded
Open this post in threaded view
|

Re: TIFF Image Timestamp (capture time)

Wayne Rasband
In reply to this post by austincb
The Bio-Formats plugin at

     http://www.loci.wisc.edu/ome/formats.html

opens many popular microscopy file formats and displays metadata (e.g.,
time-stamp data).

-wayne

On Dec 15, 2006, at 6:58 PM, austincb wrote:

> Hi all,
>
> New to the list!
>
> Assuming the capture device stores timestamp data into the TIFF file,
> is it possible to grab it using ImageJ? If so, can somebody point me
> in the right direction as to how I'd get to it?
>
> Much appreciated,
>
> -Austin
>
Reply | Threaded
Open this post in threaded view
|

Re: TIFF Image Timestamp (capture time)

ctrueden
Hi Austin et al,

I played around with ImageJ's getMetadata function with some TIFFs,
and it didn't seem to return anything for them. So I second Wayne's
suggestion to try Bio-Formats. If it finds the date stamp in your
TIFF, it will display it in a field called "DateTime" in the metadata
window (make sure to check the "Display associated metadata" option).
Unfortunately, there is no easy way (yet) to use a macro to obtain the
results of the Bio-Formats metadata table. But you can copy and paste
it out of there into a text window (Command+A, Command+C, open text
editor, Command+V).

-Curtis

On 12/18/06, Wayne Rasband <[hidden email]> wrote:

> The Bio-Formats plugin at
>
>      http://www.loci.wisc.edu/ome/formats.html
>
> opens many popular microscopy file formats and displays metadata (e.g.,
> time-stamp data).
>
> -wayne
>
> On Dec 15, 2006, at 6:58 PM, austincb wrote:
>
> > Hi all,
> >
> >       New to the list!
> >
> >       Assuming the capture device stores timestamp data into the TIFF file,
> > is it possible to grab it using ImageJ? If so, can somebody point me
> > in the right direction as to how I'd get to it?
> >
> > Much appreciated,
> >
> > -Austin
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: TIFF Image Timestamp (capture time)

Justin McGrath
If you are interested in only extracting the DataTime tag (or whatever
tag), you can use something like this in BASH.

     for i in *.tif ; do echo $i -  `tiffinfo $i | grep DateTime -`  >
myfile.txt ; done

Then you'll have a list in myfile.txt with entries like this.

     IMG_2392.tif - DateTime: 14:53:01 18:12:2006

This would be easily editable with sed or whatnot to massage into the
desired format.  I use something like this to create a spreadsheet of
file names, dates and times and then merge it with another dataset so
if that's your goal, this should work.  tiffinfo is part of libtiff
and you'll need that installed.

Justin


On 12/18/06, Curtis Rueden <[hidden email]> wrote:

> Hi Austin et al,
>
> I played around with ImageJ's getMetadata function with some TIFFs,
> and it didn't seem to return anything for them. So I second Wayne's
> suggestion to try Bio-Formats. If it finds the date stamp in your
> TIFF, it will display it in a field called "DateTime" in the metadata
> window (make sure to check the "Display associated metadata" option).
> Unfortunately, there is no easy way (yet) to use a macro to obtain the
> results of the Bio-Formats metadata table. But you can copy and paste
> it out of there into a text window (Command+A, Command+C, open text
> editor, Command+V).
>
> -Curtis
>
> On 12/18/06, Wayne Rasband <[hidden email]> wrote:
> > The Bio-Formats plugin at
> >
> >      http://www.loci.wisc.edu/ome/formats.html
> >
> > opens many popular microscopy file formats and displays metadata (e.g.,
> > time-stamp data).
> >
> > -wayne
> >
> > On Dec 15, 2006, at 6:58 PM, austincb wrote:
> >
> > > Hi all,
> > >
> > >       New to the list!
> > >
> > >       Assuming the capture device stores timestamp data into the TIFF file,
> > > is it possible to grab it using ImageJ? If so, can somebody point me
> > > in the right direction as to how I'd get to it?
> > >
> > > Much appreciated,
> > >
> > > -Austin
> > >
> >
>