Re: Retrieving a string from the results table
Posted by
Rasband, Wayne (NIH/NIMH) [E] on
Apr 26, 2016; 4:40pm
URL: http://imagej.273.s1.nabble.com/menus-are-off-the-screen-tp5016127p5016233.html
> On Apr 26, 2016, at 11:49 AM, MORT Richard <
[hidden email]> wrote:
>
> Hi All,
>
> I'm on IJ 1.50i and cannot retrieve strings form the results table with either getResult("Name", i) or getResultString("Name", i). i thought this was a long resolved bug? Any work arounds?
Please provide a simple test macro that demonstrates the problem. The following macro works as expected.
-wayne
columns = 3;
rows = 4;
run("Clear Results");
// create results table of strings
for (col=1; col<=columns; col++) {
for (row=0; row<rows; row++) {
data = "c"+col+"r"+(row+1);
setResult("C"+col, row, data);
}
}
// retrieve the strings from table
for (col=1; col<=columns; col++) {
for (row=0; row<rows; row++)
print(getResultString("C"+col,row));
}
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html