Login  Register

Re: convert series of tiff to raw data

Posted by Gluender-3 on Sep 06, 2009; 12:11pm
URL: http://imagej.273.s1.nabble.com/convert-series-of-tiff-to-raw-data-tp3691298p3691303.html

Aviva,

maybe it's time to start learning a bit about IJ-macro coding.
You may have a look at the manual "Built-in Macro Functions"

<http://rsb.info.nih.gov/ij/developer/macro/functions.html>

You may especially be interested in the call:

getMetadata("Info");

>hmm, thanks Wayne, that's pretty cool.
>
>in this case however i think i misled you when i said it was a date -
>i have a time stamp in a header string field
>with file creation time at nano second resolution - is there a way
>of getting at that?
>
>thanks again,
>aviva
>
>On Sun, Sep 6, 2009 at 5:15 AM, Wayne Rasband <[hidden email]> wrote:
>
>>   is it also possible to get at the meta data / header info in the tiff
>>>  images at the same time?
>>>
>>
>  > You can use the Process>Batch>Macro command in v1.43g to convert a folder
>>  of images to another format and get information about the images at the same
>>  time. Paste this macro
>>
>>    path = File.directory+File.name;
>>    date = File.dateLastModified(path);
>>    size = File.length(path);
>>    print(i+", "+getTitle+", "+date+", "+size);
>>
>>  into the Process>Batch>Macro dialog box and information about the images
>>  will be displayed as they are converted. You will need to be running the
>>  1.43g daily build. You can upgrade by using the Help>Update ImageJ command
>>  and selecting "daily build" from the drop down menu.
>>
>>  -wayne
>>
>>
>>
>>  thanks,
>  >> aviva
>>>
>>>  On Sat, Sep 5, 2009 at 8:16 AM, Wayne Rasband <[hidden email]> wrote:
>>>
>>>   Dear all,
>>>>
>>>>>
>>>>>  Do you know how to convert a series of tiff images to raw data file
>>>>>  using imageJ or other software?
>>>>>  3x
>>>>>
>>>>>  Wei
>>>>>
>>>>>
>>>>  You can do this using the Process>Batch>Convert command, available in
>>>>  ImageJ 1.43e or later.
>>>>
>  >>> -wayne

With Wayne's great "Process>Batch>Macro" command you may now modify
the above Wayne's macro code to read:

path=File.directory+File.name;
date=File.dateLastModified(path);
size=File.length(path);
mdat=getMetadata("Info");
print(i+", "+getTitle+", "+date+", "+size+", "+ mdat);

which should do the trick. (At least it does so for me.)

HTH
--

                   Herbie

          ------------------------
          <http://www.gluender.de>