// Astro Virtual Crop //================================================================ run("Marker-controlled Watershed", "input=avgip_astropdl_001_316-2-Gradient marker=markers mask=avgip_astropdl_001_316-2 binary calculate use"); //================================================================ // Select Central Stim point on Any Img setTool("point"); waitForUser("Select the central point of stimulation in the image"); roiManager("Add"); selectWindow("orig"); getSelectionCoordinates(xp, yp); Array.print(Array.concat(xp, yp)); // Draw Rectangle centered on coordinate makeRectangle(xp[0]-512, yp[0]-512, 1024, 1024); roiManager("delete") roiManager("add") // Crop stack run("Virtual Stack...", "output= &crp format=TIFF text1=[roiManager(\"Select\", 0);run(\"Crop\");]");