Login  Register

Re: macro help

Posted by Huang, Judy C on Sep 09, 2005; 6:30pm
URL: http://imagej.273.s1.nabble.com/macro-help-tp3704810p3704815.html

Anil,
    This is what I got from one of early discussion regarding to Excel:


path="C:\\....\\.....\\.....\\";
name="file_name";
selectWindow("Results");
run("Excel...", "select...=["+path+name+".xls]");

Or you can look into this:

http://rsb.info.nih.gov/ij/plugins/excel-writer.html

-Judy

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Anil
Bagri
Sent: Friday, September 09, 2005 11:48 AM
To: [hidden email]
Subject: Re: macro help


Hi all,
thanks for the great suggestions.
  I have now gotten the macro to automatically open and count objects
from all images.  I use this macro:

    requires("1.33n");
    dir = getDirectory("Choose a Directory ");
    list = getFileList(dir);
    start = getTime();
    setBatchMode(true); // runs up to 6 times faster
    for (i=0; i<list.length; i++) {
         path = dir+list[i];
         //print(i+"  "+path);
         showProgress(i, list.length);
         open(path);
         setAutoThreshold();
        //run("Threshold...");
        setThreshold(132, 255);
        run("Threshold", "thresholded remaining black");
        run("Analyze Particles...", "minimum=10 maximum=999999 bins=20
        show=Nothing summarize");
         close();
   }
   //print((getTime()-start)/1000);

My question is how do I get it to put the results in an excel file.
I  looked at quite a few macros, but cant identify the commands that
would allow me to do this.
thanks again for all your help.
anil





------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as Banyu) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message.  If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system.
------------------------------------------------------------------------------