Re: More ResultsTable Problems
Posted by
Wayne Rasband on
URL: http://imagej.273.s1.nabble.com/More-ResultsTable-Problems-tp3690519p3690520.html
You can work around this problem by not calling ResultsTable.setHeading
(), for example
ResultsTable rt = new ResultsTable();
rt.incrementCounter();
rt.addValue("A", 0);
rt.addValue("B", 2);
rt.addValue("C", 3);
rt.show("TestResults Table");
or by calling setHeading(), but starting with column 0 instead of
column1
ResultsTable rt = new ResultsTable();
rt.setHeading(0, "A");
rt.setHeading(1, "B");
rt.setHeading(2, "C");
rt.incrementCounter();
rt.addValue("A", 0);
rt.addValue("B", 2);
rt.addValue("C", 3);
rt.show("TestResults Table");
-wayne
On Nov 7, 2009, at 2:16 AM, David William Webster wrote:
> Wayne/All,
>
> There is a problem with ResultsTable for daily build 1.43k8.
> If you run filter show below, you get these tow differing results.
>
> 1.43j
> A B C
> 1 0 2 3
>
> 1.43k8
> A A B C
> 1 0 0 2 3
>
> import ij.plugin.*;
> import ij.measure.ResultsTable;
> public class TestResultsTable implements PlugIn
> {
> public void run(String arg)
> {
> ResultsTable rt = new ResultsTable();
> rt.reset();
> rt.setHeading(1, "A");
> rt.setHeading(2, "B");
> rt.setHeading(3, "C");
> rt.incrementCounter();
> rt.addValue("A", 0);
> rt.addValue("B", 2);
> rt.addValue("C", 3);
> rt.show("TestResults Table");
>
> }
> }
>
> David Webster