macro "Seg Tool 2 - C0a0L18f8L818f" { getCursorLoc(x, y, z, flags); //x=92; //y=270; name = File.name; //print("AVG_"+name); selectWindow("AVG_"+name); run("Duplicate...", "title=Seg_Tool"); makeOval(x-8, y-8, 16, 16); //wait(2000); /* run("Find Maxima...", "noise=20 output=[Point Selection]"); run("Measure"); h = nResults; X=x; Y=y; for (i =0 ; i < h; i++) { X = X + getResult("X", i); Y = Y + getResult("Y", i); } run("Clear Results"); h1=h+1; X = X/h1; Y=Y/h1; if ((X != 0)&&(Y!=0)) { makeOval(X-8,Y-8,16,16); } */ //roiManager("add & draw"); //roiManager("draw"); //roiManager("rename", "Cell"); //print(X); //print(Y); run("Crop"); run("Clear Outside"); //wait(2000); //setPixel(0,0, 255); //wait(2000); run("Make Binary"); //wait(2000); run("Options...", "iterations=1 count=4"); run("Open"); //run("Erode"); setPixel(0,0, 255); run("Create Selection"); // run("In [+]"); selectWindow("Enhanced_Contrast"); close("Seg_Tool"); //wait(2000); run("Restore Selection"); //wait(2000); setSelectionLocation(x-8,y-8); roiManager("add & draw"); makeRectangle(1,1 , 0, 0); }