On Mar 6, 2012, at 8:00 AM, Thorsten Sy wrote:
> Hello all,
>
> from a plugin I want to open a tab-delimited file with parameters. Therefore I tried to load it as a resultsTable, but got empty result windows only.
> Probably it is more related to my insufficient java knowledge than to ImageJ, but perhaps you can give me a hint anyway.
>
>
> Here is my code:
>
> String pfad = <path of the file>;
> ResultsTable rt = new ResultsTable();
> try {
> rt.open(pfad);
> } catch (IOException e) {
> IJ.error("Error Read - " + e.toString());
> }
>
> rt.show("Results");
ResultsTable.open() is a static method that returns a ResultsTable, so the code to open and display a results table should be:
String pfad = <path of the file>;
ResultsTable rt = null;
try {
rt = ResultsTable.open(pfad);
} catch (IOException e) {
IJ.error("Error Read - " + e.toString());
}
if (rt!=null)
rt.show("Results");
-wayne