Data analysis Summary file
Posted by
Krs5 on
May 11, 2010; 10:40pm
URL: http://imagej.273.s1.nabble.com/Data-analysis-Summary-file-tp3688318.html
Dear List members,
I try to write a macro that will analyse different types of staining and write the results in a Summary file. When all the images are analysed we want to make further calculations from the data in the Summary file, like difference in area fraction between two different stains of the same sample. So, the results file has the total area of the sample on line 2 (line 1 is the heading), results of stain 1 on line 3,stain 2 on lin 4 and stain 3 on line 5. To calculate the area of stain 1 I use the next piece of code:
selectWindow("Summary");
lines = split(getInfo(), "\n");
headings = split(lines[0], "\t");
for (j=1; j<lines.length; j++)
{
values = split(lines[j], "\t"); //lines in table
a = values[2];
values = split(lines[j+1], "\t");
b = values[2];
c = b/a*100;
print(c);
j = j + 3;
}
Unfortunately I get the error ';' expected in line 10 for </> . I have tried many different options and checked the archives but cannot find what is wrong. If I replace c=b/a by c=(b+a) all is fine. However if I change to * or - I get the same error.
Any suggestions?
Thanks
Kees
Dr K.R. Straatman
Senior Experimental Officer
College of Medicine, Biological Sciences and Psychology
University of Leicester
http://www.le.ac.uk/biochem/microscopy/home.html