After some image processing using ImgaeJ macro, I have a ‘Results’ tab which contains 2 columns A and B. Lets’s say I have 50 rows of data.
Now I want to subtract the value of last row from all other 49 rows above in column B.
After this, I want to write all the values in “.csv” file (column A, B and C with 49 values each).
Below is the part of the code. I think the only problem is fetching the values from arrays that the script can write to the csv file.
Array.getStatistics command only exports the mean, std values for a given column. I'm interested in fetching all 49 values.
directory = getDirectory("Choose a Directory");
resultFilename = directory + Dialog.getString() + ".csv";
A = newArray(nResults() - 1);
B = newArray(nResults() - 1);
D = getResult("B", nResults() - 1);
for (i = 0; i < nResults() - 2; i++) {
A[i] = getResult("A", i);
B[i] = getResult("B", i);
C[i] = A[i] - D;
}
Any idea about what is the command to get the values of A[i], B[i] and C[i]?
Looking forward for some help here.
Thank you.