|
Hi, I try to use macro to read coordinates from a text file and then use
makeSelection to build a ROI.
But when I try to do analyze such as "Histogram", It showed a histogram of
"the whole picture", just like the ROI did not exist.
How can I bulid a ROI from a text file of coordinates?
Thank you for your help.
My macro:
----
pathfile=File.openDialog("Choose the file to Open:");
filestring=File.openAsString(pathfile);
rows=split(filestring, "\n");
x=newArray(rows.length);
y=newArray(rows.length);
for(i=0; i<rows.length; i++)
{
columns=split(rows[i]);
x[i]=parseInt(columns[0]);
y[i]=parseInt(columns[1]);
}
makeSelection("freeline", x, y);
------
--
|