Re: bar graphs
Posted by
Gabriel Landini on
Aug 28, 2008; 8:20am
URL: http://imagej.273.s1.nabble.com/bar-graphs-tp3695266p3695271.html
On Wednesday 27 August 2008, Ben G wrote:
> I have a (hopefully) related question, so here goes:
>
> I am trying to learn how to call the Analyze/Distribution commands from
> inside a macro.
> I am going through a stack of images with the measure command, which
> generates a Results window.
>
> I then execute the Analyze/Distribution command which takes the list in the
> Results window and displays a histogram of values in a Mean Distribution
> window. Clicking on the List command shows a second window named Mean
> Distribution with bins and counts. I need the second number in the "bin
> start" column to use as a threshold in other calculations.
>
> So far, I have figured out how use run("...) commands to get all the way to
> showing the first Mean Distribution window, but I can't get it to show the
> List Window, or get any values out of the list.
>
> I tried recording a macro and walking through the steps, but it doesn't
> record the commands either. So far, the record function is the only
> systematic way I have of finding internal commands. Otherwise I just have
> to trip over them in other example macros.
>
> I would appreciate any help.
I do not think that there is a way to simulate pressing the "List" button to
then save the contents of the 2nd table, but you can have a look at the
/source/ij/plugin/Distribution.java where all the distribution calculations
are done and reimplement it in your macro.
Wayne mentioned recently the need of a Plot.getValues(xvalues, yvalues) macro
command, but as far as I know that is not implemented yet.
G.