http://imagej.273.s1.nabble.com/Result-table-in-plugin-tp5012789p5012829.html
>> On May 8, 2015, at 8:38 PM, Nicolas Brouilly <
[hidden email]> wrote:
>>
>> Dear all,
>>
>> I want to use the Image CorrelationJ plugin within a macro and retrieve some data from the result table at each cycle of a "for" loop. But, nResults gives a value of 0 and getResults("Slope", 1) brings up the following error message:
>> "Results" table empty in line 30
>>
>> The results table popping up is named "Image correlation. local region size = 4 pixels"
>>
>> I tried to select the window from the macro, it works. It tried to rename it, it does not.
>>
>> What do I do wrong ?
>
> In the latest ImageJ daily build (1.49t19), the getResult() macro function works with the tables created by the Image CorrelationJ plugin and other plugins that create tables that are not named “Results”. You will need to use getValue("results.count") to get the size of the table since nResults() always returns the size of the “Results” table. Here is an example:
>
> selectWindow("Image correlation. Local region size = 3 pixels");
> n = getValue("results.count");
> for (i=0; i<n; i++) {
> selectWindow("Image correlation. Local region size = 3 pixels");
> source = getResultString("Source", i);
> r = getResult("R", i);
> r2 = getResult("R2", i);
> slope = getResult("Slope", i);
> c = getResult("C", i);
> print(source, r, r2, slope, c);
> }
>
> -wayne
>
>
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.htmlPfotenhauerstr. 108