Login  Register

Re: measure2

Posted by Justin McGrath on Sep 29, 2008; 5:22pm
URL: http://imagej.273.s1.nabble.com/measure2-tp3694944p3694945.html

Hi Johannes,
nResults is the number of rows in the results table, but getResults()
requires the index of the row, starting at 0.  Therefore you need to
use nResults - 1 to get the last result.  Also, I believe the column
heading for Integrated Density is IntDen, not IntDent.  The following
should work.

          run("Measure");

             a= getResult("IntDen", nResults - 1);
             print (a);

Justin

On Mon, Sep 29, 2008 at 11:14 AM, Johannes Breu <[hidden email]> wrote:

> Hi,
>
> in order to get values out of a result table I tried:
>
>
>             run("Measure");
>
>              a= getResult("IntDent", nResults);
>              print (a);
>
> I always get an error message:
>
> Row (1) out of range in line 40.
> a= getResult("IntDent", nResults<)>;
>
> I do not find the error.
>
> Thanks
>