Re: Results count in a separate table

Posted by Cyril Turiès on
URL: http://imagej.273.s1.nabble.com/Results-count-in-a-separate-table-tp5019406p5019413.html

Hi Michael,

Thank you for your solution.
It worked, instead of printing to a new table I had to set the calculations
to the Results table then rename it to keep values and switching from one
table to the other each time the macro is launched.

I added the code below just in case someone has the same issue.

var windowTabName="Data Table", prefix="IMG01", Sx="M", SL=35.3, S=2.1, A=1, B=2, C=3, D=4, E=5;
if (isOpen(windowTabName)) {
	IJ.renameResults(windowTabName, "Results");
	}
	col = newArray("Name", "Sx", "SL", "S", "A", "B", "C", "D", "E");
	a = newArray(prefix, Sx, SL, S, A, B, C, D, E);
	c = nResults;
	for (l=0; l<a.length; l++) {
			setResult(col[l], c, a[l]);
	}
	IJ.renameResults(windowTabName);
	run("Clear Results");

Regards,

Cyril

--
Sent from: http://imagej.1557.x6.nabble.com/

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html