Login  Register

Strings in the results table?

Posted by Gabriel Landini on Nov 15, 2007; 3:49pm
URL: http://imagej.273.s1.nabble.com/Strings-in-the-results-table-tp3698000.html

Hi. Does anybody know any tricks to store from a macro, a column of strings in
the results table so then they can be later retrieved with getResult() or
similar?

I do not mean the write() function (which writes to the result window, not the
table), but something like setResult().
Actually one can attempt to set a string using setResult("Column", i), but it
appears in the table as NaN, so obviously it is not loaded.

In a plugin I could use rt.setLabel(label, i) to set a row label, so I could
use this space to store the string, but I cannot find out how to do this  (or
how to retrieve it if it could be set) from a macro...

Could the call() function be used for this? Something like:
call("ij.measure.ResultsTable.setLabel", "test", 4);

Any suggestions?

Regards,

Gabriel