writing results of different length into columns
Posted by Sylvia Neumann on Jul 09, 2016; 10:28pm
URL: http://imagej.273.s1.nabble.com/writing-results-of-different-length-into-columns-tp5016837.html
Hi,
I am using the imageJ macro language, not Java. I want to write selection coordinates from an image analysis into a table. Something like this below:
X1 Y1 X2 Y2 XN YN
1 6 2 9 12 15
4 10 18 18 12 20
60 17 50 75
70 110
80 130
I can add them to the results Table, but because the columns have different length, I have to prefill the table with NaNs, see below.
X1 Y1 X2 Y2 XN YN
1 6 2 9 12 15
4 10 18 18 12 20
60 17 50 75 NaN NaN
NaN NaN 70 110 NaN NaN
NaN NaN 80 130 NaN NaN
Because I want to use these values later in a xls file, it is really hard to look at. It seems like a simple thing to do, but I have looked through so many posts in this forum but cannot find a solution that works for me. For other macros I have used Array.show (X1, X2) etc, but for this the number of selections changes with every experiment.
Thanks for your help!
Sylvia