Make a new entry in a new table ImageJ

226 Views Asked by At

Imagej's table will not save the previous entry, rather overwrites the current row with the new info provided from the array's. Is their anyway to allow it to make a new row for every new set of data acquired?

//// Create T
Table.create('Chromataphore Data');
Table.set('PunchID',0,1);
Table.set('Count', 0, b);
Table.set('Total Area', 0, a);

ive tried "setResults()"

1

There are 1 best solutions below

0
Herbie On

The easiest way is to use the default Results table with

setResult("Column", row, value);

In your case the code would look like:

setResult( "PunchID", nResults, 1 );
setResult( "Count", nResults-1, b );
setResult( "Total Area", nResults-1, a );

This ensures that every time you call the above, the data is written to a new table row.