|
I wrote a macro. It requires user to select correct channel to do some adjustments. I want the program to select certain channel without certain input.
run("RGB Stack");
waitForUser("Please select Chanel-3 then press OK");
setAutoThreshold("Default dark");
//run("Threshold...");
setThreshold(50, 255);
run("Create Selection");
setForegroundColor(0, 0, 0);
waitForUser("Please Select Chanel-2 Then Press OK");
run("Fill", "slice");
//run("Threshold...");
setThreshold(200, 255);
g=0
while (g<10)
{
//setTool("rectangle");
makeRectangle(870, 363, 561, 477);
run("Specify...", "width=150 height=150 x=870 y=363 slice=2");
waitForUser("Please select the nuclues you want to analyze then press ok");
run("Measure");
dir = getDirectory("image");
name = getTitle;
index = lastIndexOf(name, ".");
if (index!=-1) name = substring(name, 0, index);
name = name + ".xls";
saveAs("Measurements", dir+name);
print(dir+name);
}
Thanks
|