How to Save my results and Add a comment??

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

How to Save my results and Add a comment??

NatashaW
Dear all,

I need your help please, I spent a long time trying to solve this small problem!!
I want to add my comments to the result window and save it as .xls
I have some cells in my image and I want to count a small fluorescent objects inside every cell.
I want to add a comment for every group of results, for example:
Image1:
            Nuclei1:
            ( my analyze particles results)
            Nuclei2:
            ( my analyze particles results)
Image2:
            .............
I couldn't do that by using setResult("Label", nResults, "+Nuclei1") because it sets only the name of my row to "Nuclei1" and remove the real result without adding a new row or when I try to add "Image1" at first by using the same instruction it gives me a wrong number of results!!
Is there any other instruction? or something I missed it?

Thank you so much..
Reply | Threaded
Open this post in threaded view
|

Re: How to Save my results and Add a comment??

Rasband, Wayne (NIH/NIMH) [E]
On May 11, 2010, at 5:02 PM, NatashaW wrote:

> Dear all,
>
> I need your help please, I spent a long time trying to solve this small
> problem!!
> I want to add my comments to the result window and save it as .xls
> I have some cells in my image and I want to count a small fluorescent
> objects inside every cell.
> I want to add a comment for every group of results, for example:
> Image1:
>            Nuclei1:
>            ( my analyze particles results)
>            Nuclei2:
>            ( my analyze particles results)
> Image2:
>            .............
> I couldn't do that by using setResult("Label", nResults, "+Nuclei1") because
> it sets only the name of my row to "Nuclei1" and remove the real result
> without adding a new row or when I try to add "Image1" at first by using the
> same instruction it gives me a wrong number of results!!
> Is there any other instruction? or something I missed it?

You can't easily add rows to the Results table but you can add a comment to any row by using the

    setResult("Label", rowIndex, "comment")

macro function. Here is an example that creates a Results table and adds comments to the 1st, 6th and last rows.

   run("Blobs (25K)");
   setAutoThreshold("Default");
   run("Analyze Particles...", "display clear");
   setResult("Label", 0, "Row 1 comment ");
   setResult("Label", 5, "Row 6 commant");
   setResult("Label", nResults-1, "Last row commant");
   updateResults;

Note that the second argument of setResult() is the row index, which is one less than the row number. Also note that you have to call updateResults to display the updated table.

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

Re: How to Save my results and Add a comment??

NatashaW
Thank you so much .. But can I copy my results (maybe copy array or .. ) to another file and order them as I explained before? I want to put all my results ordered in the same file (automatically)?
Thank you