Macro

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

Macro

Gib Bogle
This is a very basic question.  When I run a method in a macro, how do I
access the results?
The specific example I'm interested in is Measure.  If I do this:

run("Measure");

a Results window pops up with columns Label, Area, Mean, StdDev, Min,
Max.  I want to get at these result values in the macro, i.e. I want to
be able to do something like

intensity = Results.Mean;

The other thing I'd like to do is suppress the Results window display.  
Basic information of this sort must be obtainable from the various macro
examples, but I looked at quite a few without success.  Is there a
central resource for programming info of this kind?

Thanks very much
Gib
Reply | Threaded
Open this post in threaded view
|

Re: Macro

Gluender
Dear Gib Bogle,

I doubt your efforts because the ImagJ docs come with a section
dealing with the macro language and its "Built-in Macro Functions".

There you may find the macro calls "getRawStatistics(...)",
"getStatistics(...)", getHistogram(...) and many other calls of
relevant routines.

>This is a very basic question.  When I run a method in a macro, how
>do I access the results?
>The specific example I'm interested in is Measure.  If I do this:
>
>run("Measure");
>
>a Results window pops up with columns Label, Area, Mean, StdDev,
>Min, Max.  I want to get at these result values in the macro, i.e. I
>want to be able to do something like
>
>intensity = Results.Mean;
>
>The other thing I'd like to do is suppress the Results window
>display.  Basic information of this sort must be obtainable from the
>various macro examples, but I looked at quite a few without success.
>Is there a central resource for programming info of this kind?
>
>Thanks very much
>Gib

HTH
--


                   Herbie

          ------------------------

          <http://www.gluender.de>
Reply | Threaded
Open this post in threaded view
|

Re: Macro

Robert Baer
> I doubt your efforts because the ImagJ docs come with a section dealing
> with the macro language and its "Built-in Macro Functions".

It is helpful to point out that the "Built-in Functions" portion of the
macro documentation is on a completely separate page
(http://rsb.info.nih.gov/ij/developer/macro/functions.html) from the rest of
the Macro documentation.  To access this valuable resource you must be
smart-enough / lucky-enough to click on the link at the top of the macro
documentation, or the link "built-in" under "User-Defined Functions".

Having a small section in the main macro documentation with its own title
"Built-in Functions" would make this valuable resourse easier to find.  The
section could contain  a sentence or two about using "built-in functions"
and a description of the contents of the "built-in resource page" with the
appropriate link.

Thanks,

Rob