Print a string to a custom table
Posted by
PEARSON Matthew on
Jun 07, 2014; 5:07pm
URL: http://imagej.273.s1.nabble.com/Print-a-string-to-a-custom-table-tp5008085.html
Hi all,
How can I print a string to rows of a custom made table? When i try to do it, it inputs zeros instead, it works fine for numbers. Also if i used the Results table how do you use getResult() with strings, i keep getting NaN.
Thanks,
Matt
//Create overall results table
title1 = "Overall Results";
title2 = "["+title1+"]";
f = title2;
if (isOpen(title1)) {}
else {
run("Table...", "name="+title2+" width=1800 height=600");
//Table headings
print(f, "\\Headings:Measurement\tName\tDistance");
}
image_name = "1 25.ome.tiff";
Measurement = 0;
Distance = 0;
Name = image_name;
for (i=0; i<nResults(); i++){
Measurement = i+1;
Distance = (getResult("Distance", i));
print(f,(Measurement)+"\t"+(Name)+"\t"+(Distance));
}
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html