Skip to content, Skip to search

Changes

Tips for developers

598 bytes added, 08:39, 7 January 2011
Using ImageJ effectively: illustrate how to show result tables
}
}
</source>
 
== Show a results table ==
 
First you need to get the results table instance (or create one):
 
<source lang="java">
ResultsTable rt = Analyzer.getResultsTable();
if (rt != null) {
rt = new ResultsTable();
Analyzer.setResultsTable(rt);
}
</source>
 
Then you can add a new row:
 
<source lang="java">
rt.incrementCounter();
</source>
 
... and add entries by column label:
 
<source lang="java">
rt.addValue("slice", slice);
rt.addValue("bratwurst", -1);
</source>
 
'''Finally''' make sure that the result table is displayed/updated:
 
<source lang="java">
rt.show("Results");
</source>
Bureaucrat, incoming, administrator, uploaders
1,924
edits